Tests: check 16-bit pixel interpolation (v_interp_*_f16) on the GPU #1171

Open
microwave805 wants to merge 1 commit from upstream-pr/1180 into main
microwave805 commented 2026-11-24 12:54:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by microwave805 on 2026-11-24T12:54:01Z.


Adds a real GPU graphics draw test (VS + PS) covering v_interp_p1ll_f16, v_interp_p1lv_f16, and v_interp_p2_f16 in crates/xcl/src/gpu/recomp/tests.rs (none of the three currently have GPU coverage).

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: add gpu_ps_interp_f16 alongside gpu_ps_p0_reads_flat_integer_selectors, verifying:
    • v_interp_p1ll_f16 + v_interp_p2_f16 (OP_SEL[3]=0, low half) preserves vdst[31:16];
    • v_interp_p1lv_f16 + v_interp_p2_f16 (OP_SEL[3]=1, high half) preserves vdst[15:0];
    • packing two interpolated channels into the low and high halves of the same VGPR;
    • v_interp_p2_f16 under EXEC=0 (both halves) leaves vdst unchanged.

Tested

  • NVIDIA GeForce RTX 3070 (driver 32.0.16.1742), AMD Ryzen 5 5600X, Windows 11 Pro (build 22631), DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc, debug)
  • cargo test -p xcl --lib gpu_ps_interp_f16 -- --nocapture: 1 passed, 0 failed
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 742 passed, 0 failed, 41 ignored
  • SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64)
  • python -I scripts/pr_check.py --local on this PR's description and changed files: description ok

Regression run

  • Not needed: changes only crates/xcl/src/gpu/recomp/tests.rs (test-only).

Not tested

  • Native wave64 / AMD GPUs (ran on NVIDIA RTX 3070)
  • Retail titles

AI use

  • Antigravity (Gemini 4 Neon): audited v_interp_*_f16 coverage in emit.rs/tests.rs, wrote the GPU test and this PR description, and ran the test commands above.
<!-- greyfinch-sync:ivall/xcl:issue:5472529981 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1180). Originally posted by [microwave805](https://github.com/microwave805) on 2026-11-24T12:54:01Z. --- Adds a real GPU graphics draw test (VS + PS) covering `v_interp_p1ll_f16`, `v_interp_p1lv_f16`, and `v_interp_p2_f16` in `crates/xcl/src/gpu/recomp/tests.rs` (none of the three currently have GPU coverage). **What is in it** - `crates/xcl/src/gpu/recomp/tests.rs`: add `gpu_ps_interp_f16` alongside `gpu_ps_p0_reads_flat_integer_selectors`, verifying: - `v_interp_p1ll_f16` + `v_interp_p2_f16` (`OP_SEL[3]=0`, low half) preserves `vdst[31:16]`; - `v_interp_p1lv_f16` + `v_interp_p2_f16` (`OP_SEL[3]=1`, high half) preserves `vdst[15:0]`; - packing two interpolated channels into the low and high halves of the same VGPR; - `v_interp_p2_f16` under `EXEC=0` (both halves) leaves `vdst` unchanged. **Tested** - NVIDIA GeForce RTX 3070 (driver 32.0.16.1742), AMD Ryzen 5 5600X, Windows 11 Pro (build 22631), DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc, debug) - `cargo test -p xcl --lib gpu_ps_interp_f16 -- --nocapture`: 1 passed, 0 failed - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): 742 passed, 0 failed, 41 ignored - SKIPPED GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (no wave64) - `python -I scripts/pr_check.py --local` on this PR's description and changed files: `description ok` **Regression run** - Not needed: changes only `crates/xcl/src/gpu/recomp/tests.rs` (test-only). **Not tested** - Native wave64 / AMD GPUs (ran on NVIDIA RTX 3070) - Retail titles **AI use** - Antigravity (Gemini 4 Neon): audited `v_interp_*_f16` coverage in `emit.rs`/`tests.rs`, wrote the GPU test and this PR description, and ran the test commands above.
towiice commented 2026-11-24 13:06:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by towiice on 2026-11-24T13:06:16Z.

Review: COMMENTED


Tested:

  • Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, wave32, driver 610.88), Windows 11 x64 (26H2 / build 26300), DXC v1.9.2609 (01b62ad4), toolchain stable-x86_64-pc-windows-gnullvm (llvm-mingw 23.1.6), debug build.
  • Test command: cargo test -p xcl --lib interp -- --nocapture
  • Result: 2 passed, 0 failed (0.79 s):
    • gpu::recomp::tests::gpu_ps_interp_f16
    • gpu::recomp::tests::ps_interp_p0_preserves_bits_and_p2_converts_to_float

