Preserve opposite-row lane reads on Wave32 #340

Closed
Kamiloj9 wants to merge 1 commit from upstream-pr/340 into main
Kamiloj9 commented 2026-11-24 23:37:15 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Kamiloj9 on 2026-11-24T23:37:15Z.


Change

  • Lower the zero-selector form of v_permlanex16_b32 to an opposite-row lane read within each 32-lane half. Require full guest EXEC and proven lane participation before emitting the read.
  • Check the flags and source mask before simulating the operation in the existing whole-wave reduction path.
  • Cover the lowering and refusal cases on CPU, and read back all 64 lane results on Wave32 hardware.

Verification

  • The captured CS_WaterTransmittanceOpticalDepthProcessing compute shader emits WaveSize(32), passes the DXIL validator and creates a D3D12 compute PSO. The strict replay uses VICTORY_WAVE_LOCAL=idiom.
  • The synthetic GPU dispatch returned the expected values for all 64 lanes on an RTX 4080 SUPER.
  • The integrated diagnostic build created the compute PSO in the title and reached the first 3D scene. The run later hit the existing Windows commit exhaustion.
  • Targeted lowering and symbolic wave tests, Clippy, and the staged asset policy check passed.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6593632895 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/340). Originally posted by [Kamiloj9](https://github.com/Kamiloj9) on 2026-11-24T23:37:15Z. --- ## Change - Lower the zero-selector form of `v_permlanex16_b32` to an opposite-row lane read within each 32-lane half. Require full guest EXEC and proven lane participation before emitting the read. - Check the flags and source mask before simulating the operation in the existing whole-wave reduction path. - Cover the lowering and refusal cases on CPU, and read back all 64 lane results on Wave32 hardware. ## Verification - The captured `CS_WaterTransmittanceOpticalDepthProcessing` compute shader emits WaveSize(32), passes the DXIL validator and creates a D3D12 compute PSO. The strict replay uses `VICTORY_WAVE_LOCAL=idiom`. - The synthetic GPU dispatch returned the expected values for all 64 lanes on an RTX 4080 SUPER. - The integrated diagnostic build created the compute PSO in the title and reached the first 3D scene. The run later hit the existing Windows commit exhaustion. - Targeted lowering and symbolic wave tests, Clippy, and the staged asset policy check passed.
HAL9000RELOADED commented 2026-11-25 20:09:26 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HAL9000RELOADED on 2026-11-25T19:29:31Z.


Merged on current main d510ee4 (+ #402 for SM 6.6 on Windows 10), RX 7900 XTX. The three new tests pass, and the hardware one fails without the fix. But main's emit::valu_tests::v_permlane16_and_x16_read_the_lanes_their_selectors_pick now fails, at translation:

lower: Unsupported { offset: 48, what: "unsupported opposite-row permutation controls" }

That test passes on main. It came in with 31714de, after this PR's base 2119b0e, along with main's general permlane lowering. The merge is textually clean, but the new opposite-row path now refuses controls that main translates. Since it fails at translation rather than on the GPU, it should fail on any host. Table of the run: #129 (https://github.com/fxceless/victory-fork/pull/129#issuecomment-7172358511).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7172370995 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/340#issuecomment-7172370995). Originally posted by [HAL9000RELOADED](https://github.com/HAL9000RELOADED) on 2026-11-25T19:29:31Z. --- Merged on current `main` `d510ee4` (+ #402 for SM 6.6 on Windows 10), RX 7900 XTX. The three new tests pass, and the hardware one fails without the fix. But main's `emit::valu_tests::v_permlane16_and_x16_read_the_lanes_their_selectors_pick` now fails, at translation: ``` lower: Unsupported { offset: 48, what: "unsupported opposite-row permutation controls" } ``` That test passes on main. It came in with `31714de`, after this PR's base `2119b0e`, along with main's general permlane lowering. The merge is textually clean, but the new opposite-row path now refuses controls that main translates. Since it fails at translation rather than on the GPU, it should fail on any host. Table of the run: #129 (https://github.com/fxceless/victory-fork/pull/129#issuecomment-7172358511).
upstream-sync closed this pull request 2026-11-26 01:05:53 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!340
No description provided.