dolphin-emulator/Source/Core/VideoBackends/D3D12
Dentomologist 83f307ec7e D3D12: Only use framebuffer integer descriptor if allocated
Verify that DXFramebuffer's integer RTV descriptor's cpu_handle has been
allocated before using it, and if it hasn't use the non-integer RTV
descriptor instead. This fixes a Dolphin crash in Twilight Princess, and
possibly other games (Issue 13312).

As an optimization to save space in the descriptor heap, DXFramebuffer's
integer descriptor is only initialized if the given abstract texture
format has different integer and non-integer RTV formats. This
previously wasn't accounted for by GetIntRTVDescriptorArray, which could
cause DX12::Gfx::BindFramebuffer to call OMSetRenderTargets with an
invalid descriptor which would lead to a crash.

Triggering the bug was fortunately rare because integer formats are only
used when blending is disabled and logic ops are enabled. Furthermore,
the standard integer abstract format is RGBA8 which has different
integer and non-integer RTV formats, causing the integer descriptor to
be initialized and avoiding the bug.

The crash started appearing in a2702c6 because it changed the
swapchain's abstract texture format from RGBA8 to RGB10_A2. Unlike
RGBA8, RGB10_A2 has the same integer and non-integer RTV formats and so
the bug can be triggered if the other requirements are met.
2023-08-04 13:17:33 -07:00
..
CMakeLists.txt Add AbstractGfx for DX12 2023-01-31 19:41:24 +13:00
Common.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
D3D12BoundingBox.cpp Add AbstractGfx for DX12 2023-01-31 19:41:24 +13:00
D3D12BoundingBox.h Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
D3D12Gfx.cpp VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
D3D12Gfx.h VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
D3D12PerfQuery.cpp Divide by MSAA for PerfQuery in all backends. 2023-03-14 02:13:25 +01:00
D3D12PerfQuery.h Add virtual Initialize() to PerfQueryBase 2023-01-31 19:41:24 +13:00
D3D12StreamBuffer.cpp VideoBackends/D3D12: Include HRESULT in error messages 2022-01-09 12:44:53 -08:00
D3D12StreamBuffer.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
D3D12SwapChain.cpp Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
D3D12SwapChain.h treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
D3D12VertexManager.cpp Lint fixes 2023-02-09 18:36:20 +13:00
D3D12VertexManager.h VideoBackends:D3D12: Dynamic vertex loader support 2022-09-19 16:28:24 -05:00
DescriptorAllocator.cpp VideoCommon: add constant value to set the allowed maximum number of pixel samplers 2023-02-10 00:46:11 -06:00
DescriptorAllocator.h VideoCommon: add constant value to set the allowed maximum number of pixel samplers 2023-02-10 00:46:11 -06:00
DescriptorHeapManager.cpp VideoBackends:D3D12: Don't query GPU descriptor handle for non-shader visible heap 2022-10-29 23:39:27 +02:00
DescriptorHeapManager.h VideoBackends:D3D12: Don't query GPU descriptor handle for non-shader visible heap 2022-10-29 23:39:27 +02:00
DX12Context.cpp Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
DX12Context.h VideoBackends:D3D12: Dynamic vertex loader support 2022-09-19 16:28:24 -05:00
DX12Pipeline.cpp VideoBackends: fix d3d12 validation layer error introduced by multi-output texture breaking logic ops support 2023-06-17 01:48:59 -05:00
DX12Pipeline.h VideoCommon: store the configuration used to create the AbstractPipeline on the pipeline itself, so that it's easy to duplicate pipelines with slightly altered configuration 2023-02-09 02:13:53 -06:00
DX12Shader.cpp VideoBackends/D3D12: Include HRESULT in error messages 2022-01-09 12:44:53 -08:00
DX12Shader.h VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc 2021-08-30 13:47:48 -05:00
DX12Texture.cpp D3D12: Only use framebuffer integer descriptor if allocated 2023-08-04 13:17:33 -07:00
DX12Texture.h D3D12: Only use framebuffer integer descriptor if allocated 2023-08-04 13:17:33 -07:00
DX12VertexFormat.cpp Fix build errors related to formatting non-scoped enums 2022-11-23 13:45:43 -08:00
DX12VertexFormat.h Fix build errors related to formatting non-scoped enums 2022-11-23 13:45:43 -08:00
VideoBackend.cpp Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted. 2023-06-19 01:34:42 +03:00
VideoBackend.h VideoCommon: Pass WindowSystemInfo to InitBackendInfo 2023-06-08 22:07:39 -07:00