Passes cleanly on NVIDIA Turing hardware without skips or regressions.

Not tested: full workspace suite, release builds, AMD/Intel GPUs, retail titles (test-only PR).

<!-- greyfinch-sync:ivall/xcl:review:6039709602 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1180#pullrequestreview-6039709602). Originally posted by [towiice](https://github.com/towiice) on 2026-11-24T13:06:16Z. **Review:** COMMENTED --- **Tested:** - Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, wave32, driver 610.88), Windows 11 x64 (26H2 / build 26300), DXC v1.9.2609 (`01b62ad4`), toolchain `stable-x86_64-pc-windows-gnullvm` (llvm-mingw 23.1.6), debug build. - Test command: `cargo test -p xcl --lib interp -- --nocapture` - Result: **2 passed, 0 failed** (0.79 s): - `gpu::recomp::tests::gpu_ps_interp_f16` - `gpu::recomp::tests::ps_interp_p0_preserves_bits_and_p2_converts_to_float` Passes cleanly on NVIDIA Turing hardware without skips or regressions. **Not tested:** full workspace suite, release builds, AMD/Intel GPUs, retail titles (test-only PR).
DavidM1911 commented 2026-11-24 14:06:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:03:48Z.


Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.

  • cargo test -p xcl --lib interp: 2 passed, 0 failed — gpu_ps_interp_f16 (the new 16-bit pixel interpolation coverage) plus the existing ps_interp_p0_preserves_bits_and_p2_converts_to_float.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7132295785 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1180#issuecomment-7132295785). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:03:48Z. --- Independent verification on current `main` `384f7f7` (branch already contains it — clean). **Machine:** Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11. - `cargo test -p xcl --lib interp`: **2 passed, 0 failed** — `gpu_ps_interp_f16` (the new 16-bit pixel interpolation coverage) plus the existing `ps_interp_p0_preserves_bits_and_p2_converts_to_float`. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
bjarngard commented 2026-11-24 14:06:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bjarngard on 2026-11-24T13:23:56Z.


Test report for head 923da6f (AMD, native wave64)

Tested

  • AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug
  • XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored, no SKIPPED
  • With XCL_REQUIRE_GPU=wave64: gpu_ps_interp_f16 passed

Not tested: retail titles, RDNA3/RDNA4.

AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.

<!-- greyfinch-sync:ivall/xcl:comment:7132772499 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1180#issuecomment-7132772499). Originally posted by [bjarngard](https://github.com/bjarngard) on 2026-11-24T13:23:56Z. --- Test report for head `923da6f` (AMD, native wave64) **Tested** - AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug - `XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4`: 742 passed, 0 failed, 41 ignored, no SKIPPED - With `XCL_REQUIRE_GPU=wave64`: `gpu_ps_interp_f16` passed **Not tested:** retail titles, RDNA3/RDNA4. **AI use:** the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.
JoaoPauluu commented 2026-11-24 14:06:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T13:45:18Z.


A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257 (DXIL → SPIR-V through dxil-spirv), DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 923da6f as it is (based on 47efa2e), no uncommitted changes. The lib test binary runs under Wine.
  • gpu::recomp::tests::gpu_ps_interp_f16 (--exact, one process): ok, no SKIPPED. DXC compiled it and it ran on the GPU in about 0.8 s.

Not tested

  • the rest of the suite on this head; native Windows; AMD / native wave64.

AI use

  • Claude Code (Claude Opus 5.5) built the head, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
<!-- greyfinch-sync:ivall/xcl:comment:7133287296 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1180#issuecomment-7133287296). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T13:45:18Z. --- A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257 (DXIL → SPIR-V through dxil-spirv), DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `923da6f` as it is (based on `47efa2e`), no uncommitted changes. The lib test binary runs under Wine. - `gpu::recomp::tests::gpu_ps_interp_f16` (`--exact`, one process): **ok**, no SKIPPED. DXC compiled it and it ran on the GPU in about 0.8 s. **Not tested** - the rest of the suite on this head; native Windows; AMD / native wave64. **AI use** - Claude Code (Claude Opus 5.5) built the head, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
JJAutoCompare commented 2026-11-25 05:08:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:46:05Z.


Tested

Clean detached PR head 923da6fc9ded1dc93fa809072767199492534a18.

