Recompiler: VOP3 forms of VOP1/VOP2 16-bit ops ignore op_sel #1767

Open
M3lonade wants to merge 1 commit from upstream-pr/1777 into main
M3lonade commented 2026-11-24 20:34:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by M3lonade on 2026-11-24T20:34:40Z.


RDNA2 ignores op_sel on the VOP3 encodings of VOP2 (opcodes 0x100–0x13F) and VOP1 (0x180–0x1FF) instructions. Their 16-bit operations read the low halves of the sources and write the low half of VDST, keeping the high half, whatever OP_SEL holds. Only the VOP3-only 16-bit opcodes (v_fma_f16, v_mad_u16, v_add_nc_u16, v_pack_b32_f16, …) honour it. Both backends honoured it for every 16-bit op. For example, v_mul_f16 with OP_SEL 0b1001 multiplied src0's high half and wrote VDST's high half; the hardware multiplies the low halves and writes the low half. Same subject as #1293, which covers the 16-bit compares.

How it was measured: on RDNA2 silicon (gfx1036, the Radeon iGPU of a Ryzen 7 9700X, driver 32.0.21034.41), through OpenCL inline asm. LLVM assembles the plain VOP3 form, and each OP_SEL bit (dword0 [14:11]) is then patched into the dwords and run with .long:

  • Ignored: all 31 16-bit opcodes in these ranges give the same dword with any one OP_SEL bit set as with none. The inputs are chosen so that reading or writing a high half would change the result.
  • Honoured: the VOP3-only controls change exactly as op_sel says. They are v_fma_f16, v_max3_f16, v_med3_f16, v_mad_u16, v_add_nc_u16, v_mul_lo_u16, v_lshlrev_b16, v_max_u16, v_pack_b32_f16 and v_cvt_pknorm_u16_f16.
  • LLVM agrees: LLVM's GFX10 tests in this repository (tests/data/llvm-amdgpu/gfx10_vop3.txt) set OP_SEL on none of their 2372 encodings in these ranges.

What is in it

  • crates/xcl/src/gpu/rdna2.rs: op_sel(d) returns 0 for ENC_VOP3 opcodes 0x100–0x13F and 0x180–0x1FF, and the OP_SEL field otherwise. It also has a test, op_sel_as_rdna2_runs_it, that checks which encodings keep OP_SEL: VOP3-only, VOPC in VOP3, VOP3P, and the shader-hash v_nop.
  • crates/xcl/src/gpu/recomp/emit.rs, crates/xcl/src/gpu/dxil/lower_valu.rs: mods() takes Mods.opsel from it. The valu16 doc comment is updated.
  • crates/xcl/src/gpu/recomp/tests.rs:
    • gpu_vop3_forms_of_vop1_vop2_16_bit_ops_ignore_op_sel has 80 rows, every expected dword the measured one: each of the 31 opcodes with its OP_SEL bits, plus the VOP3-only controls.
    • Three tests expected the op_sel forms and now expect the measured results:
      • gpu_valu_16_and_64_bit (v_mul_f16, now 0x0000_42C0, the value the iGPU gives for these inputs);
      • cvt_norm_f16_instructions (HLSL text);
      • gpu_more_atomics_sub_dword_scratch_valu (v_cvt_norm_i16_f16 now goes to its own VGPR, so the VOP3 v_cvt_norm_u16_f16 result is still checked).
  • Left as they are: the 16-bit compares (VOPC in VOP3, 0x000–0x0FF). #1296 and #1572 change them in the HLSL backend.

The retail title isn't affected. A scan of its whole shader pack (26 698 programs, 44.4M instructions, the same totals as xcl shaders --json) finds no ENC_VOP3 VOP1/VOP2/VOPC instruction with OP_SEL set, apart from the two shader-hash v_nops at the start of each program. So it runs the same code as before.

