Repository navigation
d3d12: committed resources accept ALLOW_SHADER_ATOMICS with a UAV (D3D-469) - #4489
Conversation
CreateCommittedResource refused D3D12_HEAP_FLAG_ALLOW_SHADER_ATOMICS on every resource. On an RTX 4070 Laptop (621.24) and WARP the host accepts it on buffers and textures with ALLOW_UNORDERED_ACCESS, refuses it without, and keeps it in GetHeapProperties. Match that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kam471
left a comment
There was a problem hiding this comment.
Built and ran d3d12_vulkan_device_test at 0f0c85cc on Windows 11, RTX 5070 Ti: exit 0, ctest -R d3d12_vulkan_device -> 1/1 passed (8.04 s).
Committed resources with ALLOW_SHADER_ATOMICS and a UAV are accepted, and the full device suite (clears, uploads, copies, resolve, reserved resources, queries, tiling, CheckFeatureSupport errors) matches the host. No blocking issue.
|
Tested
AI-assisted (Claude Code). |
|
Reading review (no Windows/D3D12 here), plus the API documentation and a cross-PR merge check: the change matches the documented rules and merges cleanly.
Cannot run |
|
AI-assisted Windows hardware verification for D3D-469 on AMD Radeon RX 6750 XT (
|
|
Merges cleanly into main 3faac55 despite the far-behind base; compileall clean, docs guards green, and nothing in the tree mentions SHADER_ATOMICS before you (no supersession). I checked the GetHeapProperties half rather than trusting it: resolved_heap_flags masks only the two CREATE_* bits and ORs DENY bits, so the flag reads back and your new EXPECT(atomics_flags == ALLOW_SHADER_ATOMICS | ALLOW_ONLY_BUFFERS) is consistent — and unlike the six host-gated compare_invalid_arguments cases, that assertion actually runs on Linux CI. Shares three files with open #4493 but merge-tree proves the two don't collide, so either landing order works. C++ not buildable here, so the RTX 4070 Laptop / WARP measurements are unverified; all four checks were queued. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
Claimed in the coordination issue as: D3D-469 (claim)
What and why
CreateCommittedResourcerefusedD3D12_HEAP_FLAG_ALLOW_SHADER_ATOMICSon every resource, so a valid resource failed to create. The flag isn't valid everywhere, so this doesn't simply allow it. Measured on the host:ALLOW_SHADER_ATOMICSS_OKE_INVALIDARGS_OKS_OKE_INVALIDARGS_OKS_OKE_INVALIDARGS_OKE_INVALIDARGE_INVALIDARGE_INVALIDARGE_INVALIDARGE_INVALIDARGE_INVALIDARGGetHeapPropertieskeeps the flag, for example0x4c0on a committed buffer. The layer already stores it, and the test now checks it.compare_invalid_argumentsgains six host-compared cases, anddocs/d3d12_vulkan.mdrecords the rule.Tested
NVIDIA GeForce RTX 4070 Laptop GPU, driver 621.24, Windows 11 build 26300, MSVC (Visual Studio 2026), Vulkan SDK 1.4.363.1, on
c4a2bb15(base03b09a08). This branch (0f0c85cc) is the same commit on my fork's older base, because my token can't update the fork's workflow files. Merging it with03b09a08gives exactly the tested tree (3368a64b).d3d12_vulkan_devicefails on the three new valid cases (oursE_INVALIDARG, hostS_OK).ctest: 137 passed, 0 failed, 9 skipped (mostly game files), andgameinputdisabled because SDL3 isn't installed here.d3d12_vulkan_device_testunderLEONIDA_VK_VALIDATION=1: exit 0, no validation messages.compileallis clean. Four tests fail here with or without this change, so they are unrelated:test_build_llvm_mc_batch,test_check_no_game_data,test_savesandtest_u16_high_half.py::test_d16_buffer_store_no_redundant_extract_after_shr16.Not run on AMD, Intel, Wine or Windows 10. @gabsilvs's sweep saw an AMD adapter accept the flag with a UAV. AI-assisted (Claude).
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code