Windows 11 Enterprise Evaluation 25H2 x64 (26200.9974), Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5. Unoptimized test profile on STOR-WINLAB.

cargo test --locked -p xcl --lib --no-run
# Prebuilt fixture ran with XCL_ADAPTER=A770 and XCL_DIRECT_DXIL=0.
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
    & 'L:/XclTooling/pr1801-e00963f-t3-3c561aa2/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' gpu::recomp::tests::gpu_ps_interp_f16 --exact --nocapture --test-threads=1
}

The build ran outside the mutex and exited 0. The final HLSL/DXC fixture ran in 0.26 s with 1 passed, 0 failed, 0 ignored, 0 skipped, 719 filtered out. The fixture and mutex wrapper both exited 0. Earlier launch attempts had exit-capture errors. The final run captured both streams and exits separately.

Both D3D12 draws matched all 256 RGBA32F pixels exactly. The first returned [0.25, 0.875, 0.375, 0.5] and checked preservation of the other VGPR half during low- and high-half interpolation writes. The second returned [0.75, 1.0, 0.625, 0.125] and checked packed-channel writes and preservation of both destination halves under EXEC=0. Each draw used identical attributes at all three vertices.

Not tested

Varying per-vertex attributes, direct DXIL, native wave64, other adapters, the workspace suite, and retail titles.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the checked-in fixture and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7153145920 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1180#issuecomment-7153145920). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:46:05Z. --- **Tested** Clean detached PR head `923da6fc9ded1dc93fa809072767199492534a18`. Windows 11 Enterprise Evaluation 25H2 x64 (26200.9974), Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5. Unoptimized test profile on STOR-WINLAB. ```powershell cargo test --locked -p xcl --lib --no-run # Prebuilt fixture ran with XCL_ADAPTER=A770 and XCL_DIRECT_DXIL=0. & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & 'L:/XclTooling/pr1801-e00963f-t3-3c561aa2/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' gpu::recomp::tests::gpu_ps_interp_f16 --exact --nocapture --test-threads=1 } ``` The build ran outside the mutex and exited 0. The final HLSL/DXC fixture ran in 0.26 s with **1 passed, 0 failed, 0 ignored, 0 skipped**, 719 filtered out. The fixture and mutex wrapper both exited 0. Earlier launch attempts had exit-capture errors. The final run captured both streams and exits separately. Both D3D12 draws matched all 256 RGBA32F pixels exactly. The first returned `[0.25, 0.875, 0.375, 0.5]` and checked preservation of the other VGPR half during low- and high-half interpolation writes. The second returned `[0.75, 1.0, 0.625, 0.125]` and checked packed-channel writes and preservation of both destination halves under `EXEC=0`. Each draw used identical attributes at all three vertices. **Not tested** Varying per-vertex attributes, direct DXIL, native wave64, other adapters, the workspace suite, and retail titles. **AI use** T3 Code / Codex (`gpt-6.2-sol`) ran the checked-in fixture and prepared this report.
github-actions[bot] commented 2026-11-28 20:17:54 +00:00 (Migrated from github.com)

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


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:7245183018 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1180#issuecomment-7245183018). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:17:54Z. --- 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.
Foniass commented 2026-12-01 05:00:44 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 923da6f

No open or merged PR adds the same test: main covers v_interp_*_f16 only in the direct DXIL lowering tests (gpu/dxil/lower_gfx.rs), #1658 tests the DXIL lowering path in tests/gpu_dxil_lowering.rs, and #2513 is about packed f16 interpolants. This one draws through the HLSL recompiler and checks half preservation, packing and EXEC=0 in recomp/tests.rs.
No problems found in the diff; the expected values match the constant COLOR (0.25, 0.5, 0.75, 1.0) and the preloaded halves. The branch conflicts with main and 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:7301331786 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1180#issuecomment-7301331786). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:00:44Z. --- **Triage (#1607)** – head 923da6f No open or merged PR adds the same test: main covers v_interp_*_f16 only in the direct DXIL lowering tests (`gpu/dxil/lower_gfx.rs`), #1658 tests the DXIL lowering path in `tests/gpu_dxil_lowering.rs`, and #2513 is about packed f16 interpolants. This one draws through the HLSL recompiler and checks half preservation, packing and EXEC=0 in `recomp/tests.rs`. No problems found in the diff; the expected values match the constant COLOR (0.25, 0.5, 0.75, 1.0) and the preloaded halves. The branch conflicts with main and 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/1180:upstream-pr/1180'
git switch 'upstream-pr/1180'

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