gpu: scope indirect clamp UAV barriers to source, count, and budget buffers #2360
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2360
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2360"
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?
@nidea1 on GitHub · 2026-11-29 12:21 UTC · original
nidea1:perf/scoped-indirect-uav-barriers→main· +286 −66 · 4 files · 1 commits · merged 2026-11-30 14:12 UTCWhat it changes
Replaces global
NULLUAV barriers around indirect-argument clamps (crates/victory-gpu/src/indirect.rs,crates/victory-gpu/src/indirect/batch.rs,crates/victory-gpu/src/indirect/bench.rs,crates/victory-gpu/src/host.rs) with resource-scoped, deduplicated UAV barriers:HostList::budget()returnsOption<(&ID3D12Resource, u64)>(zero-cost borrow of the active card or CPU-mapped budget buffer alongside its GPU virtual address).pre_clamp_barriersemits deduplicated resource-scoped UAV barriers (pResource != NULL) only for the source argument buffer(s), optional count buffer, and budget buffer whenwaitis true (still honoringVICTORY_QUIET_WAITSandVICTORY_BARRIER_TEST=indirect), combined withdst'sbefore -> UNORDERED_ACCESStransition throughcrate::barstat::rb.NULLUAV barrier inrecord_clamp(matchingbatch::record):dst'sUNORDERED_ACCESS -> INDIRECT_ARGUMENTtransition makes clamped records visible toExecuteIndirect, andbudgetis ordered by the next clamp's scoped UAV barrier (andcard_budget_out's copy transition on list close).How it was tested
wait = trueissued a globalNULLUAV barrier before dispatch, andrecord_clampissued a second globalNULLUAV barrier after dispatch (whenVICTORY_QUIET_WAITSwas off)dsttransition after dispatch; verified withpre_clamp_barriers_scopes_and_deduplicates_uavs,warp_scoped_indirect_barriers_order_compute_writes_and_budget(GPU compute writer -> batched clamp -> single clamp sharing budget ->ExecuteIndirect), and live gameplay on RTX 3060 Ticargo testpassed for the crates it touches: yes (cargo test -p victory-gpu --lib --locked indirect::tests::— 35 passed, 0 failed, 10 ignored benchmarks/opt-in hardware checks)Checked for overlap
VICTORY_QUIET_WAITSandcrate::barstat::rbalready onmain)