compute: lower DPP8 sources in the direct compute path #3236

Merged
Leyukaka merged 1 commit from upstream-pr/3236 into main 2026-11-28 01:25:22 +00:00
Leyukaka commented 2026-11-28 00:54:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T00:54:39Z.


Fixes #3235. Part of #2935. Target branch main.

Change (src/gfx1013_compute_native.cpp, src/gfx1013_direct_compute.inl): direct compute accepts DPP8 sources (src0 233, and 234 with FI) on the VOP1/VOP2 operations its DPP16 path accepts.

  • Lane L reads src0 from lane (L & ~7) | sel[L & 7] with waveReadLaneAt, within the 32-lane wave, or within the physical half of a split wave64.
  • An inactive source lane reads zero unless FI is set. DPP8 has no BOUND_CTRL. This zero is the assumed rule, checked only against the test's CPU model.
  • Binary16 operations still refuse DPP8. The f16 refusal control in tests/native_f16_alu_check.py now expects "unsupported v_add_f16 DPP form" instead of the generic message. The case stays refused.

Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, Release, on main 38129ba3 plus this commit.

  • New native_dpp8_hardware (wave32 requests, two groups, eight guard words) reads back against a CPU reference:
    • v_min, v_add and v_max with the [4,5,6,7,0,1,2,3] swap;
    • a move with an asymmetric pattern;
    • sparse-EXEC v_add with and without FI, and sparse-EXEC v_min without FI.
  • 41 tests pass with -R "dpp|native_f16|native_sdwa_f16|native_fma_f16|native_direct_container|native_wave|native_permlane".
  • The test covers wave32 only. The wave64 split path uses the same per-half selection, but no wave64 readback covers it here.

Measured with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests, on main 38129ba3 and with this commit.

  • Local capture of 2,689 requests: 487 to 498 compile.
  • Requests of one start-up run: 500 to 511.
  • The 882 requests of #3224: 110 to 113.
  • No regressions.
  • All affected capture requests are wave64, which main compiles with the wave32 model until #3006. The DPP8 selection itself stays inside groups of eight lanes.
  • Counts and instruction shape only.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5535122850 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3236). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T00:54:39Z. --- Fixes #3235. Part of #2935. Target branch `main`. **Change** (`src/gfx1013_compute_native.cpp`, `src/gfx1013_direct_compute.inl`): direct compute accepts DPP8 sources (src0 233, and 234 with FI) on the VOP1/VOP2 operations its DPP16 path accepts. - Lane L reads src0 from lane `(L & ~7) | sel[L & 7]` with `waveReadLaneAt`, within the 32-lane wave, or within the physical half of a split wave64. - An inactive source lane reads zero unless FI is set. DPP8 has no BOUND_CTRL. This zero is the assumed rule, checked only against the test's CPU model. - Binary16 operations still refuse DPP8. The f16 refusal control in `tests/native_f16_alu_check.py` now expects "unsupported v_add_f16 DPP form" instead of the generic message. The case stays refused. **Tests.** The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, Release, on `main` `38129ba3` plus this commit. - New `native_dpp8_hardware` (wave32 requests, two groups, eight guard words) reads back against a CPU reference: - `v_min`, `v_add` and `v_max` with the `[4,5,6,7,0,1,2,3]` swap; - a move with an asymmetric pattern; - sparse-EXEC `v_add` with and without FI, and sparse-EXEC `v_min` without FI. - 41 tests pass with `-R "dpp|native_f16|native_sdwa_f16|native_fma_f16|native_direct_container|native_wave|native_permlane"`. - The test covers wave32 only. The wave64 split path uses the same per-half selection, but no wave64 readback covers it here. **Measured** with `compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests`, on `main` `38129ba3` and with this commit. - Local capture of 2,689 requests: 487 to 498 compile. - Requests of one start-up run: 500 to 511. - The 882 requests of #3224: 110 to 113. - No regressions. - All affected capture requests are wave64, which `main` compiles with the wave32 model until #3006. The DPP8 selection itself stays inside groups of eight lanes. - Counts and instruction shape only. AI-assisted.
R0Y00 commented 2026-11-28 01:25:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T01:25:18Z.

Review: APPROVED


Independent review of 2cd0089117 on main e3633742, tree 94bcbe0cf6. The eight-lane selector remains within one physical wave32. The FI behavior agrees with LLVM's AMDGPU DPP8 modifier reference. Binary16 remains refused.

Debug and Release /O2 each passed eight selected wave32, DPP16, SDWA and slot-67 checks with no skips. I independently repeated the seven DPP8 cases with source-built 64-thread groups, the slot-67 wave bit clear, distinct input words per lane and different low/high EXEC masks. Each case matched 128 result words and all guards in both configurations. The inactive-source zero and FI cases used 0x55555555 and 0xaa55cc33 in the two halves, so using the wrong EXEC half would fail. Windows 11 26200.9974, RTX 4060 Laptop 32.0.16.1656. These desktop readbacks exercise split guest wave64. They do not constitute console measurement.

ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^(native_dpp(8|_mirror|_row|_quad)_hardware|native_f16_alu_ir|native_slot67_wave_size_hardware|native_sdwa_f16_(ir|hardware))$'
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6094888309 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3236#pullrequestreview-6094888309). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-28T01:25:18Z. **Review:** APPROVED --- Independent review of 2cd00891174b5195a9b4e8644e60c41764ba8a8f on main e3633742, tree 94bcbe0cf6a787b701e13706eb97ef039eb3d351. The eight-lane selector remains within one physical wave32. The FI behavior agrees with [LLVM's AMDGPU DPP8 modifier reference](https://llvm.org/docs/AMDGPUModifierSyntax.html#dpp8-modifiers). Binary16 remains refused. Debug and Release /O2 each passed eight selected wave32, DPP16, SDWA and slot-67 checks with no skips. I independently repeated the seven DPP8 cases with source-built 64-thread groups, the slot-67 wave bit clear, distinct input words per lane and different low/high EXEC masks. Each case matched 128 result words and all guards in both configurations. The inactive-source zero and FI cases used 0x55555555 and 0xaa55cc33 in the two halves, so using the wrong EXEC half would fail. Windows 11 26200.9974, RTX 4060 Laptop 32.0.16.1656. These desktop readbacks exercise split guest wave64. They do not constitute console measurement. ```powershell ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^(native_dpp(8|_mirror|_row|_quad)_hardware|native_f16_alu_ir|native_slot67_wave_size_hardware|native_sdwa_f16_(ir|hardware))$' ```
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
R0Y00/Xbox2Windows!3236
No description provided.