Recompiler: 16-bit compares read their low halves whatever op_sel says (#1293) #1286

Open
tiagonogueiraa-bit wants to merge 1 commit from upstream-pr/1296 into main
tiagonogueiraa-bit commented 2026-11-24 14:27:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T14:27:28Z.


On RDNA2, 16-bit compares (v_cmp_* / v_cmpx_* over f16, u16, i16) take both sources from the low halves and ignore op_sel. This was measured on gfx1036 in Marvisak/VIctory#833. vopc honoured op_sel, so op_sel:[1,0] on 0x4000_3C00 < 0x3C00_3E00 compared 2.0 < 1.5 instead of 1.0 < 1.5. v_cmp_class_f16 was not measured and keeps op_sel, as the issue suggests. Fixes #1293.

What is in it

  • crates/xcl/src/gpu/recomp/emit.rs (vopc): the 16-bit halves come from the low 16 bits except for class.
  • crates/xcl/src/gpu/recomp/tests.rs: gpu_cmp_16_ignores_op_sel, one f16, u16 and i16 compare each, with op_sel set and high halves that give the opposite answer.

Tested

  • macOS, Rust stable: cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc passes with no errors (C stubbed, not linked).
  • On the CPU, not a GPU: I translated the test's program with gpu::recomp from main and from this branch and ran the emitted HLSL as C++ on one lane with the test's registers. On main all four compares are false, so the test fails. With this change all four are true.
  • GPU runs by others on this head 8b247b0:
    • @vitor127wt (RTX 5070 Ti, Wine + vkd3d-proton): gpu_cmp_16_ignores_op_sel passes in the workspace suite and run on its own. The suite's failures under Wine are also failures on the base 930e8b4. (report)
    • @DavidM1911 (RTX 3060 Ti, Windows 11, merged with main): cargo test -p xcl --lib recomp, 190 passed, 0 failed, 18 ignored. (report)
      Later, the whole lib with --test-threads=1: all passed, 0 failed, 21 ignored. (report)
  • @ySKELLETONX (AMD RX 7600 XT, RDNA3, native Windows 11): scripts/test.ps1 752 passed, 0 failed, 41 ignored, no SKIPPED. With the emit.rs change reverted, gpu_cmp_16_ignores_op_sel fails at wave64 v_cmp_lt_f16 op_sel:[1,0]. (report)

Regression run
By @IvyNotFound: scripts/smoke.ps1 -Seconds 60, XCL_PRESS_A_AT=15, unedited, from the report.

main:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 60
exit: 0x0
frames shown: 1331 (PresentX 1332)
presents per 2 s (last 3): 19 43 38
device removals: 0
crashes: 0
peak commit: 26748 MB

PR:

xcl-smoke v1
commit: 8b247b0f1068fcca07b0752a46ffea160f83b46d
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 60
exit: 0x0
frames shown: 1320 (PresentX 1320)
presents per 2 s (last 3): 8 22 47
device removals: 0
crashes: 0
peak commit: 26630 MB

Not tested

  • AMD / native wave64.
  • A retail title. Its shaders have no 16-bit compare with op_sel set (#1293), so this path is not reached there.

AI use

  • Claude Code with Claude Opus 5.5. It wrote the change, the test and this description, and ran the macOS checks above.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5474060247 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T14:27:28Z. --- On RDNA2, 16-bit compares (`v_cmp_*` / `v_cmpx_*` over f16, u16, i16) take both sources from the low halves and ignore `op_sel`. This was measured on gfx1036 in Marvisak/VIctory#833. `vopc` honoured `op_sel`, so `op_sel:[1,0]` on `0x4000_3C00 < 0x3C00_3E00` compared 2.0 < 1.5 instead of 1.0 < 1.5. `v_cmp_class_f16` was not measured and keeps `op_sel`, as the issue suggests. Fixes #1293. **What is in it** - `crates/xcl/src/gpu/recomp/emit.rs` (`vopc`): the 16-bit halves come from the low 16 bits except for `class`. - `crates/xcl/src/gpu/recomp/tests.rs`: `gpu_cmp_16_ignores_op_sel`, one f16, u16 and i16 compare each, with `op_sel` set and high halves that give the opposite answer. **Tested** - macOS, Rust stable: `cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc` passes with no errors (C stubbed, not linked). - On the CPU, not a GPU: I translated the test's program with `gpu::recomp` from `main` and from this branch and ran the emitted HLSL as C++ on one lane with the test's registers. On `main` all four compares are false, so the test fails. With this change all four are true. - GPU runs by others on this head `8b247b0`: - @vitor127wt (RTX 5070 Ti, Wine + vkd3d-proton): `gpu_cmp_16_ignores_op_sel` passes in the workspace suite and run on its own. The suite's failures under Wine are also failures on the base `930e8b4`. ([report](https://github.com/ivall/xcl/pull/1296#issuecomment-7135218840)) - @DavidM1911 (RTX 3060 Ti, Windows 11, merged with `main`): `cargo test -p xcl --lib recomp`, 190 passed, 0 failed, 18 ignored. ([report](https://github.com/ivall/xcl/pull/1296#issuecomment-7134571514)) Later, the whole lib with `--test-threads=1`: all passed, 0 failed, 21 ignored. ([report](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7137012475)) - @ySKELLETONX (AMD RX 7600 XT, RDNA3, native Windows 11): `scripts/test.ps1` **752 passed, 0 failed, 41 ignored**, no `SKIPPED`. With the `emit.rs` change reverted, `gpu_cmp_16_ignores_op_sel` fails at `wave64 v_cmp_lt_f16 op_sel:[1,0]`. ([report](https://github.com/ivall/xcl/pull/1296#issuecomment-7135593421)) **Regression run** By @IvyNotFound: `scripts/smoke.ps1 -Seconds 60`, `XCL_PRESS_A_AT=15`, unedited, from [the report](https://github.com/ivall/xcl/pull/1296#issuecomment-7135932971). main: ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: NVIDIA GeForce RTX 5080 title: game seconds: 60 exit: 0x0 frames shown: 1331 (PresentX 1332) presents per 2 s (last 3): 19 43 38 device removals: 0 crashes: 0 peak commit: 26748 MB ``` PR: ``` xcl-smoke v1 commit: 8b247b0f1068fcca07b0752a46ffea160f83b46d gpu: NVIDIA GeForce RTX 5080 title: game seconds: 60 exit: 0x0 frames shown: 1320 (PresentX 1320) presents per 2 s (last 3): 8 22 47 device removals: 0 crashes: 0 peak commit: 26630 MB ``` **Not tested** - AMD / native wave64. - A retail title. Its shaders have no 16-bit compare with `op_sel` set (#1293), so this path is not reached there. **AI use** - Claude Code with Claude Opus 5.5. It wrote the change, the test and this description, and ran the macOS checks above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DavidM1911 commented 2026-11-24 15:05:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T14:33:29Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib lib recomp: 190 passed, 18 ignored, 0 failed.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7134571514 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7134571514). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T14:33:29Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - cargo test -p xcl --lib lib recomp: 190 passed, 18 ignored, 0 failed. Thanks!
tiagonogueiraa-bit commented 2026-11-24 15:05:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T14:34:13Z.


@DavidM1911 thank you! Two details would make this count for the merge:

  • the commit you tested: the head is 8b247b0. Which main commit was it merged with?
  • that gpu::recomp::tests::gpu_cmp_16_ignores_op_sel actually ran on the GPU rather than printing SKIPPED. Running cargo test -p xcl --lib gpu_cmp_16_ignores_op_sel -- --nocapture shows it.

If you get the chance, the whole suite (cargo test --workspace -- --test-threads=4, with its counts) is what CONTRIBUTING asks for.

Written with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7134591202 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7134591202). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T14:34:13Z. --- @DavidM1911 thank you! Two details would make this count for the merge: - the commit you tested: the head is `8b247b0`. Which `main` commit was it merged with? - that `gpu::recomp::tests::gpu_cmp_16_ignores_op_sel` actually ran on the GPU rather than printing `SKIPPED`. Running `cargo test -p xcl --lib gpu_cmp_16_ignores_op_sel -- --nocapture` shows it. If you get the chance, the whole suite (`cargo test --workspace -- --test-threads=4`, with its counts) is what CONTRIBUTING asks for. Written with Claude Code (Claude Opus 5.5).
vitor127wt commented 2026-11-24 15:06:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vitor127wt on 2026-11-24T14:57:15Z.


Test report on RTX 5070 Ti under Wine

Following up on #1243. I tested the exact PR head 8b247b0f1068fcca07b0752a46ffea160f83b46d in a separate checkout and build directory. gpu::recomp::tests::gpu_cmp_16_ignores_op_sel passed in the workspace suite and in an isolated rerun with --exact gpu::recomp::tests::gpu_cmp_16_ignores_op_sel --nocapture --test-threads=1 (1 passed, 0 failed, 0 ignored, 0 skipped). The test log confirmed the RTX 5070 Ti and DXC were in use.

Tested

  • RTX 5070 Ti (16,303 MiB reported), NVIDIA Linux driver 620.73.04, Ryzen 7 9700X, 32 GB DDR5. CachyOS x86-64, kernel 7.3.5-2-cachyos, Wine 11.22, DXVK v2.7.1-498-ga6764047e587178, vkd3d-proton 3.1.0 from Proton-CachyOS (0bb64c56c8f0dcc), DXC 1.9.2609.5. Rust 1.100.0 and cargo-xwin 0.24.1, Windows MSVC debug target.
  • cargo xwin build --offline --locked --target x86_64-pc-windows-msvc --workspace succeeded. cargo xwin test --offline --locked --target x86_64-pc-windows-msvc --workspace --no-fail-fast -- --test-threads=4 ran under Wine and reported 686 passed, 66 failed, 41 ignored (exit 101). Four capability skips are included in the harness's passed count and listed below.
  • The same test command on the common base 930e8b49c1c2ec683d22c724a398b39111cd0e56 reported 683 passed, 68 failed, 41 ignored, with the same four skips. All 66 failure names from the PR also appeared on the base. The two additional base failures were gpu_nonfused_mad_and_mac_prevent_fma_contraction (device removed) and never_picks_xcl_itself (file copy error). The baseline build used an on-disk target directory after a linker error on tmpfs.
SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
SKIPPED gpu::texture::tests::gpu_console_textures_upload_every_mip_and_slice: no GPU
SKIPPED gpu::texture::tests::gpu_upload_batches_reuse_the_queues_upload_buffer: no GPU

Not tested

Native Windows, AMD hardware and retail-title smoke runs. Retail sample environment variables were unset.

AI use

Codex (GPT-6, exact variant unavailable) cross-built and ran the tests, compared the failure lists and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7135218840 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7135218840). Originally posted by [vitor127wt](https://github.com/vitor127wt) on 2026-11-24T14:57:15Z. --- **Test report on RTX 5070 Ti under Wine** Following up on #1243. I tested the exact PR head `8b247b0f1068fcca07b0752a46ffea160f83b46d` in a separate checkout and build directory. `gpu::recomp::tests::gpu_cmp_16_ignores_op_sel` passed in the workspace suite and in an isolated rerun with `--exact gpu::recomp::tests::gpu_cmp_16_ignores_op_sel --nocapture --test-threads=1` (1 passed, 0 failed, 0 ignored, 0 skipped). The test log confirmed the RTX 5070 Ti and DXC were in use. **Tested** - RTX 5070 Ti (16,303 MiB reported), NVIDIA Linux driver 620.73.04, Ryzen 7 9700X, 32 GB DDR5. CachyOS x86-64, kernel `7.3.5-2-cachyos`, Wine 11.22, DXVK `v2.7.1-498-ga6764047e587178`, vkd3d-proton 3.1.0 from Proton-CachyOS (`0bb64c56c8f0dcc`), DXC 1.9.2609.5. Rust 1.100.0 and cargo-xwin 0.24.1, Windows MSVC debug target. - `cargo xwin build --offline --locked --target x86_64-pc-windows-msvc --workspace` succeeded. `cargo xwin test --offline --locked --target x86_64-pc-windows-msvc --workspace --no-fail-fast -- --test-threads=4` ran under Wine and reported **686 passed, 66 failed, 41 ignored** (exit 101). Four capability skips are included in the harness's passed count and listed below. - The same test command on the common base `930e8b49c1c2ec683d22c724a398b39111cd0e56` reported **683 passed, 68 failed, 41 ignored**, with the same four skips. All 66 failure names from the PR also appeared on the base. The two additional base failures were `gpu_nonfused_mad_and_mac_prevent_fma_contraction` (device removed) and `never_picks_xcl_itself` (file copy error). The baseline build used an on-disk target directory after a linker error on tmpfs. ```text SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64 SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64 SKIPPED gpu::texture::tests::gpu_console_textures_upload_every_mip_and_slice: no GPU SKIPPED gpu::texture::tests::gpu_upload_batches_reuse_the_queues_upload_buffer: no GPU ``` **Not tested** Native Windows, AMD hardware and retail-title smoke runs. Retail sample environment variables were unset. **AI use** Codex (GPT-6, exact variant unavailable) cross-built and ran the tests, compared the failure lists and drafted this report.
tiagonogueiraa-bit commented 2026-11-24 15:06:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T14:59:09Z.


Thank you, @vitor127wt! I added your run to Tested and marked the PR ready for review.

Written with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7135270619 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7135270619). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T14:59:09Z. --- Thank you, @vitor127wt! I added your run to **Tested** and marked the PR ready for review. Written with Claude Code (Claude Opus 5.5).
ySKELLETONX commented 2026-11-24 16:06:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ySKELLETONX on 2026-11-24T15:10:56Z.


