Commit Graph

3897 Commits

Author SHA1 Message Date
Philip Rebohle 0af7229b8e
[util] Restore display modes of all monitors in RestoreMonitorDisplayMode
Fixes #2064.
2021-06-01 01:48:12 +02:00
Philip Rebohle e7897e8289
[tests] Add YUY2 video processor test 2021-05-31 15:55:08 +02:00
Philip Rebohle 383cde2051
[d3d11] Allow creation of render target views for planar images 2021-05-30 19:42:44 +02:00
Philip Rebohle 01051bac99
[d3d11] Allow creation of unordered access views for planar images 2021-05-30 19:42:44 +02:00
Philip Rebohle 6d72bc94f4
[d3d11] Allow creation of shader resource views for planar images 2021-05-30 19:42:44 +02:00
Philip Rebohle 2740030fca
[d3d11] Support video processor output views in ClearView 2021-05-30 19:42:44 +02:00
Philip Rebohle b04721f9a2
[d3d11] Use staging buffer for MapImage on deferred contexts 2021-05-30 19:42:44 +02:00
Philip Rebohle ff9d6e3226
[d3d11] Use staging buffer and copyBufferToImage for UpdateSubresource
Reduces number of copies and also fixes problems with multi-plane formats.
2021-05-30 19:42:44 +02:00
Philip Rebohle e749a4a4ac
[d3d11] Create shadow copy of video input images if sampled bit is not set
This can happen with RGB input views since not having any bind flags set
is legal for video input views, and SHADER_RESOURCE is actually explicitly
disallowed, but we don't always want to set sampled bit for those resources.
2021-05-30 19:42:44 +02:00
Philip Rebohle 3c22f4066b
[d3d11] Lock context in video context entry points 2021-05-30 19:42:44 +02:00
Philip Rebohle 25607a0692
[d3d11] Report video processor capabilities for image formats 2021-05-30 19:42:44 +02:00
Philip Rebohle 6d9da5a8d7
[d3d11] Don't use MAP_MODE_DIRECT for multi-plane images 2021-05-30 19:42:44 +02:00
Philip Rebohle 01236fbd84
[d3d11] Use correct method to clear multi-plane images 2021-05-30 19:42:44 +02:00
Philip Rebohle ee30acf120
[d3d11] Use new packImageData for initializing mapped image buffers 2021-05-30 19:42:44 +02:00
Philip Rebohle 7184b75f8f
[d3d11] Use GetSubresourceLayout for image maps on the immediate context 2021-05-30 19:42:44 +02:00
Philip Rebohle 1b296f8338
[d3d11] Introduce GetSubresourceLayout 2021-05-30 19:42:44 +02:00
Philip Rebohle e87aa08fd2
[d3d11] Implement basic video processor blitting 2021-05-30 19:42:43 +02:00
Philip Rebohle 969ac59667
[d3d11] Add ID3D11VideoContext stub 2021-05-30 19:42:43 +02:00
Philip Rebohle 1df26a3605
[d3d11] Implement video processor views 2021-05-30 19:42:43 +02:00
Philip Rebohle 09cf2cd11e
[d3d11] Add ID3D11VideoProcessor stub 2021-05-30 19:42:43 +02:00
Philip Rebohle bdb7eef874
[d3d11] Add ID3D11VideoProcessorEnumerator stub 2021-05-30 19:42:43 +02:00
Philip Rebohle 1eaf2545c3
[d3d11] Add ID3D11VideoDevice stub 2021-05-30 19:42:43 +02:00
Philip Rebohle e988895e51
[d3d11] Set mutable and extended usage bits for multi-plane images 2021-05-30 19:42:43 +02:00
Philip Rebohle 2764f4abb5
[dxgi] Add format mapping for DXGI_FORMAT_AYUV 2021-05-30 19:42:43 +02:00
Philip Rebohle d859361a37
[dxgi] Add format mapping for DXGI_FORMAT_YUY2
And fix some existing 422 mappings.
2021-05-30 19:42:43 +02:00
Philip Rebohle 9b236078c2
[dxgi] Add format mapping for DXGI_FORMAT_NV12 and DXGI_FORMAT_420_OPAQUE 2021-05-30 19:42:43 +02:00
Philip Rebohle 8116927ec6
[dxvk] Introduce new version of packImageData 2021-05-30 19:42:43 +02:00
Philip Rebohle 4630bbc427
[dxvk] Support multi-plane formats in updateImage 2021-05-30 19:42:43 +02:00
Philip Rebohle 55a67988b2
[dxvk] Support multi-plane formats in computeImageSize 2021-05-30 19:42:43 +02:00
Philip Rebohle 6462174c13
[dxvk] Support multi-plane formats in copyImageToBuffer 2021-05-30 19:42:43 +02:00
Philip Rebohle a660b35f6e
[dxvk] Support multi-plane formats in clearCompressedColorImage 2021-05-30 19:42:43 +02:00
Philip Rebohle ed57019e13
[dxvk] Support multi-plane formats in copyImage 2021-05-30 19:42:43 +02:00
Philip Rebohle 41e28cb280
[dxvk] Support multi-plane formats in uploadImage 2021-05-30 19:42:43 +02:00
Philip Rebohle 86542248df
[dxvk] Support multi-plane formats in copyBufferToImage 2021-05-30 19:42:43 +02:00
Philip Rebohle cd2ea98670
[dxvk] Add helper functions to deal with plane aspects 2021-05-30 19:42:43 +02:00
Philip Rebohle 1d6da6f83e
[dxvk] Add format definition for VK_FORMAT_G8_B8R8_2PLANE_420_UNORM 2021-05-30 19:42:43 +02:00
Philip Rebohle 0f5e126735
[dxvk] Introduce flushSharedImages
Fixes problems with images not being cleared prior to presentation
if the clear is the last command issued in the frame.
2021-05-30 19:42:43 +02:00
Philip Rebohle 895b19c746
[tests] Add D3D11 video processor test 2021-05-30 19:42:43 +02:00
Philip Rebohle a1f3f6c971
[dxbc] Remove old RADV/LLVM workaround for early discard
We have Demote now, and ACO is the default.
2021-05-27 00:40:59 +02:00
Philip Rebohle 94674ac45e [dxvk] Skip CPU adapters if GPUs are present
Because some games try (and fail) to run on Lavapipe despite it already
being the lowest priority device in the list.
2021-05-21 22:55:54 +02:00
Joshua Ashton c51080068e [dxgi] Handle DXGI_PRESENT_TEST and failures in GetFrameStatistics 2021-05-20 23:02:07 +01:00
Philip Rebohle 401edc53fe [dxgi] Show warning in DxgiOutput::GetFrameStatistics 2021-05-20 22:27:36 +01:00
Philip Rebohle db3654a07f [dxgi] Implement present count and frame statistics for swap chains 2021-05-20 22:27:36 +01:00
Joshua Ashton a3d1699823
build: Don't strip binaries with --dev-build 2021-05-19 15:59:55 +01:00
Joshua Ashton 0520ce9448
[d3d9] Treat largest element in Stream 0 as vertex decl size
Closes #2059
2021-05-13 01:32:56 +01:00
orbea b84a03b4d4 [util] Enable d3d9.deferSurfaceCreation for Nights of Azure 2021-05-07 22:15:58 +01:00
Joshua Ashton f0c1e89443 [d3d9] Handle zero-sized draws
These return S_OK, because ofc they do.
2021-05-05 19:25:46 +01:00
Joshua Ashton 0f52c85d21 [d3d9] Account for vertex declaration size for UP draws
The stride may not give us the full picture here as the stride
may not encompass the vertex declaration entirely.

Consider a vertex declaration of size 20, and a stride of 12,
we may not have covered the whole range of space the draw wants with
VertexCount * Stride.

Some games such as FF13 Lightning Returns have two float3s in the vertex decl
and draw two triangles with the last float being out of bounds. This causes
the whole vertex element to be set to 0 on NVIDIA which breaks their fullscreen passes.

Instead, take (VertexCount - 1) * Stride + VertexDeclSize for the buffer size
and pad with 0s outside of the VertexCount * Stride range.

Closes: #2046
Closes: #1908
2021-05-05 19:25:46 +01:00
Joshua Ashton 1ab2565521 [tests] Add a UP range test 2021-05-05 19:25:46 +01:00
Joshua Ashton 4a4b96611d
[d3d9] Only log WaitForVBlank stub once 2021-04-30 19:33:24 +01:00