shader/lower: take mask lane bit by console lane in halves mode #33
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/33"
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 Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T10:04:27Z.
Summary
Port rustno1-coder/VIctory-NVIDIA c1d8179 (Shaders: take a mask's lane bit by console lane in halves mode):
Rig Specs Tested On
Run Settings & Profile
elease @ $sha (static/lowering + D3D12 hardware wave64_tests on RTX 4060 Ti + CI full workspace suite; no separate live game capture for this targeted halves-mode lane-index bugfix)
Measurements & Verification
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T11:03:46Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
The fix is minimal, well-targeted, and logically sound:
crates/victory-shader/src/emit/lower.rs:Lower::console_lanepreviously fell back toself.lane_index()wheneverself.exchange.is_none(), even whenself.halves.is_some()(console wave64 lowered as two 32-lane host waves). BecauseLower::wave_basealready supportsself.halves.or(self.ticket)andLower::console_threaduses it to compute the relabelled console thread index (base + rank), gating the fallback onself.exchange.is_none() && self.halves.is_none()ensuresconsole_lane()returnsconsole_thread() & 63(0..63) in halves mode as well.Lower::lane_bitnow checksself.exchange.is_some() || self.halves.is_some()so lanes 32–63 select thehimask dword (lane < 32false) and shift bylane & 31(lane - 32), instead of erroneously indexinglowith their 0–31 host lane index.crates/victory-shader/src/emit/wave64_tests.rs:dispatched_wordsfromdispatchedand addslanes_past_32_take_the_high_dword_of_a_mask_held_as_a_number, which exercisesv_cndmask_b32with an untracked 64-bit mask in halves mode (lowered_on(..., 32)) across all 64 lanes.Local GPU Verification Needed
CI is passing, but
wave64_testsskips the D3D12 hardware dispatch when no SM 6.6 device is present. Because this modifies shader lowering for 32-lane host waves, please confirm the new hardware test runs and passes locally on a real GPU before merging.Generated with Antigravity CLI (
agy).