Repository navigation
d3d12: D24 format support and MSAA levels describe the D32 image creation makes - #1493
Conversation
…tion makes On a GPU without Vulkan D24_UNORM_S8_UINT (AMD), a D24 texture is a D32_SFLOAT_S8_UINT image (ItsNotRexed#737), but CheckFeatureSupport answered from the D24 format itself: FORMAT_SUPPORT gave Support1 = 0 for D24_UNORM_S8_UINT and R24G8_TYPELESS, and MULTISAMPLE_QUALITY_LEVELS gave 0 levels for R24G8_TYPELESS at every count, while CreateCommittedResource(ALLOW_DEPTH_STENCIL) succeeded (found by @zneel, ItsNotRexed#1380 item 2). - FORMAT_SUPPORT queries D32_SFLOAT_S8_UINT when the format resolves to D24 and the device can't use D24. - MULTISAMPLE_QUALITY_LEVELS takes the creation path for typeless formats that are only valid as depth. - d3d12_d24_support_test checks the layer against itself on any GPU: DEPTH_STENCIL is reported exactly when a 1x depth-stencil texture is created, and a quality level exactly when a 2x/4x/8x one is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Windows + GPU check on RDNA3 (your RX 9070 is RDNA4, so this is a different AMD generation on the same "D24 stored as D32" path). Built
|
|
Tested 196d200 on NVIDIA GeForce RTX 3090 (Ampere), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51): pass. |
|
Tested AI-assisted (Claude Code): it built the branch, ran the tests and wrote this comment.
This GPU has native |
|
Tested 196d200 under Wine on RTX 5090 (NVIDIA 615.78.08, subgroup 32) and the Ryzen 7 9800X3D iGPU (RDNA2 gfx1036, RADV Mesa 26.2.5, subgroup 32..64), Linux 7.2 (Arch), Wine 11.20 Staging, clang-cl 23.1.3 + xwin (MSVC 14.44, SDK 10.0.26100). No game files. Result: pass
AI-assisted run (Claude Code). |
…AT_SUPPORT check, four tools' stdout - run_gpu_tests.py: #1541's wave64 pixel fixtures (runtime/test/shaders/w64_graphics.py FIXTURES, tiers A-C) are checked by that runner; run_gpu_tests picked up their .asm and failed 14 of them with "no checker defined". It now leaves w64_graphics.FIXTURES to that runner. - d3d12_d24_support_test (#1493): expected DEPTH_STENCIL in FORMAT_SUPPORT for R24G8_TYPELESS. Measured here, the host D3D12 (RTX 4060 Ti and WARP) reports 0x001010b0 for R24G8_TYPELESS and 0x003110b0 (DEPTH_STENCIL) only for D24_UNORM_S8_UINT, which #1511's per-format rules follow; the check now expects the bit for the typed format only. - fma_mix_probe, text_tables, wave64_halves, xdxr_bvh: new tools without #1428's stdout errors='replace' guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Coordination check: the newer open #1513 covers the same D24S8 backing-format path and the same FORMAT_SUPPORT / MULTISAMPLE_QUALITY_LEVELS queries, with shared backing selection used by creation and queries. #1493 contributes the stronger create-versus-reported-support test and multi-GPU runs. Please coordinate with #1513 on one canonical implementation and carry that test across, rather than merging two overlapping patches to the same handlers. |
|
The latest GitHub Runtime workflow still has one red |
|
Tested 196d200 merged onto main 99f9989 on AMD Radeon RX 6600 (RDNA2, Navi 23, discrete), AMD proprietary 26.11.2 (Vulkan 1.4.315), Windows 11 Pro 10.0.26300: pass. First RDNA2 run here, next to the RDNA4 and RDNA3 ones.
AI-assisted (Claude Code): it merged the PR, built it, ran the suites and wrote this comment. |
|
Tested 196d200 (159 behind main) on two GPUs: Windows 11 Home 10.0.26300, MSVC 14.44 (
No validation messages. The one AMD failure is AI-assisted (Claude Code). No game files. |
Claimed in the coordination issue as: #1380 (comment) (item 2 of @zneel's FORMAT_SUPPORT finding 7078508391)
What and why
On a GPU without Vulkan
D24_UNORM_S8_UINT, which includes AMD, a D24 texture is aD32_SFLOAT_S8_UINTimage underneath (texture_format, #737).CheckFeatureSupportanswered from the D24 format itself:FORMAT_SUPPORTgaveSupport1 = 0forD24_UNORM_S8_UINTandR24G8_TYPELESS. It usedvulkan_format(fmt, true)with no fallback, and that format has no features on such a GPU.MULTISAMPLE_QUALITY_LEVELSgave 0 levels forR24G8_TYPELESSat every count. It only took the creation path whentexture_storage_format(format, false)had a depth aspect, and the typeless member has no colour format.CreateCommittedResource(ALLOW_DEPTH_STENCIL)succeeds for both, at 1x through 8x.A title that checks support before creating its depth buffer would think D24 is unavailable on AMD.
FORMAT_SUPPORT: when the format resolves to D24 and the device can't use D24, queryD32_SFLOAT_S8_UINT, which is what creation makes.MULTISAMPLE_QUALITY_LEVELS: a typeless format that is only valid as depth (R24G8_TYPELESS,R32G8X24_TYPELESS) takes the same creation path as the depth formats.Other formats are unchanged. The support-bit mapping itself (
TEXTURE3D,MULTISAMPLE_*,MIPand so on) is @zneel's item 3, so it isn't touched here.Tested
New
d3d12_d24_support_test(ctestd3d12_d24_support). It checks the layer against itself, so it holds on any GPU, native D24 or not:ALLOW_DEPTH_STENCILtexture is creatable exactly whenFORMAT_SUPPORTreportsDEPTH_STENCIL, and thenTEXTURE2D;AMD Radeon RX 9070 (RDNA4), AMD 26.11.2, Windows 11 Pro 26300, MSVC 14.44. The test prints
Vulkan D24_UNORM_S8_UINT depth attachment: no (D24 is stored as D32_SFLOAT_S8_UINT).D24_UNORM_S8_UINTSupport1R24G8_TYPELESSSupport1R24G8_TYPELESS2x/4x/8x levelsmain's layer + this test0x000000000x000000000x000103f0(incl.DEPTH_STENCIL,TEXTURE2D)0x000103f0Full
ctest: 82/83. The one failure,d3d12_r9g9b9e5_uav, is themainregression from my #1388 that #1450 fixes.On a GPU with native D24 (NVIDIA) nothing should change, since
depth_usableis true there. I haven't run it on one yet.AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code