Shaders: require EXEC coverage when tracing VALU address operands #2497
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!2497
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2497"
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?
@fuzeofficlal on GitHub · 2026-11-29 13:39 UTC · original
fuzeofficlal:fix/shader-resource-guarded-valu-address→main· +381 −51 · 2 files · 1 commits · merged 2026-11-30 14:12 UTCProblem
In
crates/victory-shader/src/resource.rs,Tracer::lane_valuealready callsTracer::runs(site, known)to verify that every lane reaching a consumer actually executed each guarded VALU write. However,vorigin,vadd,carried(v_add_co_ci_u32),lane_term, andsumfollowed guardedv_mov_b32/v_add_co_u32/v_add_nc_u32/v_add_co_ci_u32definitions without checkinglanes.guards.When a shader updates a VGPR offset (or high-half address carry) under narrowed
EXEC(e.g.v_cmp_*+s_and_saveexec_b32), restoresEXEC, and executes aglobal_load_*/global_store_*/global_atomic_*:flat_addressfolded the guarded add/move into a staticAddress::offsetfor every lane, so lanes skipped whileEXEC == 0silently read or wrote at the wrong offset.v_add_co_ci_u32high-half carry afterEXECrestore was still attributed to the root parameter.Changes
Tracer::site_knownandTracer::runs_valueincrates/victory-shader/src/resource.rs, threading lane conditions (known: &[(Bool, bool)]) throughvorigin,vterm,vadd,sum,code_join,code_base,carried,flat_address,address,smem_address,lane_term,fetched, andwaterfall.crates/victory-shader/src/resource.rs(a_guarded_move_is_folded_only_for_lanes_that_run_it,guarded_add_folds_inside_guard_and_stays_dynamic_after_restore,a_guarded_high_half_carry_requires_exec_coverage) and an end-to-end GPU test incrates/victory-shader/src/emit/valu_tests.rs(global_loads_keep_each_lanes_offset_after_exec_is_restored).Verification
cargo test --locked -p victory-shader --lib resource::tests— all pass.cargo test --locked -p victory-shader --lib emit::valu_tests::global_loads_keep_each_lanes_offset_after_exec_is_restored -- --exact— pass on RTX 5090 (VICTORY_ADAPTER=NVIDIA), WARP, anddxil.dll.cargo clippy --locked -p victory-shader --all-targets— 0 new warnings in touched files.cargo run --quiet --locked -p xtask -- policy --staged— pass.