Tests: name the trailing VGPRs in the D16 resinfo kernel test #3513
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3513"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-30T07:47:41Z.
gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16fails onmainon a GPU since43c56dce(#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 cleand52ff48cfrom 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). Before43c56dcethe twoimage_get_resinfonamed 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 thenmimg_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
crates/xcl/src/gpu/dxil/msaa_tests.rs,gpu_direct_image_get_resinfo_d16)Tested
main(d52ff48c): the test fails 5 of 5 runscargo test --workspace -- --test-threads=4on466b75c5: 2877 passed, 0 failed, 51 ignored, 25 SKIPPEDRegression run
test-onlylabelNot tested
AI use
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_d16failed in 3 of 3 runs onmainand passed in 3 of 3 with this PR; the whole suite had no failures with it.Tested tree
466b75c54d3e28b3895c491b1ccef43b38f2db4d, merged without conflicts ontomaind52ff48caade1f5350d513bfffd370396dadfeb6(merged treeab3fa90e0080f692f89fa201789e489258cc7f66), in a separate worktree with noXCL_*variables setHardware and tools
Commands and results
cargo test -p xcl --lib gpu_direct_image_get_resinfo_d16 -- --test-threads=4 --nocapture, not skipped:d52ff48cwithout this PR, 3 runs: 0 passed, 1 failed in each ("2D D16 resinfo clobbered v2/v3")cargo build --workspaceon the merged tree: okcargo test --workspace --no-fail-fast -- --test-threads=4on the merged tree: 2877 passed, 0 failed, 51 ignored (42 targets). The changed test ran in it and passed.SKIPPEDlines: 22 no wave64, 2 no heap windows, 1 the driver cache could not be disabled (Windows Developer Mode is off)Not tested
mainwithout this PR (only the changed test was run there)AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote and posted this report.
Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-30T09:23:08Z.
merge-check
base:
9dfbe3ea66head:
466b75c54dmerge: 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. WithXCL_DIRECT_DXIL=0set: base 0 of 3, merge 3 of 3, but the variable does not change this test:run_direct(msaa_tests.rs:172) always callsrunner::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.touchedfromrdna2::vgpr_uses), andvgpr_usesnow gives a D16 MIMG resultcomps.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, andgit merge-treeof the two heads reports a text conflict inmsaa_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)
Imported from ivall/xcl. Originally posted by Edgaras0404 on 2026-11-30T12:44:45Z.
Tested
32.0.21045.29003), AMD Ryzen 5 5600X, Windows 10 Pro 22H2 (build 19045)rustc 1.100.1 (20ddd0171 2026-11-25),dxcompiler 1.9.2609.5(01b62ad4) /dxil 1.9.2609.5, D3D12 Agility SDK,debug#3513head466b75c5trial-merged ontomain9dfbe3eacargo 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_d16and all 4 otherresinfotests passed on GPU;gpu_direct_image_get_resinfo_d16previously failed onmain9dfbe3ea)cargo test --workspace --no-fail-fast -- --test-threads=4:0 failed(includingtests\gpu_compute_e2e.rs:9 passed; 0 failedwithSKIPPED 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 onmain9dfbe3ea).-p xcl --lib: aborted withexit code: 0x80004005(xcl: sparse upload preparation still failed after bounded retries – the title is stopped before its GPU submission), matchingmain9dfbe3eabaseline behavior. Before aborting, it loggedSKIPPED 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-existinggpu::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), andhle::d3d12x::list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list(FAILEDunder--test-threads=4);gpu_direct_image_get_resinfo_d16did not fail.Not tested
-p xcl --lib -- --skip gpu:: --skip hle::d3d12x::run on the merged tree (did not finish-p xcl --libdue to the pre-existing0x80004005abort)XCL_HEAP_WINDOWS=1tests (the 2SKIPPEDheap-window tests above)scripts/smoke.ps1(diff only adds 5 lines tocrates/xcl/src/gpu/dxil/msaa_tests.rs)AI use
Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T12:48:52Z.
merge-check claim
head:
466b75c54dImported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T12:54:11Z.
merge-check
base:
9dfbe3ea66head:
466b75c54dmerge: 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
9dfbe3eaalone)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)