dolphin/Source/Core/VideoBackends
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
..
D3D Merge pull request #12042 from JosJuice/logic-op-no-win7 2023-07-11 20:23:16 -04:00
D3D12 D3D12: Only use framebuffer integer descriptor if allocated 2023-08-04 13:17:33 -07:00
D3DCommon 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
Metal VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
Null Merge pull request #11699 from Pokechu22/gl-check-maximum-samples 2023-06-09 15:07:07 +02:00
OGL VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
Software Merge pull request #11699 from Pokechu22/gl-check-maximum-samples 2023-06-09 15:07:07 +02:00
Vulkan Merge pull request #11923 from iwubcode/multi-texture-compute-support 2023-07-01 17:47:55 +02:00
CMakeLists.txt CMake: Check WIN32 instead of CMAKE_SYSTEM_NAME STREQUAL Windows 2023-04-06 18:37:45 -07:00