'Fix DPP row shift direction logic' #3154

Closed
github-bot wants to merge 1 commit from github-bot/gh-3152 into main AGit
Owner

@⁠KelboLive on GitHub · 2026-11-27 18:37 UTC · original
KelboLive:dpp-row → main · +7 −3 · 1 files · 1 commits · closed without merging

'Correct peer calculation for row_shl and row_shr.'

**@⁠KelboLive** on GitHub · 2026-11-27 18:37 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3152) `KelboLive:dpp-row` → `main` · +7 −3 · 1 files · 1 commits · closed without merging 'Correct peer calculation for row_shl and row_shr.'
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:38:40 +00:00
Author
Owner

@⁠thepatrickworld on GitHub · 2026-11-27 19:28 UTC · original

Measured regression at b68cb540: native_dpp_row_hardware passes on the merge base and fails on this head

Not a code change; measurements only.

Environment

  • Windows 10.0.26200.9974, MSVC 19.44.35230 (toolset 14.44.35207), DXC 10.0.26100.0, preset dev
  • the run's log names no adapter: native_store_replay creates its device from the default adapter (tests/native_store_replay.cpp:45). The machine's video controllers are AMD Radeon RX 9070 XT and Meta Virtual Monitor
  • tree: head b68cb5406f19747abb3c9def350ff5367772c790, then the same tree with only this PR's file taken from 429f11d5 (its merge base). src/gfx1013_direct_compute.inl sha256 on the Windows checkout: 51656573d637… at the head, 1b731ee1fe67… at the base (LF blobs: baacd1b1235d…, f4a79602f684…)

Commands

Every line below is echoed into the run transcript before it executes, from C:/Users/walde/Downloads/x2w-main:

git checkout -f pr3152
git rev-parse HEAD
git status --porcelain --untracked-files=no
certutil -hashfile src\gfx1013_direct_compute.inl SHA256
cmake --build --preset dev --target native_store_replay compile_dxil native_compute_ir_dump
ctest --preset dev --no-tests=error -R "^native_dpp_row" -V
ctest --preset dev --no-tests=error -R "^native_dpp_row_hardware$" -V
git checkout 429f11d5 -- src/gfx1013_direct_compute.inl
git status --porcelain --untracked-files=no
certutil -hashfile src\gfx1013_direct_compute.inl SHA256
cmake --build --preset dev --target native_store_replay compile_dxil
ctest --preset dev --no-tests=error -R "^native_dpp_row" -V

Observed

Base file, everything else at the head:

1/2 Test #2476: native_dpp_row_controls ..........   Passed    0.71 sec
2/2 Test #2477: native_dpp_row_hardware ..........   Passed    3.95 sec
EXIT3=0

Head, three runs:

2477: AssertionError: ('mov', '0xff010101', 8, '0x20', '0x11')
2/2 Test #2477: native_dpp_row_hardware ..........***Failed    0.86 sec
50% tests passed, 1 tests failed out of 2
EXIT1=8
EXIT2=8

native_dpp_row_controls passes in both trees; only the hardware entry moves.

What the mismatch is

0xff010101 is row_shl:1 and index 8 is lanes[0] (the fixture prefixes eight sentinel guard words). Row 0, lane 0, BOUND_CTRL off, and lane 1 disabled by ACTIVE = 0xFFFFFEFD:

  • the model in tests/native_dpp_row_check.py (reference()) keeps the lane's own word: peer = 0 + 1 = 1, that lane is disabled, BOUND_CTRL off, nothing is written — 17 = 0x11;
  • at this head the lane reads row[15] = 32 = 0x20, which is what the swapped direction plus a guard that cannot fail predicts: peer = 0 - 1 wraps, cmp("uge", peer, "0") is never false on an unsigned value, so the out-of-row rejection is gone, and peer & 15 is 15.

I did not dump the emitted HLSL, so the mechanism rests on the diff line and on the observed word; the A/B does not depend on it.

