Repository navigation
d3d12: support typeless and castable RGBA8 RTVs on MSAA textures - #1874
Conversation
Windows Radeon and RTX 3080 verification (AI-assisted)I verified D3D-241 at the exact open head On Windows 11 Pro build 26200, I built the stock Before submitting the cases, I checked the Vulkan image capabilities and native D3D12 and WARP flags. Both ICDs returned sample mask
The successful selection covers committed textures with explicit views. Default/null descriptors, placed-resource behavior and the #1753 Radeon standard-swizzle allocation gap remain outside this evidence. The changed RTV gate is shared code, but the claim's placed case still needs its own result. Scope disclosure: I invoked the stock GPU executable with |
|
Tested
Cross-vendor hardware check confirms MSAA typeless/castable RGBA8 RTVs, clears, format-cache order and WARP readback matches behave cleanly on AMD RDNA4. AI-assisted. |
|
Tested e608a1b on AMD Radeon RX 7600 (RDNA3), AMD 26.11.2 (LLPC), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363.0: pass.
AI-assisted (Claude Code, reviewed with Codex). No game files. |
|
Tested e608a1b on an NVIDIA GeForce RTX 3050 Laptop GPU, driver 32.0.16.2101, Windows 11, native MSVC (VS 2022 Build Tools, Ninja, RelWithDebInfo): pass.
AI-assisted (Claude Code). |
|
Tested e608a1b on NVIDIA GeForce RTX 5060 (Blackwell, driver 617.42, Vulkan 1.4.351), Windows 11 Pro build 26300, MSVC (VS 2026), LLVM_MC set, scripts\build_runtime.ps1, then ctest -j 4: pass for this change. d3d12_typeless_rtv and typeless_rtv pass; 106 of 107 run tests pass. The one failure is d3d12_draw ("fence signal 4 is not above 30"), which fails the same way on main 003e781 here and is fixed by #1807. (Run with an AI coding agent.) |
Follow-up to finding #1745 (comment) (claimed in #1745 (comment)).
Summary
Allows typeless (
DXGI_FORMAT_R8G8B8A8_TYPELESS) and castable (DXGI_FORMAT_R8G8B8A8_UNORMwith a compatible format list) RGBA8 render-target view reinterpretation on multisampled 2D textures and 2D texture arrays (SampleDesc.Count > 1):runtime/shims/d3d12_vulkan_device.cpp(CreateRenderTargetView): acceptD3D12_RTV_DIMENSION_TEXTURE2DMSandD3D12_RTV_DIMENSION_TEXTURE2DMSARRAYwhenrd.SampleDesc.Count > 1, and keepTEXTURE2D/TEXTURE2DARRAYstrictly gated tord.SampleDesc.Count == 1.runtime/src/vulkan_replay.h(detail::color_view_format): remove theresource.samples != 1guard soClearRenderTargetresolves the requested attachment format (vk.begin_rendering+vk.clear_attachments) on multisampled images as well.runtime/test/typeless_rtv_test.cpp: test MSAA (samples = 4) single-layer and layered (first_layer = 1, layer_count = 2) replay for all five RGBA8 view formats instead of rejectingsamples = 4.runtime/test/d3d12_typeless_rtv_test.cpp: test4xMSAAR8G8B8A8_TYPELESSand castableR8G8B8A8_UNORM({UNORM, UNORM_SRGB}) clear ->ResolveSubresource-> readback against WARP (TEXTURE2DMS+TEXTURE2DMSARRAY, whole and partial rect), plus invalid view-dimension/slice-range/unlisted-format refusals.Testing (no game files)
Tested on Windows 11 Pro, NVIDIA GeForce RTX 5070 Ti (driver
610.88, Vulkan SDK1.4.363.0, MSVC19.50.35719.0) after a cleanruntime/build:typeless_rtv_test.exe: passed (EXIT_CPU=0,93scenarios)d3d12_typeless_rtv_test.exe(default andLEONIDA_VK_VALIDATION=1): passed (EXIT_GPU=0,EXIT_VAL=0,1730 WARP readbacks matched,27views rejected, 0 validation errors)ctest --output-on-failure -j 4:102/103passed (7skipped/disabled; onlyd3d12_drawfailed with the pre-existingmain003e7812TEST-266bundle-blend issue)AI-Assisted (Gemini)