Repository navigation
Shaders: keep literal select mask bits when lowering local half-waves - #277
fluffyflattershy-afk wants to merge 1 commit into
Conversation
ErRusso
left a comment
There was a problem hiding this comment.
Reviewed at 6c835cd against 2119b0e.
Verification:
victory-shader --libbuilds forx86_64-pc-windows-gnu.- The new
local_waves_select_their_console_bits_from_a_constant_maskpasses here (the hardware dispatch is skipped because this Wine host has no SM 6.6 device; DXIL validation and lowering still ran). - All six
emit::wave64_testspass under Wine.
The change is correct: a local half-wave can select bits from a literal 64-bit mask because both host waves see the same constants and lane_bit relabels each wave's lanes through console_lane(). Computed masks still take the refusal path, and the condition requires both halves to be literal, so a partially computed wave64 mask is still rejected. self.exchange.is_some() is redundant with self.local, but harmless.
Non-blocking: add a negative test that a computed mask (or a mask with only one literal half) is still refused in a local half-wave. That would lock in the boundary the new condition draws.
LGTM.
…lib_rs + CBV clamp
|
RX 7900 XTX (RDNA3), Windows 10 + #402 for SM 6.6, main |
Change
A
v_cndmask_b32using a literal 64-bit scalar mask was refused in local half-wave lowering. When console lanes are already mapped, both host waves can use the literal and select the bit at their console lane index. This select requires no group exchange. Computed mask pairs still use the existing refusal.Verification
emit::wave64_testspassed.cargo clippy --locked --offline -p victory-shader --all-targets -- -D warningsandcargo xtask policypassed.AI-assisted with Codex. The test uses only synthetic inputs.