Test report on head 8b247b0 (asked for in #1243). AI-written (Claude Code, Claude Opus 5.5) from real runs; checked by me.

Tested

  • AMD Radeon RX 7600 XT (RDNA3, driver 32.0.32015.2008), Ryzen 7 5700X3D, Windows 11 Pro 10.0.26300, rustc 1.100.0, debug build, DXC from Windows SDK 10.0.26100
  • scripts/test.ps1 (cargo test --workspace -- --test-threads=4): 752 passed, 0 failed, 41 ignored; no SKIPPED lines
  • gpu::recomp::tests::gpu_cmp_16_ignores_op_sel: ok
  • With this PR's emit.rs change reverted (test kept, base 930e8b4): gpu_cmp_16_ignores_op_sel fails at tests.rs:7195 (wave64 v_cmp_lt_f16 op_sel:[1,0]), so the test catches the change.

Not tested

  • The hardware behaviour itself: the runner checks the translation on the host GPU, so this run does not confirm the gfx1036 measurement.
  • NVIDIA, WARP, any retail title (no smoke runs).
<!-- greyfinch-sync:ivall/xcl:comment:7135593421 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7135593421). Originally posted by [ySKELLETONX](https://github.com/ySKELLETONX) on 2026-11-24T15:10:56Z. --- Test report on head `8b247b0` (asked for in #1243). AI-written (Claude Code, Claude Opus 5.5) from real runs; checked by me. **Tested** - AMD Radeon RX 7600 XT (RDNA3, driver 32.0.32015.2008), Ryzen 7 5700X3D, Windows 11 Pro 10.0.26300, rustc 1.100.0, debug build, DXC from Windows SDK 10.0.26100 - `scripts/test.ps1` (`cargo test --workspace -- --test-threads=4`): 752 passed, 0 failed, 41 ignored; no `SKIPPED` lines - `gpu::recomp::tests::gpu_cmp_16_ignores_op_sel`: ok - With this PR's `emit.rs` change reverted (test kept, base 930e8b4): `gpu_cmp_16_ignores_op_sel` fails at tests.rs:7195 (`wave64 v_cmp_lt_f16 op_sel:[1,0]`), so the test catches the change. **Not tested** - The hardware behaviour itself: the runner checks the translation on the host GPU, so this run does not confirm the gfx1036 measurement. - NVIDIA, WARP, any retail title (no smoke runs).
tiagonogueiraa-bit commented 2026-11-24 16:06:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T15:13:22Z.


Thank you, @ySKELLETONX: the native Windows suite plus the revert check is what this PR was missing. It's in Tested now. The only thing left is an xcl-smoke pair (main and 8b247b0, same title and time) from anyone who has a title.

Written with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7135659916 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7135659916). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T15:13:22Z. --- Thank you, @ySKELLETONX: the native Windows suite plus the revert check is what this PR was missing. It's in **Tested** now. The only thing left is an `xcl-smoke` pair (`main` and `8b247b0`, same title and time) from anyone who has a title. Written with Claude Code (Claude Opus 5.5).
IvyNotFound commented 2026-11-24 16:07:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by IvyNotFound on 2026-11-24T15:23:05Z.


