GPU: opt-in descriptor preflight for indirect calls #3543
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!3543
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3543"
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?
@tharun-37 on GitHub · 2026-11-27 15:56 UTC · original
tharun-37:gpu/indirect-descriptor-preflight→main· +104 −0 · 3 files · 1 commits · openAdds
VICTORY_GPU_INDIRECT_DESCRIPTOR_PREFLIGHT=1, default off. When enabled, an indirect call that has passed its existing drop checks and copied its arguments prepares the descriptor records named by its shader tables before the GPU clamp dispatch.Only the CPU-side record preparation moves. The clamp still runs after the earlier GPU writes, and resource states, copies and root bindings stay in
bindafter the clamp. The switch is read once per process.Tests are synthetic: a placed-texture record left unkept until a table read is made by the preflight helper, and the switch truth table covers unset,
0, and1. No game files, dumps, shader names, hashes or measured performance claims are involved.Verification:
cargo clippy --workspace --all-targets --locked -- -D warningspasses.cargo clippy -p victory-gpu --features diagnostics --all-targets --locked -- -D warningspasses.cargo test -p victory-gpu --features diagnostics switch::tests: 5 passed, 0 failed.cargo test -p victory-gpu --features diagnostics draw::tests::indirect_preflight_makes_a_known_table_record: 1 passed, 0 failed.cargo xtask policy: 191 files ok.victory-gpufailures.Claim: #1633
AI-assisted (OpenCode).
@futurepro62 on GitHub · 2026-11-27 21:07 UTC · original
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
51f4f3a(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 868 passed, 0 failed, 10 ignored.indirect_preflight_makes_a_known_table_record,indirect_preflight_is_default_off.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.