Tests: name the trailing VGPRs in the D16 resinfo kernel test #3513

Merged
Pipodi merged 1 commit from upstream-pr/3513 into main 2026-11-30 18:01:36 +00:00
Pipodi commented 2026-11-30 07:47:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-30T07:47:41Z.


gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 fails on main on a GPU since 43c56dce (#3495): "2D D16 resinfo clobbered v2/v3", left (0, 0). CI is green because CI has no GPU and the test returns before the run. #3101's description reports the same failure on a clean d52ff48c from another machine.

Cause: the test kernel loads and stores only the registers its instructions name (touched, crates/xcl/src/gpu/dxil/kernel.rs:416-419). Before 43c56dce the two image_get_resinfo named v0..v3 and v4..v7 (VDATA from the spec's 128-bit operand), so v2/v3/v6/v7 were carried from the input state to the result. Since then mimg_vgpr_uses (crates/xcl/src/gpu/rdna2.rs:613) gives a D16 result two VGPRs, so the trailing ones are never stored and read 0. The translation is unchanged and does not write them. The test change names v2, v3, v6 and v7 with self-moves after the two queries, so a query that wrote four VGPRs would still fail.

Test-only, 5 lines.

What is in it

  • Tests: name the trailing VGPRs in the D16 resinfo kernel test (crates/xcl/src/gpu/dxil/msaa_tests.rs, gpu_direct_image_get_resinfo_d16)

Tested

  • RTX 4090, driver 621.40, i9-13900K, Windows 11 Pro 10.0.26300, rustc 1.100.0, debug
  • main (d52ff48c): the test fails 5 of 5 runs
  • this branch: the test passes 3 of 3 runs
  • cargo test --workspace -- --test-threads=4 on 466b75c5: 2877 passed, 0 failed, 51 ignored, 25 SKIPPED
  • Honest limit: a forced run with the translation's resinfo d16 set to false fails the fixed test, but at the v0 assertion, not at v2/v3. The v2/v3 assertions are covered by the self-moves, not by that run.

Regression run

  • Test-only diff: asks for the test-only label

Not tested

  • AMD and Intel GPUs

AI use

  • Claude Code: Claude Opus 5.5 (review) and Claude Fable 5.2 (diagnosis, fix, tests)
<!-- greyfinch-sync:ivall/xcl:issue:5561183041 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3513). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-30T07:47:41Z. --- `gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16` fails on `main` on a GPU since 43c56dce (#3495): "2D D16 resinfo clobbered v2/v3", left (0, 0). CI is green because CI has no GPU and the test returns before the run. #3101's description reports the same failure on a clean d52ff48c from another machine. Cause: the test kernel loads and stores only the registers its instructions name (`touched`, `crates/xcl/src/gpu/dxil/kernel.rs:416-419`). Before 43c56dce the two `image_get_resinfo` named v0..v3 and v4..v7 (VDATA from the spec's 128-bit operand), so v2/v3/v6/v7 were carried from the input state to the result. Since then `mimg_vgpr_uses` (`crates/xcl/src/gpu/rdna2.rs:613`) gives a D16 result two VGPRs, so the trailing ones are never stored and read 0. The translation is unchanged and does not write them. The test change names v2, v3, v6 and v7 with self-moves after the two queries, so a query that wrote four VGPRs would still fail. Test-only, 5 lines. **What is in it** - Tests: name the trailing VGPRs in the D16 resinfo kernel test (`crates/xcl/src/gpu/dxil/msaa_tests.rs`, `gpu_direct_image_get_resinfo_d16`) **Tested** - RTX 4090, driver 621.40, i9-13900K, Windows 11 Pro 10.0.26300, rustc 1.100.0, debug - `main` (d52ff48c): the test fails 5 of 5 runs - this branch: the test passes 3 of 3 runs - `cargo test --workspace -- --test-threads=4` on 466b75c5: 2877 passed, 0 failed, 51 ignored, 25 SKIPPED - Honest limit: a forced run with the translation's resinfo d16 set to false fails the fixed test, but at the v0 assertion, not at v2/v3. The v2/v3 assertions are covered by the self-moves, not by that run. **Regression run** - Test-only diff: asks for the `test-only` label **Not tested** - AMD and Intel GPUs **AI use** - Claude Code: Claude Opus 5.5 (review) and Claude Fable 5.2 (diagnosis, fix, tests)
vasanex commented 2026-11-30 08:23:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-11-30T08:23:15Z.


Unattended test report. Posted automatically by an AI agent on the account owner's instruction. The account owner has not read or checked it. It is not a code review and not a merge-check.

Outcome: gpu_direct_image_get_resinfo_d16 failed in 3 of 3 runs on main and passed in 3 of 3 with this PR; the whole suite had no failures with it.

Tested tree

  • head 466b75c54d3e28b3895c491b1ccef43b38f2db4d, merged without conflicts onto main d52ff48caade1f5350d513bfffd370396dadfeb6 (merged tree ab3fa90e0080f692f89fa201789e489258cc7f66), in a separate worktree with no XCL_* variables set

Hardware and tools

  • NVIDIA GeForce RTX 3080 10 GB, driver 621.40 (the machine also has an AMD integrated GPU), AMD Ryzen 9 7950X, Windows 11 Pro build 26200, rustc 1.100.0, debug

Commands and results

  • cargo test -p xcl --lib gpu_direct_image_get_resinfo_d16 -- --test-threads=4 --nocapture, not skipped:
    • on d52ff48c without this PR, 3 runs: 0 passed, 1 failed in each ("2D D16 resinfo clobbered v2/v3")
    • on the merged tree, 3 runs: 1 passed, 0 failed in each
  • cargo build --workspace on the merged tree: ok
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the merged tree: 2877 passed, 0 failed, 51 ignored (42 targets). The changed test ran in it and passed.
  • 25 SKIPPED lines: 22 no wave64, 2 no heap windows, 1 the driver cache could not be disabled (Windows Developer Mode is off)

Not tested

  • The whole suite on main without this PR (only the changed test was run there)
  • AMD and Intel GPUs, wave64, release builds
  • No title run was made; the diff changes only a test file

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote and posted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7272845397 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3513#issuecomment-7272845397). Originally posted by [vasanex](https://github.com/vasanex) on 2026-11-30T08:23:15Z. --- **Unattended test report.** Posted automatically by an AI agent on the account owner's instruction. The account owner has not read or checked it. It is not a code review and not a `merge-check`. **Outcome:** `gpu_direct_image_get_resinfo_d16` failed in 3 of 3 runs on `main` and passed in 3 of 3 with this PR; the whole suite had no failures with it. **Tested tree** - head `466b75c54d3e28b3895c491b1ccef43b38f2db4d`, merged without conflicts onto `main` `d52ff48caade1f5350d513bfffd370396dadfeb6` (merged tree `ab3fa90e0080f692f89fa201789e489258cc7f66`), in a separate worktree with no `XCL_*` variables set **Hardware and tools** - NVIDIA GeForce RTX 3080 10 GB, driver 621.40 (the machine also has an AMD integrated GPU), AMD Ryzen 9 7950X, Windows 11 Pro build 26200, rustc 1.100.0, debug **Commands and results** - `cargo test -p xcl --lib gpu_direct_image_get_resinfo_d16 -- --test-threads=4 --nocapture`, not skipped: - on `d52ff48c` without this PR, 3 runs: 0 passed, 1 failed in each ("2D D16 resinfo clobbered v2/v3") - on the merged tree, 3 runs: 1 passed, 0 failed in each - `cargo build --workspace` on the merged tree: ok - `cargo test --workspace --no-fail-fast -- --test-threads=4` on the merged tree: **2877 passed, 0 failed, 51 ignored** (42 targets). The changed test ran in it and passed. - 25 `SKIPPED` lines: 22 no wave64, 2 no heap windows, 1 the driver cache could not be disabled (Windows Developer Mode is off) **Not tested** - The whole suite on `main` without this PR (only the changed test was run there) - AMD and Intel GPUs, wave64, release builds - No title run was made; the diff changes only a test file **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote and posted this report.
tiagonleal commented 2026-11-30 09:23:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-30T09:23:08Z.


merge-check
base: 9dfbe3ea66
head: 466b75c54d
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2886 passed, 0 failed, 51 ignored; SKIPPED: 24 lines, the same as on the base; failing: none. Base alone on this PC: 2885 passed, 1 failed, 51 ignored, the failure being gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 ("2D D16 resinfo clobbered v2/v3", left (0, 0)). That test alone, cargo test -p xcl --lib gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 -- --exact --test-threads=1, 5 runs each: base 0 of 5 pass, merge 5 of 5 pass. With XCL_DIRECT_DXIL=0 set: base 0 of 3, merge 3 of 3, but the variable does not change this test: run_direct (msaa_tests.rs:172) always calls runner::direct_kernel_full, so it has no HLSL path to check.
review: whole diff read (+5/-0, gpu/dxil/msaa_tests.rs). The cause given in the description holds in the source. The test kernel loads and stores only the VGPRs its instructions name (gpu/dxil/kernel.rs:409-420, lw.init.touched from rdna2::vgpr_uses), and vgpr_uses now gives a D16 MIMG result comps.div_ceil(2) registers (rdna2.rs:616, 676), so for DMASK 0xF it names v0..v1 and v4..v5. v2, v3, v6 and v7 are then never written back and read 0. Two VGPRs is the right count for a D16 result of four 16-bit components, so the test's expectation was right and the harness stopped carrying the registers. The four self-moves (msaa_tests.rs:314-318) run after both queries and read the registers as the program sees them, so a translation that wrote four VGPRs would still fail the v2/v3 and v6/v7 assertions; I did not run such a broken translation to confirm it. Overlap: #3357 adds a test right after this one in the same file, and git merge-tree of the two heads reports a text conflict in msaa_tests.rs, so whichever lands second needs a rebase.
performance: test-only change; no smoke run.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5 ran the build, suite and repeated runs, reviewed the diff against the merged source and wrote this)

  • Tiago
<!-- greyfinch-sync:ivall/xcl:comment:7274134828 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3513#issuecomment-7274134828). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-30T09:23:08Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 466b75c54d3e28b3895c491b1ccef43b38f2db4d merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2886 passed, 0 failed, 51 ignored; SKIPPED: 24 lines, the same as on the base; failing: none. Base alone on this PC: 2885 passed, 1 failed, 51 ignored, the failure being `gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16` ("2D D16 resinfo clobbered v2/v3", left (0, 0)). That test alone, `cargo test -p xcl --lib gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 -- --exact --test-threads=1`, 5 runs each: base 0 of 5 pass, merge 5 of 5 pass. With `XCL_DIRECT_DXIL=0` set: base 0 of 3, merge 3 of 3, but the variable does not change this test: `run_direct` (`msaa_tests.rs:172`) always calls `runner::direct_kernel_full`, so it has no HLSL path to check. review: whole diff read (+5/-0, `gpu/dxil/msaa_tests.rs`). The cause given in the description holds in the source. The test kernel loads and stores only the VGPRs its instructions name (`gpu/dxil/kernel.rs:409-420`, `lw.init.touched` from `rdna2::vgpr_uses`), and `vgpr_uses` now gives a D16 MIMG result `comps.div_ceil(2)` registers (`rdna2.rs:616`, `676`), so for DMASK 0xF it names v0..v1 and v4..v5. v2, v3, v6 and v7 are then never written back and read 0. Two VGPRs is the right count for a D16 result of four 16-bit components, so the test's expectation was right and the harness stopped carrying the registers. The four self-moves (`msaa_tests.rs:314-318`) run after both queries and read the registers as the program sees them, so a translation that wrote four VGPRs would still fail the v2/v3 and v6/v7 assertions; I did not run such a broken translation to confirm it. Overlap: #3357 adds a test right after this one in the same file, and `git merge-tree` of the two heads reports a text conflict in `msaa_tests.rs`, so whichever lands second needs a rebase. performance: test-only change; no smoke run. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5 ran the build, suite and repeated runs, reviewed the diff against the merged source and wrote this) - Tiago
Edgaras0404 commented 2026-11-30 12:44:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Edgaras0404 on 2026-11-30T12:44:45Z.


Tested

  • Hardware & OS: AMD Radeon RX 6700 XT (RDNA2, driver 32.0.21045.29003), AMD Ryzen 5 5600X, Windows 10 Pro 22H2 (build 19045)
  • Toolchain & build: rustc 1.100.1 (20ddd0171 2026-11-25), dxcompiler 1.9.2609.5 (01b62ad4) / dxil 1.9.2609.5, D3D12 Agility SDK, debug
  • Commits: PR #3513 head 466b75c5 trial-merged onto main 9dfbe3ea
  • cargo test -p xcl --lib resinfo -- --test-threads=1 --nocapture: 5 passed; 0 failed; 0 ignored; 0 measured; 2764 filtered out (0 SKIPPED — gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 and all 4 other resinfo tests passed on GPU; gpu_direct_image_get_resinfo_d16 previously failed on main 9dfbe3ea)
  • cargo test --workspace --no-fail-fast -- --test-threads=4:
    • All passing workspace binaries finished with 0 failed (including tests\gpu_compute_e2e.rs: 9 passed; 0 failed with SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows; tests\console_shaders.rs: 3 passed; 0 failed; 4 ignored; tests\heap_probe.rs: 0 passed; 0 failed; 4 ignored; tests\xg_oracle.rs: 6 passed; 0 failed; 12 ignored).
    • tests\gpu_two_pass_cache_e2e.rs: 0 passed; 1 failed; 0 ignored (two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs, pre-existing failure on main 9dfbe3ea).
    • -p xcl --lib: aborted with exit code: 0x80004005 (xcl: sparse upload preparation still failed after bounded retries – the title is stopped before its GPU submission), matching main 9dfbe3ea baseline behavior. Before aborting, it logged SKIPPED hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1), the 4 remaining pre-existing gpu:: baseline failures (gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, f32_programs_on_the_gpu, gpu_f32_compares_with_nan, gpu_float_compares_random), and hle::d3d12x::list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list (FAILED under --test-threads=4); gpu_direct_image_get_resinfo_d16 did not fail.

