Shaders: track s_add_u32 with src_scc in address high halves #2487
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!2487
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2487"
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:31 UTC · original
fuzeofficlal:fix/shader-add-scc-carry-high-half→main· +294 −7 · 3 files · 1 commits · merged 2026-11-30 14:12 UTCSummary
Tracks
s_add_u32(and zero-high-bases_mov_b32) readingsrc_scc(Operand::Const(253)) in 64-bit address high halves (Tracer::high_halfandTracer::carriedincrates/victory-shader/src/resource.rs), and removessccfromLower::operand's unsupported special-operand message (crates/victory-shader/src/emit/lower.rs, which already lowersOperand::Const(253)viascc_in).When shaders propagate the low-half carry of a 64-bit table/heap, root-descriptor, or
s_getpc_b64address usings_add_u32 hi, base_hi, src_sccors_mov_b32 hi, src_sccinstead ofs_addc_u32, resource tracking previously rejected the address with"an address with an untracked high half".Details
Tracer::add_sccverifiesinst.writes.first()?.1 == vandinst.read(Reg::Scc).is_some(), returning the non-carry termxfors_add_u32 v, x, src_scc/s_add_u32 v, src_scc, xandTerm::Const(0)fors_mov_b32 v, src_scc.Tracer::high_halfacceptsself.add_scc(v) == Some(want)alongsides_addc_u32, while rejectings_mov_b32 hi, src_sccwhenbase_hiis non-zero.Tracer::carriedrecurses throughadd_sccalongsides_addc_u32.Verification
cargo test --locked -p victory-shader --lib resource::tests— all pass (includingadd_scc_carries_into_address_high_halves).cargo test --locked -p victory-shader --lib emit::valu_tests::add_scc_carry_in_table_and_code_addresses_runs_on_host— 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.