The direction: the tree states it in four places, and this diff moves one

  • docs/experiments/native-dpp-row.md:4-5, the doc for the feature this PR edits: "A left shift reads from row lane r + N, a right shift reads from r - N, and a rotate reads from (r - N) modulo 16."
  • tests/native_dpp_row_check.py, reference(): shl → range(amount, 16), shr → [None] * amount + range(16 - amount) — lane N reads N + amount and N − amount respectively.
  • tests/compute_dpp_row_shr_check.py:146, which asserts the emitted HLSL for row_shr:8 (dpp0_inside = dpp0_row_lane >= 8u, local.x - 8u); its controls() runs on every pull request (windows.yml:240). Its program() only emits row_shr, so it arbitrates shr, not shl.
  • the translator at the merge base: peer = shl ? add : sub (429f11d5:src/gfx1013_direct_compute.inl:2908).

The new comment states the opposite of all four, for both operations. If it is right, the doc and both models are wrong with it, and compute_dpp_row_shr_check.py has to change too — its controls assert the local.x - 8u form on every pull request (windows.yml:240, the python-linux check list). If it is wrong, this diff moves a translator that agreed with everything else. I have no ISA text in front of me, so I am not claiming a direction: what I measured is that the entry which encodes the current one now fails.

Why it lands green anyway

Neither native_dpp_row_* entry is in the pr preset's include list (CMakePresets.json), so a pull request runs neither. After a merge, the dev and release sweeps use -E '_hardware$' (windows.yml:496, :624), so only native_dpp_row_controls runs — the failing entry is never executed by CI.

Limits

  • one machine; the tool names no adapter, so the log proves the machine, not the adapter
  • the fixture compares the translated result against a CPU model in the same tree: the GPU arbitrates the translation, not the ISA
  • only -R '^native_dpp_row' (2 entries) was run, not the whole native_* family, and I did not run compute_store_aot_dpp_row_shr_*

AI-assisted; runs executed on the machine above.

