GPU: implement ClearUnorderedAccessViewUint/Float for buffers and textures #1162
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1162
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1162/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?
@geiyiliyabumo on GitHub · 2026-11-24 16:18 UTC · original
geiyiliyabumo:feat/uav-clear-buffers-and-textures→main· +1242 −21 · 5 files · 1 commits · closed without mergingSummary
Fixes #771
Full verification details and change notes are documented in #771 (commit
12e9c6a, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.
@fuzeofficlal on GitHub · 2026-11-24 17:24 UTC · original
Reviewed
12e9c6aand tested same-command-list buffer clear + computeDispatchordering under the D3D12 Debug Layer on NVIDIA GeForce RTX 5090 and D3D12 WARP.Two architectural notes worth considering for the buffer path:
ClearUnorderedAccessView*on the shadow buffer avoidsID3D12GraphicsCommandList7Enhanced Barrier fallback ordering hazards:ID3D12GraphicsCommandList7::Barrier(with a submission-timedeferfallback that breaks ordering relative to earlier/laterDispatchcalls on the same list), buffer UAV clears can record nativeClearUnorderedAccessViewUint/ClearUnorderedAccessViewFloatdirectly againstshadow.buffer:CBV_SRV_UAVCPU heap onHostList(CopyDescriptorsSimpleinto a dynamic shader-visibleHostHeapslot).ClearUnorderedAccessViewUintonDXGI_FORMAT_R32_TYPELESS+D3D12_BUFFER_UAV_FLAG_RAW(RWByteAddressBuffer), rewrite the clear view descriptor toDXGI_FORMAT_R32_UINT(Flags = NONE), then bracket the native clear withshadow.refresh+shadow.gpu_writes+D3D12_RESOURCE_BARRIER_TYPE_UAV.ID3D12GraphicsCommandList.R32G32B32A32_UINT,R32G32_FLOAT) and overlapping intra-list raw/typed buffer clears feeding an immediatecs_5_1DispatchwithVICTORY_D3D12_DEBUG=1on RTX 5090 and D3D12 WARP (0debug layer errors) infuzeofficlal/VIctory@c4c09b2(fix/uav-clear-771).@Zipettte on GitHub · 2026-11-24 18:01 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
12e9c6a:cargo test -p victory-gpupasses, 57 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 00:33 UTC · original
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.ClearUnorderedAccessViewUint/Float is already served in main (list.rs 0x1a8/0x1b0 -> draw.rs State::clear_unordered, any view the title made at the CPU handle); nothing left to rebase.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed