shader: choose the first-lane half with one select (fixes NVIDIA 595.x 24px tile-sort bars) #1518
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1518"
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 fxceless/victory-fork. Originally posted by faycalbaklouti on 2026-11-28T17:35:32Z.
Problem
When emulating a 64-lane console wave across two 32-lane NVIDIA host waves,
readfirstlane(emit/lower.rs) chooses the lower half's value when the lower half has any lane inEXEC, the upper half's when only the upper half has a lane inEXEC, and the lower half's (lane 0) when neither half does.Previously this was emitted as a nested
select(select(in_lo, lo, select(in_hi, hi, lo))). On NVIDIA driver595.112.07, the DXIL compiler miscompiles that nested select and returns the upper half (hi) even when the lower half has an active lane (in_lo == true). In the title's 80x45 lighting tile-sort pass, the running sum throughreadfirstlanecollapses to a single wave's counts (71 of 1,193 tiles lit), producing severe 24-pixel-tall horizontal orange/amber light bars across hair, faces, and interior walls (620.70.06handles both forms, while595.112.07breaks on the nested select).Solution
selectincrates/victory-shader/src/emit/lower.rswith a singleselectonAnd(Eq(lo_has, 0), Ne(hi_has, 0))(select(upper, hi, lo)), which is semantically identical in all four(lo_has, hi_has)truth-table cases and avoids the NVIDIA595.xDXIL compiler miscompilation.Verification
cargo test -p victory-shader --libpasses with 0 failures on this branch.595.112.07(RTX 5090) and620.70.06across dorm, walk-around, and cafeteria scenes: eliminates 100% of the 24px-row horizontal amber/orange bars on595.112.07with zero regression on620.70.06.About our fork & censorship-resistant preservation effort:
This fix comes from our open-source Linux (GE-Proton) + NVIDIA porting effort (
gta6-vi-port) and censorship-resistant peer-to-peer Radicle archival hub (234+ community porting repos mirrored & seeded on P2P Radicle so community research survives takedowns):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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.