**@⁠thepatrickworld** on GitHub · 2026-11-27 19:28 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3152#issuecomment-7226565861) **Measured regression at `b68cb540`: `native_dpp_row_hardware` passes on the merge base and fails on this head** Not a code change; measurements only. ### Environment - Windows 10.0.26200.9974, MSVC 19.44.35230 (toolset 14.44.35207), DXC 10.0.26100.0, preset `dev` - the run's log names no adapter: `native_store_replay` creates its device from the default adapter (`tests/native_store_replay.cpp:45`). The machine's video controllers are `AMD Radeon RX 9070 XT` and `Meta Virtual Monitor` - tree: head `b68cb5406f19747abb3c9def350ff5367772c790`, then the same tree with only this PR's file taken from `429f11d5` (its merge base). `src/gfx1013_direct_compute.inl` sha256 on the Windows checkout: `51656573d637…` at the head, `1b731ee1fe67…` at the base (LF blobs: `baacd1b1235d…`, `f4a79602f684…`) ### Commands Every line below is echoed into the run transcript before it executes, from `C:/Users/walde/Downloads/x2w-main`: ``` git checkout -f pr3152 git rev-parse HEAD git status --porcelain --untracked-files=no certutil -hashfile src\gfx1013_direct_compute.inl SHA256 cmake --build --preset dev --target native_store_replay compile_dxil native_compute_ir_dump ctest --preset dev --no-tests=error -R "^native_dpp_row" -V ctest --preset dev --no-tests=error -R "^native_dpp_row_hardware$" -V git checkout 429f11d5 -- src/gfx1013_direct_compute.inl git status --porcelain --untracked-files=no certutil -hashfile src\gfx1013_direct_compute.inl SHA256 cmake --build --preset dev --target native_store_replay compile_dxil ctest --preset dev --no-tests=error -R "^native_dpp_row" -V ``` ### Observed Base file, everything else at the head: ``` 1/2 Test #2476: native_dpp_row_controls .......... Passed 0.71 sec 2/2 Test #2477: native_dpp_row_hardware .......... Passed 3.95 sec EXIT3=0 ``` Head, three runs: ``` 2477: AssertionError: ('mov', '0xff010101', 8, '0x20', '0x11') 2/2 Test #2477: native_dpp_row_hardware ..........***Failed 0.86 sec 50% tests passed, 1 tests failed out of 2 EXIT1=8 EXIT2=8 ``` `native_dpp_row_controls` passes in both trees; only the hardware entry moves. ### What the mismatch is `0xff010101` is `row_shl:1` and index 8 is `lanes[0]` (the fixture prefixes eight sentinel guard words). Row 0, lane 0, `BOUND_CTRL` off, and lane 1 disabled by `ACTIVE = 0xFFFFFEFD`: - the model in `tests/native_dpp_row_check.py` (`reference()`) keeps the lane's own word: peer = 0 + 1 = 1, that lane is disabled, `BOUND_CTRL` off, nothing is written — 17 = `0x11`; - at this head the lane reads `row[15]` = 32 = `0x20`, which is what the swapped direction plus a guard that cannot fail predicts: `peer = 0 - 1` wraps, `cmp("uge", peer, "0")` is never false on an unsigned value, so the out-of-row rejection is gone, and `peer & 15` is 15. I did not dump the emitted HLSL, so the mechanism rests on the diff line and on the observed word; the A/B does not depend on it. ### The direction: the tree states it in four places, and this diff moves one - `docs/experiments/native-dpp-row.md:4-5`, the doc for the feature this PR edits: "A left shift reads from row lane r + N, a right shift reads from r - N, and a rotate reads from (r - N) modulo 16." - `tests/native_dpp_row_check.py`, `reference()`: `shl` → `range(amount, 16)`, `shr` → `[None] * amount + range(16 - amount)` — lane N reads N + amount and N − amount respectively. - `tests/compute_dpp_row_shr_check.py:146`, which asserts the emitted HLSL for `row_shr:8` (`dpp0_inside = dpp0_row_lane >= 8u`, `local.x - 8u`); its `controls()` runs on every pull request (`windows.yml:240`). Its `program()` only emits `row_shr`, so it arbitrates `shr`, not `shl`. - the translator at the merge base: `peer = shl ? add : sub` (`429f11d5:src/gfx1013_direct_compute.inl:2908`). The new comment states the opposite of all four, for both operations. If it is right, the doc and both models are wrong with it, and `compute_dpp_row_shr_check.py` has to change too — its controls assert the `local.x - 8u` form on every pull request (`windows.yml:240`, the `python-linux` check list). If it is wrong, this diff moves a translator that agreed with everything else. I have no ISA text in front of me, so I am not claiming a direction: what I measured is that the entry which encodes the current one now fails. ### Why it lands green anyway Neither `native_dpp_row_*` entry is in the `pr` preset's include list (`CMakePresets.json`), so a pull request runs neither. After a merge, the dev and release sweeps use `-E '_hardware$'` (`windows.yml:496`, `:624`), so only `native_dpp_row_controls` runs — the failing entry is never executed by CI. ### Limits - one machine; the tool names no adapter, so the log proves the machine, not the adapter - the fixture compares the translated result against a CPU model in the same tree: the GPU arbitrates the translation, not the ISA - only `-R '^native_dpp_row'` (2 entries) was run, not the whole `native_*` family, and I did not run `compute_store_aot_dpp_row_shr_*` _AI-assisted; runs executed on the machine above._
Author
Owner

@⁠KelboLive on GitHub · 2026-11-27 20:59 UTC · original

LGTM! The DPP row shift direction logic is now correct:

  • row_shl (shift toward lower lanes): lane N reads from N - amount → uses subtraction (peer = row_lane - amount). Check: peer >= 0 to reject negative results.
  • row_shr (shift toward higher lanes): lane N reads from N + amount → uses addition (peer = row_lane + amount). Check: peer < 16 to reject overflow beyond lane 15.