Regression runs for 8b247b0 on Windows, the xcl-smoke pair this PR still needs. Same retail title, same 60 s, unedited, made with scripts/smoke.ps1 -Seconds 60 and XCL_PRESS_A_AT=15. The PR head as is (base 930e8b4) and main 930e8b4, clean trees, one after the other.

  • NVIDIA GeForce RTX 5080 16 GB (32-lane waves), driver 621.24; Ryzen 7 7800X3D; Windows 11 25H2 (26200.9974); rustc 1.100.0 MSVC; DXC 1.9.2602.17; release.

main:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 60
exit: 0x0
frames shown: 1331 (PresentX 1332)
presents per 2 s (last 3): 19 43 38
device removals: 0
crashes: 0
peak commit: 26748 MB

this PR:

xcl-smoke v1
commit: 8b247b0f1068fcca07b0752a46ffea160f83b46d
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 60
exit: 0x0
frames shown: 1320 (PresentX 1320)
presents per 2 s (last 3): 8 22 47
device removals: 0
crashes: 0
peak commit: 26630 MB

Not tested: the suite at this head (see the other reports here); AMD.

AI use: Claude Code, Claude Opus 5.5 ran the runs and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7135932971 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7135932971). Originally posted by [IvyNotFound](https://github.com/IvyNotFound) on 2026-11-24T15:23:05Z. --- **Regression runs for `8b247b0` on Windows**, the `xcl-smoke` pair this PR still needs. Same retail title, same 60 s, unedited, made with `scripts/smoke.ps1 -Seconds 60` and `XCL_PRESS_A_AT=15`. The PR head as is (base `930e8b4`) and `main` `930e8b4`, clean trees, one after the other. - NVIDIA GeForce RTX 5080 16 GB (32-lane waves), driver 621.24; Ryzen 7 7800X3D; Windows 11 25H2 (26200.9974); rustc 1.100.0 MSVC; DXC 1.9.2602.17; release. main: ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: NVIDIA GeForce RTX 5080 title: game seconds: 60 exit: 0x0 frames shown: 1331 (PresentX 1332) presents per 2 s (last 3): 19 43 38 device removals: 0 crashes: 0 peak commit: 26748 MB ``` this PR: ``` xcl-smoke v1 commit: 8b247b0f1068fcca07b0752a46ffea160f83b46d gpu: NVIDIA GeForce RTX 5080 title: game seconds: 60 exit: 0x0 frames shown: 1320 (PresentX 1320) presents per 2 s (last 3): 8 22 47 device removals: 0 crashes: 0 peak commit: 26630 MB ``` Not tested: the suite at this head (see the other reports here); AMD. AI use: Claude Code, Claude Opus 5.5 ran the runs and wrote this comment.
tiagonogueiraa-bit commented 2026-11-24 16:07:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T15:25:07Z.


Thank you, @IvyNotFound! Both blocks are under Regression run exactly as posted, with credit. With them the PR has everything CONTRIBUTING asks for.

Written with Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7135992365 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7135992365). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T15:25:07Z. --- Thank you, @IvyNotFound! Both blocks are under **Regression run** exactly as posted, with credit. With them the PR has everything CONTRIBUTING asks for. Written with Claude Code (Claude Opus 5.5).
DavidM1911 commented 2026-11-24 16:07:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T16:02:04Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib -- --test-threads=1: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7137012475 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1296#issuecomment-7137012475). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T16:02:04Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib -- --test-threads=1`: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified `main`.) Thanks!
tiagonogueiraa-bit commented 2026-11-24 21:09:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonogueiraa-bit on 2026-11-24T20:14:47Z.


