D3D-CLEAR-UAV-3D-SLICE: clear selected 3D UAV slices and rectangles #1814
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1814
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1814/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@timbot103 on GitHub · 2026-11-25 12:27 UTC · original
timbot103:d3d-clear-uav-3d-slice→main· +757 −76 · 9 files · 1 commits · merged 2026-11-25 19:29 UTCClaimed in the coordination issue as: D3D-CLEAR-UAV-3D-SLICE
What and why
ClearUnorderedAccessViewUintandClearUnorderedAccessViewFloatcan now clear selected W slices of a 3D texture mip and apply XY rectangles to each selected slice. A tagged descriptor carries the W range through a descriptor copy. An untagged descriptor uses the bound resource's mip depth, and an unpredicated whole-mip clear uses the existing fast path.The staged path fills up to 64 KiB of scratch once and reuses the pattern across tiles and slices. It supports direct and compute queues, clips rectangles to the mip, and orders overlapping writes. It refuses predicated staged clears and incompatible 3D view/backing formats. The existing packed RGB9E5 representation on R32_UINT is supported.
Tested
gta6rtwith MSVC 2022, Ninja andRelWithDebInfo. A clean build matched the warning set on unmodified0d80bc5df.1, WARP expected NaN). Both outcomes reproduced on unmodified0d80bc5df. The 3D UAV clear tests passed in all four configurations.GPUs tested: NVIDIA GeForce RTX 5080, driver 616.64, Vulkan 1.4.351; AMD Radeon(TM) Graphics, driver 25.10.30.02 (Windows 32.0.21030.2001), Vulkan 1.4.315. Both on Windows 11 Pro build 26200.
AI-assisted: yes (Gemini, Codex, Claude)
Checklist
mainat0d80bc5df.@madvillain91 on GitHub · 2026-11-25 14:56 UTC · original · reviewed
Reviewed diff and independently verified commit
926e9d3efon Windows 11 with an NVIDIA Ampere GPU (againstmain71a769d7d):Environment
19.44.35230.0, Ninja,RelWithDebInfo)1.4.363.0617.14, Vulkan1.4.351Checks run
git diff --check: cleanreplay_uav_clear_offset_test,d3d12_uav_clear_test, andd3d12_texture_uav_testcleanly in an isolated build: 0 errorsreplay_uav_clear_offset_test: PASS (buffer offsets, typeless texture view-format clears, and 3D sliced/rect clears all passed)d3d12_uav_clear_test(plain,LEONIDA_VK_VALIDATION=1, andLEONIDA_VK_VALIDATION=1+VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT): PASS, 0 VUIDs across all 3 modes (A4B4G4R4_UNORMskipped as no typed UAV on this device;3D UAV predicationpredicate control passed and staged clear refused on both direct family 0 and compute family 0)d3d12_texture_uav_test --descriptors-only(LEONIDA_VK_VALIDATION=1andLEONIDA_VK_VALIDATION=1+ synchronization validation): PASS, 0 VUIDs (texture UAV descriptors: creation, copy, range/refusal and clear checks passed)Diff notes
volume_clear_tile()keeps every tile pattern within the 64 KiBvkCmdUpdateBufferlimit and reuses the private scratch buffer across disjoint XY tiles and Z slices;emit_commands()inserts a transfer barrier before each clipped rectangle to order overlapping rects and scratch fill/update.clear_unordered_access()restricts toDIRECT/COMPUTElists, and untagged 3D T#s derive mip depth fromresource->GetDesc().DepthOrArraySize >> first_miprather than raw descriptor depth.R9G9B9E5onR32_UINT) are cleanly refused before submission.Not checked
d3d12_texture_uav_test <cs_texture_uav.spv>compute shader invocation, fullctestsuite, and non-NVIDIA hardware.LGTM from this Windows 11 + NVIDIA RTX 3070 Ti verification (AI-assisted verification; synthetic test fixtures only, no game data).
@aslan2142 on GitHub · 2026-11-25 19:29 UTC · original
Merged, thanks! Tested
926e9d3efmerged ontomainwith the UAV area tests and the full Windows suite under Wine (llvmpipe and a RADV iGPU). The full suite matchesmaintest by test. Thed3d12_clearandd3d12_view_slicesfailures there fail onmaintoo, with the same messages; they come from the headless test display.main75a41f5dc+926e9d3ef: it merges cleanly; the semantic suite passes (491 files, 6,312 tests, 0 files failed); the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 9 changed files.AI-assisted (Claude Code, Claude Opus 5.5).