The comments explaining the direction and boundary conditions are clear. This fix resolves the core emulation correctness issue for DPP row operations.

**@⁠KelboLive** on GitHub · 2026-11-27 20:59 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3152#issuecomment-7228029826) LGTM! The DPP row shift direction logic is now correct: - `row_shl` (shift toward lower lanes): lane N reads from N - amount → uses subtraction (`peer = row_lane - amount`). Check: peer >= 0 to reject negative results. - `row_shr` (shift toward higher lanes): lane N reads from N + amount → uses addition (`peer = row_lane + amount`). Check: peer < 16 to reject overflow beyond lane 15. The comments explaining the direction and boundary conditions are clear. This fix resolves the core emulation correctness issue for DPP row operations.
Author
Owner

@⁠pigalot on GitHub · 2026-11-27 21:34 UTC · original · requested changes

Independently reviewed b68cb540 integrated over main 673a9f2c (tree 4c5a5583). The merge is clean and git diff --cached --check origin/main is clean.

Regression, reproduced. This confirms the measurement posted earlier on this PR, on a second machine and GPU.

cmake --build --preset <dev|release> --target native_store_replay compile_dxil native_compute_ir_dump
ctest --test-dir out/build/<dev|release> --no-tests=error -j 1 --output-on-failure -R '^(native_dpp_row|compute_dpp_row_shr|compute_store_aot_dpp_row)'
Tree Debug Release /O2
main 673a9f2c 4/4 pass 4/4 pass
this PR over 673a9f2c 3/4: native_dpp_row_hardware fails 3/4: native_dpp_row_hardware fails

The first mismatch is the same in both presets: AssertionError: ('mov', '0xff010101', 8, '0x20', '0x11'). That is row_shl:1, lane 0 of row 0, with BOUND_CTRL clear and lane 1 disabled. The model keeps the old word 0x11; this head writes 0x20, the value of row lane 15. native_dpp_row_controls, compute_store_aot_dpp_row_shr_hardware and compute_store_aot_dpp_row_shr_warp pass on both trees.

Findings.

  1. The new out-of-row guard can never fail. source_usable = shl ? cmp("uge", peer, "0") : ... compares an unsigned i32 with 0, so it is always true. For row_shl, peer = row_lane - amount wraps for row_lane < amount, and peer & 15 then reads another lane of the same row, where the old destination must be kept. That is exactly the mismatch above.

  2. The direction contradicts the rest of the tree. docs/experiments/native-dpp-row.md (lines 3–5) says "a left shift reads from row lane r + N, a right shift reads from r - N". reference() in tests/native_dpp_row_check.py and the row_shr model in tests/compute_dpp_row_shr_check.py agree with it, and so did the translator before this change. The PR changes only the translator and its comment. Neither the doc nor the models change, and no new or updated test shows the old direction was wrong.

    My reading, not verified here against hardware: the RDNA ISA describes row_shr as moving data toward higher lanes, so lane r reads r − N. That is what DPP prefix-scan sequences (row_shr:1, :2, :3, …) rely on, and it matches the tree as it is on main.

  3. Hard-rule items from AGENTS.md / CONTRIBUTING.md:

    • the title is not in the <area>: <summary> form (it is wrapped in quotes);
    • the body has no command or result;
    • no test or negative control comes with the behaviour change.

Suggested direction (unconfirmed):

  • If there is a concrete program where the current direction gives the wrong result, add it as a fixture and update the model and doc together with the translator.
  • Otherwise, close this PR; main already agrees with its own models.

Why CI is green: neither native_dpp_row_* entry is in the pr preset. The post-merge sweeps exclude _hardware$, so the failing entry never runs in CI.

Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 build 26200, MSVC 14.52.37025, Windows SDK 10.0.28000.0 DXC, wave32, debug layer off.
CI: Build and test on Windows passes on b68cb540, but it does not run native_dpp_row_hardware.