Not tested

  • Isolated -p xcl --lib -- --skip gpu:: --skip hle::d3d12x:: run on the merged tree (did not finish -p xcl --lib due to the pre-existing 0x80004005 abort)
  • Opt-in XCL_HEAP_WINDOWS=1 tests (the 2 SKIPPED heap-window tests above)
  • Release build and scripts/smoke.ps1 (diff only adds 5 lines to crates/xcl/src/gpu/dxil/msaa_tests.rs)
  • NVIDIA, Intel, RDNA3, and RDNA4 GPUs

AI use

  • Gemini formatted this test report from the author's directly run commands and outputs (no code or diffs written).
<!-- greyfinch-sync:ivall/xcl:comment:7278863999 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3513#issuecomment-7278863999). Originally posted by [Edgaras0404](https://github.com/Edgaras0404) on 2026-11-30T12:44:45Z. --- **Tested** - **Hardware & OS:** AMD Radeon RX 6700 XT (RDNA2, driver `32.0.21045.29003`), AMD Ryzen 5 5600X, Windows 10 Pro 22H2 (build 19045) - **Toolchain & build:** `rustc 1.100.1 (20ddd0171 2026-11-25)`, `dxcompiler 1.9.2609.5` (`01b62ad4`) / `dxil 1.9.2609.5`, D3D12 Agility SDK, `debug` - **Commits:** PR `#3513` head `466b75c5` trial-merged onto `main` `9dfbe3ea` - `cargo test -p xcl --lib resinfo -- --test-threads=1 --nocapture`: `5 passed; 0 failed; 0 ignored; 0 measured; 2764 filtered out` (`0 SKIPPED` — `gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16` and all 4 other `resinfo` tests passed on GPU; `gpu_direct_image_get_resinfo_d16` previously failed on `main` `9dfbe3ea`) - `cargo test --workspace --no-fail-fast -- --test-threads=4`: - All passing workspace binaries finished with `0 failed` (including `tests\gpu_compute_e2e.rs`: `9 passed; 0 failed` with `SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`; `tests\console_shaders.rs`: `3 passed; 0 failed; 4 ignored`; `tests\heap_probe.rs`: `0 passed; 0 failed; 4 ignored`; `tests\xg_oracle.rs`: `6 passed; 0 failed; 12 ignored`). - `tests\gpu_two_pass_cache_e2e.rs`: `0 passed; 1 failed; 0 ignored` (`two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs`, pre-existing failure on `main` `9dfbe3ea`). - `-p xcl --lib`: aborted with `exit code: 0x80004005` (`xcl: sparse upload preparation still failed after bounded retries – the title is stopped before its GPU submission`), matching `main` `9dfbe3ea` baseline behavior. Before aborting, it logged `SKIPPED hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1)`, the 4 remaining pre-existing `gpu::` baseline failures (`gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form`, `f32_programs_on_the_gpu`, `gpu_f32_compares_with_nan`, `gpu_float_compares_random`), and `hle::d3d12x::list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list` (`FAILED` under `--test-threads=4`); `gpu_direct_image_get_resinfo_d16` did not fail. **Not tested** - Isolated `-p xcl --lib -- --skip gpu:: --skip hle::d3d12x::` run on the merged tree (did not finish `-p xcl --lib` due to the pre-existing `0x80004005` abort) - Opt-in `XCL_HEAP_WINDOWS=1` tests (the 2 `SKIPPED` heap-window tests above) - Release build and `scripts/smoke.ps1` (diff only adds 5 lines to `crates/xcl/src/gpu/dxil/msaa_tests.rs`) - NVIDIA, Intel, RDNA3, and RDNA4 GPUs **AI use** - Gemini formatted this test report from the author's directly run commands and outputs (no code or diffs written).
saintwolf commented 2026-11-30 12:48:52 +00:00 (Migrated from github.com)

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


