shader: seed POPS collision wave_id, decode f16 inline floats, and exclude root constants as bases #696
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/696"
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 mint17 on 2026-11-28T03:38:22Z.
Ports three shader translation correctness fixes (adapted from
Marvisak/VIctory7ac1f54d83,f3578e386e,88daba427band our mergedTaynanGT/Vice-Tay#229) intocrates/victory-shader:Changes
wave_idseed (Marvisak#2395—emit/lower.rs): Seedspops_collisionSGPR inputs with1 << 16(wave_id = 1,collision_id = 0, overlap bit clear) so inactive lanes leave the wrap-around wait loop on the first pass instead of stalling/TDRing.f16) inline float decoding in wave simulation (Marvisak#2493—emit/lower.rs,emit/wave.rs): Widenslower::inline_f16topub(super)and decodesOperand::Const(240..=248)through it inwave::simulatesov_add_f16does not treat inlinef16float constants as zero identity.Marvisak#2154—resource.rs): ExcludesRootType::ConstantsfromTracer::sumbase classification and checkss.basebefore rejecting two-dynamic-term addresses so root constant dword 0 works as a dynamic offset while 64-bit constant pointers still classify asMEMORY.(No manual cache version bump is needed because
VIctory-NVIDIAhashescrates/victory-shader/src/**automatically inbuild.rs.)Verification
cargo test --locked -p victory-shader -- --test-threads=1(297 passed, 0 failed) +--docpassed, including all four new regression tests:emit::lower::tests::pops_wait_loop_exits_immediately_for_inactive_lanes(WARP draw + DXIL validation)emit::wave::tests::v_add_f16_inline_float_constants_are_not_zero_identityresource::tests::root_constant_zero_offsets_tables_and_root_descriptorsresource::tests::root_constant_zero_offsets_emit_to_dxil--all-features) andcargo test --locked -p xtaskpassed (6 passed, 0 failed, including asset policy & file-size limits).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-28T04:47:40Z.
Review: APPROVED
LGTM — verified on Windows (RTX 5090):
cargo test -p victory-shader --lib resource::(40/40),emit::wave::(10/10, includingv_add_f16_inline_float_constants_are_not_zero_identity), andemit::tests::(22/22) all passedcargo clippy -p victory-shader --lib -- -D warningspassed with 0 warningscargo xtask policypassed (294 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).