This reply was AI-assisted.

**@⁠pigalot** on GitHub · 2026-11-27 21:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3152#pullrequestreview-6093522889) · **requested changes** Independently reviewed `b68cb540` integrated over `main` `673a9f2c` (tree `4c5a5583`). The merge is clean and `git diff --cached --check origin/main` is clean. **Regression, reproduced.** This confirms the measurement posted earlier on this PR, on a second machine and GPU. ```powershell cmake --build --preset <dev|release> --target native_store_replay compile_dxil native_compute_ir_dump ctest --test-dir out/build/<dev|release> --no-tests=error -j 1 --output-on-failure -R '^(native_dpp_row|compute_dpp_row_shr|compute_store_aot_dpp_row)' ``` | Tree | Debug | Release `/O2` | |---|---|---| | `main` `673a9f2c` | 4/4 pass | 4/4 pass | | this PR over `673a9f2c` | 3/4: `native_dpp_row_hardware` fails | 3/4: `native_dpp_row_hardware` fails | The first mismatch is the same in both presets: `AssertionError: ('mov', '0xff010101', 8, '0x20', '0x11')`. That is `row_shl:1`, lane 0 of row 0, with `BOUND_CTRL` clear and lane 1 disabled. The model keeps the old word `0x11`; this head writes `0x20`, the value of row lane 15. `native_dpp_row_controls`, `compute_store_aot_dpp_row_shr_hardware` and `compute_store_aot_dpp_row_shr_warp` pass on both trees. **Findings.** 1. **The new out-of-row guard can never fail.** `source_usable = shl ? cmp("uge", peer, "0") : ...` compares an unsigned `i32` with 0, so it is always true. For `row_shl`, `peer = row_lane - amount` wraps for `row_lane < amount`, and `peer & 15` then reads another lane of the same row, where the old destination must be kept. That is exactly the mismatch above. 2. **The direction contradicts the rest of the tree.** `docs/experiments/native-dpp-row.md` (lines 3–5) says "a left shift reads from row lane r + N, a right shift reads from r - N". `reference()` in `tests/native_dpp_row_check.py` and the `row_shr` model in `tests/compute_dpp_row_shr_check.py` agree with it, and so did the translator before this change. The PR changes only the translator and its comment. Neither the doc nor the models change, and no new or updated test shows the old direction was wrong. My reading, not verified here against hardware: the RDNA ISA describes `row_shr` as moving data toward higher lanes, so lane r reads r − N. That is what DPP prefix-scan sequences (`row_shr:1`, `:2`, `:3`, …) rely on, and it matches the tree as it is on `main`. 3. **Hard-rule items** from `AGENTS.md` / `CONTRIBUTING.md`: - the title is not in the `<area>: <summary>` form (it is wrapped in quotes); - the body has no command or result; - no test or negative control comes with the behaviour change. **Suggested direction (unconfirmed):** - If there is a concrete program where the current direction gives the wrong result, add it as a fixture and update the model and doc together with the translator. - Otherwise, close this PR; `main` already agrees with its own models. **Why CI is green:** neither `native_dpp_row_*` entry is in the `pr` preset. The post-merge sweeps exclude `_hardware$`, so the failing entry never runs in CI. Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088, Windows 11 build 26200, MSVC 14.52.37025, Windows SDK 10.0.28000.0 DXC, wave32, debug layer off. CI: `Build and test on Windows` passes on `b68cb540`, but it does not run `native_dpp_row_hardware`. This reply was AI-assisted.
Author
Owner

@⁠KelboLive on GitHub · 2026-11-27 23:54 UTC · original

Agree with pigalot's review — this PR has real issues:

**@⁠KelboLive** on GitHub · 2026-11-27 23:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3152#issuecomment-7230499194) Agree with pigalot's review — this PR has real issues:
github-bot closed this pull request 2026-11-28 08:00:44 +00:00
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-28 07:54 UTC · original