Tested

  • NVIDIA GeForce RTX 4080 SUPER 16 GB (driver 621.24, 32-lane waves) and AMD Radeon(TM) Graphics (gfx1036 iGPU, picked with XCL_ADAPTER=radeon), Ryzen 7 9700X, Windows 11 Pro 26200, Rust 1.98.0; tests debug, title release.
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the RTX 4080 SUPER: 891 passed, 0 failed, 42 ignored (on 8a576f94, based on main b9b6ea62).
  • SKIPPED on this adapter: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache without Windows Developer Mode).
  • The five tests above, on both GPUs and both backends (HLSL, and XCL_DIRECT_DXIL=1): all pass. With op_sel() returning the raw field (main's behaviour), all five fail. With either backend's mods() line reverted, that backend's GPU tests fail.
  • Retail title 1.0.2.1: the 60 s smoke runs below.

Regression run

main b9b6ea62:

xcl-smoke v1
commit: b9b6ea62080cc62fc19e212033372d01c6214e5c
gpu: NVIDIA GeForce RTX 4080 SUPER
title: 2f5362b1
seconds: 60
exit: 0x0
frames shown: 1645 (PresentX 1645)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15879 MB

this PR 8a576f94:

xcl-smoke v1
commit: 8a576f94b207af37886fea57c0ee94cc7d35cb6d
gpu: NVIDIA GeForce RTX 4080 SUPER
title: 2f5362b1
seconds: 60
exit: 0x0
frames shown: 1521 (PresentX 1521)
presents per 2 s (last 3): 47 61 60
device removals: 0
crashes: 0
peak commit: 15745 MB

Not tested

  • The Xbox Series GPU itself. The measurements are from one RDNA2 part (gfx1036) and one driver.

  • AMD RDNA3/RDNA4 or Intel as hosts. They only run the translated HLSL/DXIL, so the result doesn't depend on their own op_sel rules.

  • The VOPC compares: v_cmp_lt_f16, v_cmp_lt_u16 and v_cmp_class_f16 ignore op_sel on the same iGPU, but this PR leaves them alone. This matters for #1214, which honours op_sel in v_cmp_class_f16. It also matters for #1296's note that class was not measured. Neither #1296 nor #1572 changes the DXIL backend's vopc.

  • Not run merged with them: these open PRs' tests set OP_SEL on opcodes in these ranges and expect it to select halves:

    • #1147: v_sat_pk_u8_i16 with OP_SEL[3]. Silicon writes 0x0000_0503 and zeroes the high half, as main does.
    • #1169: v_sqrt_f16, v_rcp_f16.
    • #1180: v_cvt_f32_f16.
    • #1639: v_cos_f16.
    • #1158: v_fmac_f16.
    • #202: v_cvt_i16_f16.

    A git merge-tree check against all open PRs finds no textual conflict.

  • Wine / vkd3d-proton.

AI use

  • Claude Code (Claude Opus 5.5):
    • wrote the silicon probes and ran them on the iGPU;
    • counted the retail shader pack;
    • wrote the change, the tests (expected values generated from the probe results) and this description;
    • ran the tests and the regression runs.
  • Five further Claude Opus 5.5 agents reviewed it (four reviewers and a verifier). Their findings: no CPU-only coverage, stale doc comments, 10 opcodes not yet measured (now measured), and the open PRs above. All are addressed above.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5479885234 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1777). Originally posted by [M3lonade](https://github.com/M3lonade) on 2026-11-24T20:34:40Z. --- RDNA2 ignores op_sel on the VOP3 encodings of VOP2 (opcodes 0x100–0x13F) and VOP1 (0x180–0x1FF) instructions. Their 16-bit operations read the low halves of the sources and write the low half of VDST, keeping the high half, whatever OP_SEL holds. Only the VOP3-only 16-bit opcodes (`v_fma_f16`, `v_mad_u16`, `v_add_nc_u16`, `v_pack_b32_f16`, …) honour it. Both backends honoured it for every 16-bit op. For example, `v_mul_f16` with OP_SEL `0b1001` multiplied src0's high half and wrote VDST's high half; the hardware multiplies the low halves and writes the low half. Same subject as #1293, which covers the 16-bit compares. How it was measured: on RDNA2 silicon (gfx1036, the Radeon iGPU of a Ryzen 7 9700X, driver 32.0.21034.41), through OpenCL inline asm. LLVM assembles the plain VOP3 form, and each OP_SEL bit (dword0 [14:11]) is then patched into the dwords and run with `.long`: - **Ignored:** all 31 16-bit opcodes in these ranges give the same dword with any one OP_SEL bit set as with none. The inputs are chosen so that reading or writing a high half would change the result. - **Honoured:** the VOP3-only controls change exactly as op_sel says. They are `v_fma_f16`, `v_max3_f16`, `v_med3_f16`, `v_mad_u16`, `v_add_nc_u16`, `v_mul_lo_u16`, `v_lshlrev_b16`, `v_max_u16`, `v_pack_b32_f16` and `v_cvt_pknorm_u16_f16`. - **LLVM agrees:** LLVM's GFX10 tests in this repository (`tests/data/llvm-amdgpu/gfx10_vop3.txt`) set OP_SEL on none of their 2372 encodings in these ranges. **What is in it** - `crates/xcl/src/gpu/rdna2.rs`: `op_sel(d)` returns 0 for ENC_VOP3 opcodes 0x100–0x13F and 0x180–0x1FF, and the OP_SEL field otherwise. It also has a test, `op_sel_as_rdna2_runs_it`, that checks which encodings keep OP_SEL: VOP3-only, VOPC in VOP3, VOP3P, and the shader-hash `v_nop`. - `crates/xcl/src/gpu/recomp/emit.rs`, `crates/xcl/src/gpu/dxil/lower_valu.rs`: `mods()` takes `Mods.opsel` from it. The `valu16` doc comment is updated. - `crates/xcl/src/gpu/recomp/tests.rs`: - `gpu_vop3_forms_of_vop1_vop2_16_bit_ops_ignore_op_sel` has 80 rows, every expected dword the measured one: each of the 31 opcodes with its OP_SEL bits, plus the VOP3-only controls. - Three tests expected the op_sel forms and now expect the measured results: - `gpu_valu_16_and_64_bit` (`v_mul_f16`, now `0x0000_42C0`, the value the iGPU gives for these inputs); - `cvt_norm_f16_instructions` (HLSL text); - `gpu_more_atomics_sub_dword_scratch_valu` (`v_cvt_norm_i16_f16` now goes to its own VGPR, so the VOP3 `v_cvt_norm_u16_f16` result is still checked). - Left as they are: the 16-bit compares (VOPC in VOP3, 0x000–0x0FF). #1296 and #1572 change them in the HLSL backend. The retail title isn't affected. A scan of its whole shader pack (26 698 programs, 44.4M instructions, the same totals as `xcl shaders --json`) finds no ENC_VOP3 VOP1/VOP2/VOPC instruction with OP_SEL set, apart from the two shader-hash `v_nop`s at the start of each program. So it runs the same code as before. **Tested** - NVIDIA GeForce RTX 4080 SUPER 16 GB (driver 621.24, 32-lane waves) and AMD Radeon(TM) Graphics (gfx1036 iGPU, picked with `XCL_ADAPTER=radeon`), Ryzen 7 9700X, Windows 11 Pro 26200, Rust 1.98.0; tests debug, title release. - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the RTX 4080 SUPER: 891 passed, 0 failed, 42 ignored (on `8a576f94`, based on `main` `b9b6ea62`). - SKIPPED on this adapter: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache without Windows Developer Mode). - The five tests above, on both GPUs and both backends (HLSL, and `XCL_DIRECT_DXIL=1`): all pass. With `op_sel()` returning the raw field (main's behaviour), all five fail. With either backend's `mods()` line reverted, that backend's GPU tests fail. - Retail title 1.0.2.1: the 60 s smoke runs below. **Regression run** `main` `b9b6ea62`: ``` xcl-smoke v1 commit: b9b6ea62080cc62fc19e212033372d01c6214e5c gpu: NVIDIA GeForce RTX 4080 SUPER title: 2f5362b1 seconds: 60 exit: 0x0 frames shown: 1645 (PresentX 1645) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15879 MB ``` this PR `8a576f94`: ``` xcl-smoke v1 commit: 8a576f94b207af37886fea57c0ee94cc7d35cb6d gpu: NVIDIA GeForce RTX 4080 SUPER title: 2f5362b1 seconds: 60 exit: 0x0 frames shown: 1521 (PresentX 1521) presents per 2 s (last 3): 47 61 60 device removals: 0 crashes: 0 peak commit: 15745 MB ``` **Not tested** - The Xbox Series GPU itself. The measurements are from one RDNA2 part (gfx1036) and one driver. - AMD RDNA3/RDNA4 or Intel as hosts. They only run the translated HLSL/DXIL, so the result doesn't depend on their own op_sel rules. - The VOPC compares: v_cmp_lt_f16, v_cmp_lt_u16 and v_cmp_class_f16 ignore op_sel on the same iGPU, but this PR leaves them alone. This matters for #1214, which honours op_sel in `v_cmp_class_f16`. It also matters for #1296's note that class was not measured. Neither #1296 nor #1572 changes the DXIL backend's `vopc`. - Not run merged with them: these open PRs' tests set OP_SEL on opcodes in these ranges and expect it to select halves: - #1147: `v_sat_pk_u8_i16` with OP_SEL[3]. Silicon writes `0x0000_0503` and zeroes the high half, as main does. - #1169: `v_sqrt_f16`, `v_rcp_f16`. - #1180: `v_cvt_f32_f16`. - #1639: `v_cos_f16`. - #1158: `v_fmac_f16`. - #202: `v_cvt_i16_f16`. A `git merge-tree` check against all open PRs finds no textual conflict. - Wine / vkd3d-proton. **AI use** - Claude Code (Claude Opus 5.5): - wrote the silicon probes and ran them on the iGPU; - counted the retail shader pack; - wrote the change, the tests (expected values generated from the probe results) and this description; - ran the tests and the regression runs. - Five further Claude Opus 5.5 agents reviewed it (four reviewers and a verifier). Their findings: no CPU-only coverage, stale doc comments, 10 opcodes not yet measured (now measured), and the open PRs above. All are addressed above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
futurepro62 commented 2026-11-24 21:30:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:25:46Z.


Full-suite run, since this PR has no test report yet. Tested exact head 8a576f9 (on its base b9b6ea6).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 889 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: op_sel_as_rdna2_runs_it, gpu_vop3_forms_of_vop1_vop2_16_bit_ops_ignore_op_sel.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 891 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)).
  • Two tests were skipped with --skip on NVIDIA. Both fail on main 7f7e768 too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. heap_window_out_of_memory_falls_back_to_the_switch_form skips when XCL_HEAP_WINDOWS is unset (#1651), and shaders::tests::pso_measurement_compiles_an_exact_synthetic_record skips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not set XCL_REQUIRE_GPU, so there both just print SKIPPED.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7144917822 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1777#issuecomment-7144917822). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T21:25:46Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `8a576f9` (on its base `b9b6ea6`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record`: **889 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `op_sel_as_rdna2_runs_it`, `gpu_vop3_forms_of_vop1_vop2_16_bit_ops_ignore_op_sel`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **891 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)). - Two tests were skipped with `--skip` on NVIDIA. Both fail on main `7f7e768` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. `heap_window_out_of_memory_falls_back_to_the_switch_form` skips when `XCL_HEAP_WINDOWS` is unset (#1651), and `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` skips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not set `XCL_REQUIRE_GPU`, so there both just print SKIPPED. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
LocranKing commented 2026-11-24 23:08:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T22:24:14Z.


Independent Windows 11 + RTX 3060 Ti (8 GB Ampere, wave32) --release verification of exact head 8a576f94b207af37886fea57c0ee94cc7d35cb6d against its exact merge-base b9b6ea62080cc62fc19e212033372d01c6214e5c: full suite green (including the new GPU test), clean direct-DXIL sweep, and clean 60 s retail smoke.

Tested

  • Hardware / toolchain: Windows 11 Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, Ampere, wave32 only), driver 32.0.16.2101 (621.01), rustc 1.100.0 (0ef1bc386 2026-11-09) (x86_64-pc-windows-msvc), DXC 1.9.2602.17 (21d28f72) / dxil.dll 1.9.2602.17, --release.
  • cargo build --release -p xcl: exit 0.
  • Full workspace suite (cargo test --workspace --release --no-fail-fast -- --test-threads=4 --nocapture): 891 passed, 0 failed, 42 ignored (+2 over exact base b9b6ea6's 889/0/42), with both new tests passing (0 SKIPPED on the new GPU test):
    • gpu::rdna2::tests::op_sel_as_rdna2_runs_it — ok
    • gpu::recomp::tests::gpu_vop3_forms_of_vop1_vop2_16_bit_ops_ignore_op_sel — ok
    • Expected host SKIPPED lines: 2 wave64 (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware), 1 driver cache disable (pso_measurement_compiles_an_exact_synthetic_record), 2 D3D12 debug layer (test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state), 1 heap windows (heap_window_out_of_memory_falls_back_to_the_switch_form).
  • Direct DXIL validation sweep (xcl shaders <retail-pack> --direct --sample 200 --seed 1269 --validate --split 1): 171 / 175 (97.7%) validated (CS 9/9, MS 69/69, PS 71/71, VS 22/22, GS 0/4 unsupported ES+GS; 25 over 16384 B skipped), 0 validator errors, 0 panics, 0 timeouts (p50 29.14 ms, p95 119.45 ms, max 265.30 ms, 2.1 s wall).

Regression run (scripts/smoke.ps1 -Seconds 60, --release)

Exact merge-base (b9b6ea6):

xcl-smoke v1
commit: b9b6ea62080cc62fc19e212033372d01c6214e5c
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1500 (PresentX 1500)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15846 MB

PR #1777 (8a576f9):

xcl-smoke v1
commit: 8a576f94b207af37886fea57c0ee94cc7d35cb6d
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1549 (PresentX 1549)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15213 MB

Not tested: AMD/Intel GPUs, wave64 hardware, D3D12 debug layer, XCL_DIRECT_DXIL=1 runtime world load, or extended runs past 60 s.

AI use: Antigravity (Gemini 4 Neon) built and ran the --release test suite, direct-DXIL sweep, and paired 60 s smoke run locally and drafted this report from the captured outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7146186145 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1777#issuecomment-7146186145). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-24T22:24:14Z. --- Independent Windows 11 + RTX 3060 Ti (8 GB Ampere, wave32) `--release` verification of exact head `8a576f94b207af37886fea57c0ee94cc7d35cb6d` against its exact merge-base `b9b6ea62080cc62fc19e212033372d01c6214e5c`: **full suite green (including the new GPU test), clean direct-DXIL sweep, and clean 60 s retail smoke**. **Tested** - **Hardware / toolchain:** Windows 11 Build `26200`, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, Ampere, wave32 only), driver `32.0.16.2101` (`621.01`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` (`x86_64-pc-windows-msvc`), DXC `1.9.2602.17 (21d28f72)` / `dxil.dll 1.9.2602.17`, `--release`. - **`cargo build --release -p xcl`:** exit `0`. - **Full workspace suite (`cargo test --workspace --release --no-fail-fast -- --test-threads=4 --nocapture`):** **891 passed, 0 failed, 42 ignored** (`+2` over exact base `b9b6ea6`'s `889/0/42`), with both new tests passing (`0 SKIPPED` on the new GPU test): - `gpu::rdna2::tests::op_sel_as_rdna2_runs_it` — `ok` - `gpu::recomp::tests::gpu_vop3_forms_of_vop1_vop2_16_bit_ops_ignore_op_sel` — `ok` - Expected host `SKIPPED` lines: `2` wave64 (`gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`), `1` driver cache disable (`pso_measurement_compiles_an_exact_synthetic_record`), `2` D3D12 debug layer (`test_title_draws_with_a_root_signature_under_the_debug_layer`, `uploads_start_from_each_subresources_state`), `1` heap windows (`heap_window_out_of_memory_falls_back_to_the_switch_form`). - **Direct DXIL validation sweep (`xcl shaders <retail-pack> --direct --sample 200 --seed 1269 --validate --split 1`):** **171 / 175 (97.7%) validated** (`CS 9/9`, `MS 69/69`, `PS 71/71`, `VS 22/22`, `GS 0/4` unsupported ES+GS; `25` over `16384 B` skipped), `0` validator errors, `0` panics, `0` timeouts (`p50 29.14 ms`, `p95 119.45 ms`, `max 265.30 ms`, `2.1 s` wall). **Regression run (`scripts/smoke.ps1 -Seconds 60`, `--release`)** Exact merge-base (`b9b6ea6`): ``` xcl-smoke v1 commit: b9b6ea62080cc62fc19e212033372d01c6214e5c gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1500 (PresentX 1500) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15846 MB ``` PR `#1777` (`8a576f9`): ``` xcl-smoke v1 commit: 8a576f94b207af37886fea57c0ee94cc7d35cb6d gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1549 (PresentX 1549) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15213 MB ``` **Not tested:** AMD/Intel GPUs, wave64 hardware, D3D12 debug layer, `XCL_DIRECT_DXIL=1` runtime world load, or extended runs past 60 s. **AI use:** Antigravity (`Gemini 4 Neon`) built and ran the `--release` test suite, direct-DXIL sweep, and paired 60 s smoke run locally and drafted this report from the captured outputs.
DavidM1911 commented 2026-11-25 00:08:53 +00:00 (Migrated from github.com)

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


Test report — RTX 3060 Ti (Windows 11), branch merged with current main:

cargo test -p xcl --lib -- --test-threads=1: 1 consistent failure (910 passed, 1 failed, 23 ignored):

gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu
assertion `left == right` failed: lane 0 v15: 0x4000 against 0xbc000000
  left: 16384
 right: 3154116608

(at crates/xcl/src/gpu/recomp/lower.rs:2538). The failing test is pre-existing on main — looks like the op_sel handling change for VOP3 16-bit ops altered an f16 result. Reproduces standalone: cargo test -p xcl --lib f16_programs_on_the_gpu.

<!-- greyfinch-sync:ivall/xcl:comment:7147365273 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1777#issuecomment-7147365273). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T23:24:33Z. --- Test report — RTX 3060 Ti (Windows 11), branch merged with current `main`: `cargo test -p xcl --lib -- --test-threads=1`: **1 consistent failure** (910 passed, 1 failed, 23 ignored): ``` gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu assertion `left == right` failed: lane 0 v15: 0x4000 against 0xbc000000 left: 16384 right: 3154116608 ``` (at `crates/xcl/src/gpu/recomp/lower.rs:2538`). The failing test is pre-existing on `main` — looks like the op_sel handling change for VOP3 16-bit ops altered an f16 result. Reproduces standalone: `cargo test -p xcl --lib f16_programs_on_the_gpu`.
JJAutoCompare commented 2026-11-26 22:49:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-26T22:49:40Z.


Tested

Independent run at clean PR head 8a576f94b207af37886fea57c0ee94cc7d35cb6d on Intel Arc A770 (driver 32.0.101.9175), Ryzen 7 3800X, Windows 11 x64 26200.9974, Rust/Cargo 1.100.0 MSVC, DXC/DXIL 1.9.2609.5, debug test profile.

Prebuilt with cargo test --locked -p xcl --lib --no-run --jobs 2 --message-format=json-render-diagnostics outside the GPU mutex. Ran <test-exe> gpu::recomp::tests::gpu_vop3_forms_of_vop1_vop2_16_bit_ops_ignore_op_sel --exact --nocapture --test-threads=1 under the Arc mutex with XCL_ADAPTER=A770.

1 passed, 0 failed, 0 ignored and 0 GPU skips (3.18 s) with XCL_DIRECT_DXIL=0. All 5,120 readbacks matched, including preserved register halves, destination-selection controls and full-dword writes.

Not tested

Direct DXIL, physical wave width, the workspace suite and retail smoke.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the original verification and summarized the saved results.

<!-- greyfinch-sync:ivall/xcl:comment:7205018786 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1777#issuecomment-7205018786). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-26T22:49:40Z. --- **Tested** Independent run at clean PR head `8a576f94b207af37886fea57c0ee94cc7d35cb6d` on Intel Arc A770 (driver 32.0.101.9175), Ryzen 7 3800X, Windows 11 x64 26200.9974, Rust/Cargo 1.100.0 MSVC, DXC/DXIL 1.9.2609.5, debug test profile. Prebuilt with `cargo test --locked -p xcl --lib --no-run --jobs 2 --message-format=json-render-diagnostics` outside the GPU mutex. Ran `<test-exe> gpu::recomp::tests::gpu_vop3_forms_of_vop1_vop2_16_bit_ops_ignore_op_sel --exact --nocapture --test-threads=1` under the Arc mutex with `XCL_ADAPTER=A770`. 1 passed, 0 failed, 0 ignored and 0 GPU skips (3.18 s) with `XCL_DIRECT_DXIL=0`. All 5,120 readbacks matched, including preserved register halves, destination-selection controls and full-dword writes. **Not tested** Direct DXIL, physical wave width, the workspace suite and retail smoke. **AI use** T3 Code / Codex (gpt-6.2-sol) ran the original verification and summarized the saved results.
Foniass commented 2026-12-01 06:45:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:45:26Z.


Triage (#1607) – head 8a576f9

No open or merged PR makes the same change. Related: #1296 makes RDNA2's 16-bit VOPC compares ignore op_sel. This PR leaves the compares alone (its test still expects rdna2::op_sel to keep OP_SEL for V_CMP_LT_F16), so the two complement each other. #1147 sets v_sat_pk_u8_i16's high half from OP_SEL[3]. That contradicts this PR's silicon row for opcode 0x1E2 (0x0000_0503: op_sel ignored, high half zeroed).
No problems found in the diff. It conflicts with main (emit.rs / lower_valu.rs have moved), so it needs a rebase.
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:7303235080 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1777#issuecomment-7303235080). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:45:26Z. --- **Triage (#1607)** – head 8a576f9 No open or merged PR makes the same change. Related: #1296 makes RDNA2's 16-bit VOPC compares ignore op_sel. This PR leaves the compares alone (its test still expects `rdna2::op_sel` to keep OP_SEL for `V_CMP_LT_F16`), so the two complement each other. #1147 sets `v_sat_pk_u8_i16`'s high half from OP_SEL[3]. That contradicts this PR's silicon row for opcode 0x1E2 (0x0000_0503: op_sel ignored, high half zeroed). No problems found in the diff. It conflicts with main (`emit.rs` / `lower_valu.rs` have moved), so it needs a rebase. 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/1777:upstream-pr/1777'
git switch 'upstream-pr/1777'

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/1777'
git switch 'upstream-pr/1777'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1777'
git switch 'upstream-pr/1777'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1777'
git switch 'main'
git merge --squash 'upstream-pr/1777'
git switch 'main'
git merge --ff-only 'upstream-pr/1777'
git switch 'main'
git merge 'upstream-pr/1777'
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!1767
No description provided.