merge-check claim
head: 466b75c54d

<!-- greyfinch-sync:ivall/xcl:comment:7278959659 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3513#issuecomment-7278959659). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T12:48:52Z. --- merge-check claim head: 466b75c54d3e28b3895c491b1ccef43b38f2db4d
saintwolf commented 2026-11-30 12:54:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T12:54:11Z.


merge-check
base: 9dfbe3ea66
head: 466b75c54d
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 0 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 2 no xgameruntime.dll, 1 cannot disable the driver cache 0x887A002D); gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 passed (previously failed on base 9dfbe3ea alone)
review: none (read the full +5/-0 diff in crates/xcl/src/gpu/dxil/msaa_tests.rs: adds V_MOV_B32 self-moves for v2, v3, v6, and v7 in gpu_direct_image_get_resinfo_d16 so rdna2::vgpr_uses names the trailing VGPRs for kernel load/store, fixing the failure on main)
performance: none (test-only PR)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4070 SUPER (32.0.16.2140), AMD Ryzen 7 7800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Antigravity (Gemini 4 Hydrogen)

<!-- greyfinch-sync:ivall/xcl:comment:7279079764 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3513#issuecomment-7279079764). Originally posted by [saintwolf](https://github.com/saintwolf) on 2026-11-30T12:54:11Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 466b75c54d3e28b3895c491b1ccef43b38f2db4d merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 0 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 2 no xgameruntime.dll, 1 cannot disable the driver cache 0x887A002D); gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 passed (previously failed on base 9dfbe3ea alone) review: none (read the full +5/-0 diff in crates/xcl/src/gpu/dxil/msaa_tests.rs: adds V_MOV_B32 self-moves for v2, v3, v6, and v7 in gpu_direct_image_get_resinfo_d16 so rdna2::vgpr_uses names the trailing VGPRs for kernel load/store, fixing the failure on main) performance: none (test-only PR) verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4070 SUPER (32.0.16.2140), AMD Ryzen 7 7800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Antigravity (Gemini 4 Hydrogen)
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!3513
No description provided.