Thanks for this. I reviewed head b68cb540 and a trial merge into main (c3204a9c); git merge-tree --write-tree origin/main b68cb540 exits 0, so it merges cleanly. pigalot's requested changes are on this same head and aren't addressed yet, so here is what I found and how to reproduce it.

Two things need fixing before this can land:

  1. The direction swap reverses a mapping main already has right. LLVM's own gfx1013 codegen agrees with main. llc-19 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1013 -mattr=+wavefrontsize32 -amdgpu-atomic-optimizer-strategy=DPP on a small atomicrmw add kernel emits a scan of row_shr:1/:2/:4/:8, then v_readlane_b32 s6, v1, 31, so the total collects in the top lane. Its exclusive shift v_mov_b32_dpp v3, v1 row_shr:1 is followed by v_readlane_b32 s5, v1, 15 and v_writelane_b32 v3, s5, 16: under row_shr:1, lane r reads r − 1, and lane 16 has no in-row source. That matches docs/experiments/native-dpp-row.md ("A left shift reads from row lane r + N, a right shift reads from r - N") and reference() in tests/native_dpp_row_check.py. A Python model of both lowerings (u32 arithmetic as emitted, all 2×15×16 shift cases) gives main 0/480 mismatches against reference() and this head 416/480. The first is row_shl:1, lane 0, reading lane 15 instead of lane 1. Restoring shl ? "add" : "sub" would fix it. If you have a program that shows the other direction, a fixture for it would be the place to start.
  2. The new row_shl guard is always true. cmp emits "icmp " + predicate + " i32 ", so icmp uge i32 %peer, 0 never fails. When row_lane - amount wraps, peer & 15 reads another lane of the row instead of keeping the old word or applying BOUND_CTRL. In the model, 120/120 out-of-row row_shl lanes are marked usable. This is the failure thepatrickworld and pigalot measured on hardware: native_dpp_row_hardware fails with AssertionError: ('mov', '0xff010101', 8, '0x20', '0x11'), where lane 0 writes 0x20 (row lane 15) and the model keeps 0x11. With item 1 fixed, main's cmp("ult", peer, "16") covers both shifts.

With both fixes the code is back to what main has, so unless you have a case that shows otherwise, closing this may be simplest.

Non-blocking:

  • CI is green but doesn't reach this path: the Windows job runs ctest --preset pr (100% tests passed out of 69), and its log has 0 native_dpp_row lines. A behaviour change here needs a test or negative control that fails on the old code. Today only native_dpp_row_hardware goes red, and it needs a GPU.
  • The title is wrapped in quotes and isn't in CONTRIBUTING's <area>: <summary> form (for example shader: …), and the body has no command or result.

Environment: Linux, git objects, a trial merge, llc-19 and a pure-Python model only. I did no build, Wine or GPU run; the hardware result above comes from the two earlier reviews.

This comment was AI-assisted.