Thank you @DavidM1911, the whole-lib run is in Tested, next to your earlier recomp one.

<!-- greyfinch-sync:ivall/xcl:comment:7143245184 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7143245184). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-24T20:14:47Z. --- Thank you @DavidM1911, the whole-lib run is in **Tested**, next to your earlier `recomp` one.
milesah3ad commented 2026-11-25 01:11:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by milesah3ad on 2026-11-25T01:01:41Z.


The direct DXIL backend counterpart of this fix, from @regiumlepidi's parity sweep on #1269: gpu_cmp_16_ignores_op_sel pass with XCL_DIRECT_DXIL=1 with the patch below. Without it they fail on the direct path.

vopc in gpu/dxil/lower_valu.rs took each 16-bit source from the half op_sel named, so v_cmp_lt_f16 op_sel:[1,0] compared the high half (your test: (0, 0) against (0xFFFFFFFF, 0)). The patch applies op_sel to class only, as your HLSL change does. (#1214 / #1980 change class's src1 handling in the same function, so whichever lands second may need a small rebase.)

How to take it: this PR predates the direct backend on main, so rebase it onto main first (your commit rebases cleanly onto 7994cd1), then git am the patch below. Feel free to fold it into your PR with a Co-Authored-By: milesah3ad <[email protected]> line. I didn't open a separate PR, so this doesn't add another review.

patch (1 commit, for git am)
From 1646dfef4a84f8dab7d15ac5efa2be50ebd7f579 Mon Sep 17 00:00:00 2001
From: milesah3ad <[email protected]>
Date: Tue, 24 Nov 2026 18:54:27 -0600
Subject: [PATCH] Direct DXIL: 16-bit compares read their low halves whatever
 op_sel says

vopc took each 16-bit compare source from the half op_sel named, but
RDNA2's 16-bit compares read both sources from the low halves (measured
on gfx1036, #1293), so v_cmp_lt_f16 with op_sel:[1,0] compared the
wrong half. As #1296 does on the HLSL path, op_sel now applies to
v_cmp_class_f16 only, which was not measured and keeps it.

gpu_cmp_16_ignores_op_sel now passes with XCL_DIRECT_DXIL=1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YPhfiWsdJcDBLYSS8edLyS
---
 crates/xcl/src/gpu/dxil/lower_valu.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/crates/xcl/src/gpu/dxil/lower_valu.rs b/crates/xcl/src/gpu/dxil/lower_valu.rs
index beafdcd..eb8596e 100644
--- a/crates/xcl/src/gpu/dxil/lower_valu.rs
+++ b/crates/xcl/src/gpu/dxil/lower_valu.rs
@@ -1187,7 +1187,9 @@ impl Lw {
             return err(d, "VOPC");
         }
         let (mut ua, mut ub) = (u[0].w(), u[1].w());
-        let half = |s: &mut Self, i: u64, v: Value| if m.opsel >> i & 1 == 1 { s.lshrc(v, 16) } else { s.andc(v, 0xFFFF) };
+        // RDNA2's 16-bit compares read both sources from the low halves whatever op_sel says
+        // (measured on gfx1036, #1293); class was not measured and keeps op_sel (as #1296)
+        let half = |s: &mut Self, i: u64, v: Value| if opn == "class" && m.opsel >> i & 1 == 1 { s.lshrc(v, 16) } else { s.andc(v, 0xFFFF) };
         let ty = match ty {
             "f16" => {
                 if opn == "class" {
-- 
2.48.1.windows.1

Tested

  • RTX 5080 (wave32), driver 621.24, Windows 11 Pro 26300, rustc 1.100.0, DXC 1.9.2609.5, debug. Your commit rebased onto main 7994cd1 plus this patch: gpu_cmp_16_ignores_op_sel pass with and without XCL_DIRECT_DXIL=1.
  • cargo test -p xcl --lib --no-fail-fast -- --test-threads=4 on main 7994cd1 with #587, #686, #1159 and #1296 all merged and the four direct patches applied: 948 passed, 4 failed, 25 ignored, the same in both settings. The 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3, which fail the same way on plain main here (944 passed, 4 failed). The +4 are the PRs' own tests.

Not tested: wave64 hardware (the wave64 cases SKIP here), AMD, any title, the full workspace suite (lib only).

AI use: Claude Code (Claude Opus 5.5) wrote the fix and ran the tests on the machine above. I checked the results.

<!-- greyfinch-sync:ivall/xcl:comment:7149131313 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7149131313). Originally posted by [milesah3ad](https://github.com/milesah3ad) on 2026-11-25T01:01:41Z. --- **The direct DXIL backend counterpart of this fix**, from @regiumlepidi's parity sweep on #1269: `gpu_cmp_16_ignores_op_sel` pass with `XCL_DIRECT_DXIL=1` with the patch below. Without it they fail on the direct path. `vopc` in `gpu/dxil/lower_valu.rs` took each 16-bit source from the half `op_sel` named, so `v_cmp_lt_f16 op_sel:[1,0]` compared the high half (your test: `(0, 0)` against `(0xFFFFFFFF, 0)`). The patch applies `op_sel` to `class` only, as your HLSL change does. (#1214 / #1980 change `class`'s src1 handling in the same function, so whichever lands second may need a small rebase.) **How to take it:** this PR predates the direct backend on `main`, so rebase it onto `main` first (your commit rebases cleanly onto `7994cd1`), then `git am` the patch below. Feel free to fold it into your PR with a `Co-Authored-By: milesah3ad <360542007+[email protected]>` line. I didn't open a separate PR, so this doesn't add another review. <details><summary>patch (1 commit, for <code>git am</code>)</summary> ```diff From 1646dfef4a84f8dab7d15ac5efa2be50ebd7f579 Mon Sep 17 00:00:00 2001 From: milesah3ad <360542007+[email protected]> Date: Tue, 24 Nov 2026 18:54:27 -0600 Subject: [PATCH] Direct DXIL: 16-bit compares read their low halves whatever op_sel says vopc took each 16-bit compare source from the half op_sel named, but RDNA2's 16-bit compares read both sources from the low halves (measured on gfx1036, #1293), so v_cmp_lt_f16 with op_sel:[1,0] compared the wrong half. As #1296 does on the HLSL path, op_sel now applies to v_cmp_class_f16 only, which was not measured and keeps it. gpu_cmp_16_ignores_op_sel now passes with XCL_DIRECT_DXIL=1. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YPhfiWsdJcDBLYSS8edLyS --- crates/xcl/src/gpu/dxil/lower_valu.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/xcl/src/gpu/dxil/lower_valu.rs b/crates/xcl/src/gpu/dxil/lower_valu.rs index beafdcd..eb8596e 100644 --- a/crates/xcl/src/gpu/dxil/lower_valu.rs +++ b/crates/xcl/src/gpu/dxil/lower_valu.rs @@ -1187,7 +1187,9 @@ impl Lw { return err(d, "VOPC"); } let (mut ua, mut ub) = (u[0].w(), u[1].w()); - let half = |s: &mut Self, i: u64, v: Value| if m.opsel >> i & 1 == 1 { s.lshrc(v, 16) } else { s.andc(v, 0xFFFF) }; + // RDNA2's 16-bit compares read both sources from the low halves whatever op_sel says + // (measured on gfx1036, #1293); class was not measured and keeps op_sel (as #1296) + let half = |s: &mut Self, i: u64, v: Value| if opn == "class" && m.opsel >> i & 1 == 1 { s.lshrc(v, 16) } else { s.andc(v, 0xFFFF) }; let ty = match ty { "f16" => { if opn == "class" { -- 2.48.1.windows.1 ``` </details> **Tested** - RTX 5080 (wave32), driver 621.24, Windows 11 Pro 26300, rustc 1.100.0, DXC 1.9.2609.5, debug. Your commit rebased onto `main` `7994cd1` plus this patch: `gpu_cmp_16_ignores_op_sel` pass with and without `XCL_DIRECT_DXIL=1`. - `cargo test -p xcl --lib --no-fail-fast -- --test-threads=4` on `main` `7994cd1` with #587, #686, #1159 and #1296 all merged and the four direct patches applied: 948 passed, 4 failed, 25 ignored, **the same in both settings**. The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3`, which fail the same way on plain `main` here (944 passed, 4 failed). The +4 are the PRs' own tests. **Not tested:** wave64 hardware (the wave64 cases SKIP here), AMD, any title, the full workspace suite (lib only). AI use: Claude Code (Claude Opus 5.5) wrote the fix and ran the tests on the machine above. I checked the results.
github-actions[bot] commented 2026-11-28 08:00:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:00Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7236295281 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7236295281). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:00:00Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
saintwolf commented 2026-11-30 16:40:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T16:40:27Z.


merge-check claim
head: 8b247b0f10

<!-- greyfinch-sync:ivall/xcl:comment:7285049608 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7285049608). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T16:40:27Z. --- merge-check claim head: 8b247b0f1068fcca07b0752a46ffea160f83b46d
saintwolf commented 2026-11-30 16:58:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T16:58:48Z.


merge-check
base: 9dfbe3ea66
head: 8b247b0f10
merge: clean (trial merge 3c5907af3bbb69e967b009e4e72078f2f07933e6; git diff --check clean; +34/-1 in crates/xcl/src/gpu/recomp/emit.rs and tests.rs)
build: cargo build --workspace -> ok (pre-existing warnings only, none from the PR's lines)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 2 failed, 51 ignored; SKIPPED: 27 (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"). Failing: (1) gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, pre-existing on this machine (identical on base 9dfbe3ea); (2) the new gpu_cmp_16_ignores_op_sel: in the default environment the kernel tests run on the direct-DXIL backend (XCL_DIRECT_DXIL unset enables it, dxil/kernel.rs:63), and the same op_sel behavior still lives there (dxil/lower_valu.rs:1256) — I reproduced the identical failure on a clean base worktree with the test file copied over, so this PR is not regressing it; on the HLSL path this PR actually changes (XCL_DIRECT_DXIL=0) the test fails on base and passes with the change, confirmed first-hand on this card.
review: read the whole diff and the surrounding code. The bug is real: vopc's half closure (recomp/emit.rs:4322) took each 16-bit compare source from the half op_sel named, but #1293 measured on gfx1036 that RDNA2's 16-bit compares read both sources from the low halves whatever op_sel says; the new guard keeps op_sel only for v_cmp_class_f16, which was not measured and so stays as-is. The closure is used only in the f16/u16/i16 arms of vopc, so 32/64-bit compares are untouched, and the f16 class mask (full 32-bit src1) is unchanged on both backends. All four test vectors check out by hand (f16 1.0/1.5/2.0 encodings, u16 5>2 vs 1>9, i16 -1<0 vs 32767 vs -32768) and each one discriminates high-vs-low halves. I also verified first-hand that the post-fix HLSL for the op_sel variants is byte-identical to the op_sel=0 form (dumped and diffed the generated shader and the DXC output). Thread: ySKELLETONX's RX 7600 XT full suite 752/0/41 with a revert check (the test fails with the emit.rs change reverted, so it catches the change); RTX 5070 Ti/Wine and RTX 3060 Ti runs pass; IvyNotFound's xcl-smoke main-vs-PR pair on RTX 5080 shows no regression. The direct-DXIL counterpart (same one-line guard in lower_valu.rs) is posted in-thread by milesah3ad for the author to fold in; it is not part of this PR. No unsafe, no new dependencies, no stop-criteria files touched.
performance: none; the generated condition is the same size, always low-half masked.
verdict: safe to merge
hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 / OpenCode, Qwen 3.8 27B

<!-- greyfinch-sync:ivall/xcl:comment:7285528622 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7285528622). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T16:58:48Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 8b247b0f1068fcca07b0752a46ffea160f83b46d merge: clean (trial merge 3c5907af3bbb69e967b009e4e72078f2f07933e6; git diff --check clean; +34/-1 in crates/xcl/src/gpu/recomp/emit.rs and tests.rs) build: cargo build --workspace -> ok (pre-existing warnings only, none from the PR's lines) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 2 failed, 51 ignored; SKIPPED: 27 (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"). Failing: (1) gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, pre-existing on this machine (identical on base 9dfbe3ea); (2) the new gpu_cmp_16_ignores_op_sel: in the default environment the kernel tests run on the direct-DXIL backend (XCL_DIRECT_DXIL unset enables it, dxil/kernel.rs:63), and the same op_sel behavior still lives there (dxil/lower_valu.rs:1256) — I reproduced the identical failure on a clean base worktree with the test file copied over, so this PR is not regressing it; on the HLSL path this PR actually changes (XCL_DIRECT_DXIL=0) the test fails on base and passes with the change, confirmed first-hand on this card. review: read the whole diff and the surrounding code. The bug is real: vopc's half closure (recomp/emit.rs:4322) took each 16-bit compare source from the half op_sel named, but #1293 measured on gfx1036 that RDNA2's 16-bit compares read both sources from the low halves whatever op_sel says; the new guard keeps op_sel only for v_cmp_class_f16, which was not measured and so stays as-is. The closure is used only in the f16/u16/i16 arms of vopc, so 32/64-bit compares are untouched, and the f16 class mask (full 32-bit src1) is unchanged on both backends. All four test vectors check out by hand (f16 1.0/1.5/2.0 encodings, u16 5>2 vs 1>9, i16 -1<0 vs 32767 vs -32768) and each one discriminates high-vs-low halves. I also verified first-hand that the post-fix HLSL for the op_sel variants is byte-identical to the op_sel=0 form (dumped and diffed the generated shader and the DXC output). Thread: ySKELLETONX's RX 7600 XT full suite 752/0/41 with a revert check (the test fails with the emit.rs change reverted, so it catches the change); RTX 5070 Ti/Wine and RTX 3060 Ti runs pass; IvyNotFound's xcl-smoke main-vs-PR pair on RTX 5080 shows no regression. The direct-DXIL counterpart (same one-line guard in lower_valu.rs) is posted in-thread by milesah3ad for the author to fold in; it is not part of this PR. No unsafe, no new dependencies, no stop-criteria files touched. performance: none; the generated condition is the same size, always low-half masked. verdict: safe to merge hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 / OpenCode, Qwen 3.8 27B
brainhay5 commented 2026-11-30 17:15:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T17:15:01Z.


merge-check claim
head: 8b247b0f10

<!-- greyfinch-sync:ivall/xcl:comment:7285960433 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7285960433). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-11-30T17:15:01Z. --- merge-check claim head: 8b247b0f1068fcca07b0752a46ffea160f83b46d
brainhay5 commented 2026-11-30 20:29:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T20:29:01Z.


merge-check
base: 9dfbe3ea66
head: 8b247b0f10
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2884 passed, 3 failed, 51 ignored; 29 SKIPPED lines; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 (fails on base too), test_title_runs_and_game_folder_is_untouched (fails on base too), gpu::recomp::tests::gpu_cmp_16_ignores_op_sel (does not exist on base — this PR adds it, and it fails)
review: automated check: diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no line-by-line review and no duplicate search performed.
performance: not assessed beyond the suite.
verdict: not yet: adds failing test(s): gpu::recomp::tests::gpu_cmp_16_ignores_op_sel
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017

<!-- greyfinch-sync:ivall/xcl:comment:7290991789 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7290991789). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-11-30T20:29:01Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 8b247b0f1068fcca07b0752a46ffea160f83b46d merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2884 passed, 3 failed, 51 ignored; 29 SKIPPED lines; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 (fails on base too), test_title_runs_and_game_folder_is_untouched (fails on base too), gpu::recomp::tests::gpu_cmp_16_ignores_op_sel (does not exist on base — this PR adds it, and it fails) review: automated check: diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no line-by-line review and no duplicate search performed. performance: not assessed beyond the suite. verdict: not yet: adds failing test(s): gpu::recomp::tests::gpu_cmp_16_ignores_op_sel hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017
Chrysana commented 2026-12-01 00:13:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Chrysana on 2026-12-01T00:13:39Z.


merge-check
base: d0832e614f
head: 8b247b0f10
merge: clean (git diff --check clean)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2882 passed, 10 failed, 51 ignored (base: 2882 passed, 9 failed, 51 ignored); SKIPPED: 6, the same as on base (2 no heap windows, 1 cannot disable the driver cache without Developer Mode, 3 no D3D12 debug layer). This card runs wave64, so the wave64 halves of the GPU tests run here too. failing: the same 8 tests as on base (fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3, gpu_smem_flat_descriptor_windows_and_limits, f32_programs_on_the_gpu, gpu_f32_compares_with_nan, gpu_float_compares_random, gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends, two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs, counted twice), plus this PR's new gpu_cmp_16_ignores_op_sel: "wave64 v_cmp_lt_f16 op_sel:[1,0]", left (0, 0), right (4294967295, 4294967295). Run alone with XCL_DIRECT_DXIL=0 it passes in wave32 and wave64.
review: I read the whole diff. The HLSL change (op_sel kept only for class) does what the description says, and on the HLSL path it passes on AMD too. The default direct-DXIL path isn't changed: vopc in gpu/dxil/lower_valu.rs:1256 still takes the high half whenever op_sel is set, for every 16-bit compare. So the new test fails on AMD exactly as brainhay5 saw on NVIDIA, and on the default path titles still get the op_sel reading this PR calls wrong. I can't confirm the RDNA 2 hardware behaviour (#1293) itself: these tests run XCL's translation on a PC GPU, not the console ISA.
performance: none expected; it changes which half a 16-bit compare reads. Not measured (Tier 1, no title run).
verdict: not yet: gpu/dxil/lower_valu.rs vopc (the half closure at line 1256) needs the same rule, or the default path keeps reading op_sel and the new test fails (AMD RDNA 4 and NVIDIA)
hardware / tool and model: AMD Radeon RX 9070 XT 16 GB (RDNA 4, driver 32.0.32015.2008), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 25H2 build 26200.9974, rustc 1.100.1 / Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:ivall/xcl:comment:7296082048 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7296082048). Originally posted by [Chrysana](https://github.com/Chrysana) on 2026-12-01T00:13:39Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: 8b247b0f1068fcca07b0752a46ffea160f83b46d merge: clean (git diff --check clean) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2882 passed, 10 failed, 51 ignored (base: 2882 passed, 9 failed, 51 ignored); SKIPPED: 6, the same as on base (2 no heap windows, 1 cannot disable the driver cache without Developer Mode, 3 no D3D12 debug layer). This card runs wave64, so the wave64 halves of the GPU tests run here too. failing: the same 8 tests as on base (fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3, gpu_smem_flat_descriptor_windows_and_limits, f32_programs_on_the_gpu, gpu_f32_compares_with_nan, gpu_float_compares_random, gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends, two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs, counted twice), plus this PR's new gpu_cmp_16_ignores_op_sel: "wave64 v_cmp_lt_f16 op_sel:[1,0]", left (0, 0), right (4294967295, 4294967295). Run alone with XCL_DIRECT_DXIL=0 it passes in wave32 and wave64. review: I read the whole diff. The HLSL change (op_sel kept only for class) does what the description says, and on the HLSL path it passes on AMD too. The default direct-DXIL path isn't changed: vopc in gpu/dxil/lower_valu.rs:1256 still takes the high half whenever op_sel is set, for every 16-bit compare. So the new test fails on AMD exactly as brainhay5 saw on NVIDIA, and on the default path titles still get the op_sel reading this PR calls wrong. I can't confirm the RDNA 2 hardware behaviour (#1293) itself: these tests run XCL's translation on a PC GPU, not the console ISA. performance: none expected; it changes which half a 16-bit compare reads. Not measured (Tier 1, no title run). verdict: not yet: gpu/dxil/lower_valu.rs vopc (the `half` closure at line 1256) needs the same rule, or the default path keeps reading op_sel and the new test fails (AMD RDNA 4 and NVIDIA) hardware / tool and model: AMD Radeon RX 9070 XT 16 GB (RDNA 4, driver 32.0.32015.2008), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 25H2 build 26200.9974, rustc 1.100.1 / Claude Code (Claude Opus 5.5)
Foniass commented 2026-12-01 05:21:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:21:46Z.


Triage (#1607) – head 8b247b0

#1572 made the same change (ignore op_sel on 16-bit VOPC compares) and was closed as a duplicate of this PR, which was opened first. Main's emit.rs still applies op_sel there, so the fix is not on main.
Only the HLSL path is changed; the direct DXIL counterpart posted in the thread is not part of the PR.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7301690796 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1296#issuecomment-7301690796). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:21:46Z. --- **Triage (#1607)** – head 8b247b0 #1572 made the same change (ignore op_sel on 16-bit VOPC compares) and was closed as a duplicate of this PR, which was opened first. Main's `emit.rs` still applies op_sel there, so the fix is not on main. Only the HLSL path is changed; the direct DXIL counterpart posted in the thread is not part of the PR. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1296:upstream-pr/1296'
git switch 'upstream-pr/1296'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1296'
git switch 'upstream-pr/1296'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1296'
git switch 'upstream-pr/1296'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1296'
git switch 'main'
git merge --squash 'upstream-pr/1296'
git switch 'main'
git merge --ff-only 'upstream-pr/1296'
git switch 'main'
git merge 'upstream-pr/1296'
git push origin 'main'
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
xcl-dev/xcl!1286
No description provided.