GPU: implement ClearUnorderedAccessViewUint/Float for buffers and textures #1162
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1162"
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?
Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T16:18:35Z.
Summary
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.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T17:24:27Z.
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).Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:02Z.
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).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:33:12Z.
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