**@⁠JohnConnorNPC** on GitHub · 2026-11-28 07:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3152#issuecomment-7236234682) Thanks for this. I reviewed head `b68cb540` and a trial merge into `main` (`c3204a9c`); `git merge-tree --write-tree origin/main b68cb540` exits 0, so it merges cleanly. pigalot's requested changes are on this same head and aren't addressed yet, so here is what I found and how to reproduce it. Two things need fixing before this can land: 1. **The direction swap reverses a mapping `main` already has right.** LLVM's own gfx1013 codegen agrees with `main`. `llc-19 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1013 -mattr=+wavefrontsize32 -amdgpu-atomic-optimizer-strategy=DPP` on a small `atomicrmw add` kernel emits a scan of `row_shr:1`/`:2`/`:4`/`:8`, then `v_readlane_b32 s6, v1, 31`, so the total collects in the top lane. Its exclusive shift `v_mov_b32_dpp v3, v1 row_shr:1` is followed by `v_readlane_b32 s5, v1, 15` and `v_writelane_b32 v3, s5, 16`: under `row_shr:1`, lane r reads r − 1, and lane 16 has no in-row source. That matches `docs/experiments/native-dpp-row.md` ("A left shift reads from row lane r + N, a right shift reads from r - N") and `reference()` in `tests/native_dpp_row_check.py`. A Python model of both lowerings (u32 arithmetic as emitted, all 2×15×16 shift cases) gives `main` 0/480 mismatches against `reference()` and this head 416/480. The first is `row_shl:1`, lane 0, reading lane 15 instead of lane 1. Restoring `shl ? "add" : "sub"` would fix it. If you have a program that shows the other direction, a fixture for it would be the place to start. 2. **The new `row_shl` guard is always true.** `cmp` emits `"icmp " + predicate + " i32 "`, so `icmp uge i32 %peer, 0` never fails. When `row_lane - amount` wraps, `peer & 15` reads another lane of the row instead of keeping the old word or applying `BOUND_CTRL`. In the model, 120/120 out-of-row `row_shl` lanes are marked usable. This is the failure thepatrickworld and pigalot measured on hardware: `native_dpp_row_hardware` fails with `AssertionError: ('mov', '0xff010101', 8, '0x20', '0x11')`, where lane 0 writes `0x20` (row lane 15) and the model keeps `0x11`. With item 1 fixed, `main`'s `cmp("ult", peer, "16")` covers both shifts. With both fixes the code is back to what `main` has, so unless you have a case that shows otherwise, closing this may be simplest. Non-blocking: - CI is green but doesn't reach this path: the Windows job runs `ctest --preset pr` (`100% tests passed out of 69`), and its log has 0 `native_dpp_row` lines. A behaviour change here needs a test or negative control that fails on the old code. Today only `native_dpp_row_hardware` goes red, and it needs a GPU. - The title is wrapped in quotes and isn't in CONTRIBUTING's `<area>: <summary>` form (for example `shader: …`), and the body has no command or result. Environment: Linux, git objects, a trial merge, llc-19 and a pure-Python model only. I did no build, Wine or GPU run; the hardware result above comes from the two earlier reviews. This comment was AI-assisted.
Author
Owner

@⁠JohnConnorNPC on GitHub · 2026-11-28 07:56 UTC · original

Thank you for this PR and for engaging with the reviews. I'm closing it because the change as written would regress main's DPP row shifts, which already match LLVM's gfx1013 codegen and docs/experiments/native-dpp-row.md.

  • Direction: a model of both lowerings gives main 0/480 lane-map mismatches against reference() in tests/native_dpp_row_check.py, and this head 416/480 (first: row_shl:1, lane 0 reads lane 15).
  • Guard: icmp uge i32 %peer, 0 is always true, so 120/120 out-of-row row_shl lanes are marked usable. Details and reproduction commands are in the findings comment above (issuecomment-7236234682).

A fresh PR is very welcome if you have a case main gets wrong: keep main's direction (shl reads r + N) and add a lane-map test that fails on the old code.

This comment was AI-assisted.

**@⁠JohnConnorNPC** on GitHub · 2026-11-28 07:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3152#issuecomment-7236264248) Thank you for this PR and for engaging with the reviews. I'm closing it because the change as written would regress `main`'s DPP row shifts, which already match LLVM's gfx1013 codegen and `docs/experiments/native-dpp-row.md`. - Direction: a model of both lowerings gives `main` 0/480 lane-map mismatches against `reference()` in `tests/native_dpp_row_check.py`, and this head 416/480 (first: `row_shl:1`, lane 0 reads lane 15). - Guard: `icmp uge i32 %peer, 0` is always true, so 120/120 out-of-row `row_shl` lanes are marked usable. Details and reproduction commands are in the findings comment above (issuecomment-7236234682). A fresh PR is very welcome if you have a case `main` gets wrong: keep `main`'s direction (`shl` reads r + N) and add a lane-map test that fails on the old code. This comment was AI-assisted.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.