Shaders: track s_add_u32 with src_scc in address high halves #2487
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by fuzeofficlal on 2026-11-29T13:31:38Z.
Summary
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.