Repository navigation
Tests: check MIMG gather4, image_load_mip, and image_get_lod on the GPU - #1562
thiagocalile wants to merge 1 commit into
Conversation
Add GPU and translation-refusal tests for MIMG image_gather4 variants, image_load_mip, and image_get_lod in crates/xcl/src/gpu/recomp/tests.rs: - mimg_gather_lod_and_mip_refusals: verifies explicit rejections for multi/zero-channel gather4 DMASK, image_get_lod outside PS, image_store_mip, cube image_load_mip, and cube image_gather4_lz_o. - gpu_image_gather4_channels_offsets_and_cmp: tests image_gather4_lz across all 4 DMASK channels and D16 packing, image_gather4 border clamping, image_gather4_lz_o signed 6-bit offsets, image_gather4_c_lz and image_gather4_c_lz_o comparison gathers on R32_FLOAT, and EXEC masking across wave64 and wave32. - gpu_ps_image_load_mip_and_get_lod: tests 4-mip 2D image_load_mip (32-bit and A16 coordinates, in-bounds mips 0..3, OOB texels and OOB mip 4 returning 0, DMASK subsets) and image_get_lod (clamped vs unclamped LOD under magnification/minification, MinLOD/MaxLOD, MipLODBias, and DMASK 0x2) in PS. Measured on AMD Radeon RX 6600 (driver 32.0.21045.29003, DXC 1.8.2502.11, Rust 1.100.0) on main 9e3831e: all 3 new tests pass; full workspace run reports 776 passed, 3 failed (pre-existing main RX 6600 failures covered by xcl-dev#1028), 41 ignored. Assisted-by: Antigravity (Gemini 4 Neon, Claude Opus 5.5)
|
Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Tested Independent native Windows run at clean detached PR #1562 head
$exe = 'L:/XclTooling/verify-pr1523-1362129-t3-cf2e05e7/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe'
& $exe --exact gpu::recomp::tests::gpu_image_gather4_channels_offsets_and_cmp --nocapture --test-threads=1
& $exe --exact gpu::recomp::tests::gpu_ps_image_load_mip_and_get_lod --nocapture --test-threads=12 passed, 0 failed, 0 ignored, 0 GPU skips. Each exact invocation filtered out 750 other tests and exited 0 (0.54 s and 0.53 s). The mutex wrapper exited 0. The executable digest matched before waiting, after lock acquisition, and after both fixtures. The HLSL/DXC gather fixture checked wave32 channel selection, D16, signed offsets, comparison gather, and EXEC masking. The pixel fixture checked 2D mip loads (including A16 coordinates and out-of-bounds results) and clamped/unclamped LOD readback. On the A770 the stock gather loop omits native wave64. Not tested Native wave64 or split-wave64 gather, standalone translation-refusal fixture, direct DXIL, other GPUs, the full workspace suite, and title smoke runs. AI use T3 Code / Codex (gpt-6.2-sol) verified the revision, ran the checked-in tests, and wrote this report. |
|
Nothing has happened on this PR for 3 days, so it is marked |
|
No open PR adds the same tests. #1861 tests AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Add GPU and translation-refusal tests for MIMG
image_gather4variants,image_load_mip, andimage_get_lod. None of these had a GPU test;image_gather4_lzwas only checked on the red channel.What is in it
crates/xcl/src/gpu/recomp/tests.rs:mimg_gather_lod_and_mip_refusalschecks the translator's refusals for a multi/zero-channelgather4DMASK,image_get_lodoutside PS,image_store_mip, cubeimage_load_mip, and cubeimage_gather4_lz_ocrates/xcl/src/gpu/recomp/tests.rs:gpu_image_gather4_channels_offsets_and_cmpcoversimage_gather4_lzon all 4DMASKchannels and withD16,image_gather4border clamping,image_gather4_lz_osigned 6-bit offsets,image_gather4_c_lz/image_gather4_c_lz_ocomparison gathers (onR32_FLOAT; D3D12 has no comparison gather onR32G32B32A32_FLOAT), and EXEC masking, as wave64 and wave32 programscrates/xcl/src/gpu/recomp/tests.rs:gpu_ps_image_load_mip_and_get_lodcoversimage_load_mipon a 4-mip 2D texture (32-bit andA16coordinates, mips 0..3, out-of-bounds texels and mip 4 reading 0,DMASKsubsets) andimage_get_lodin a pixel shader (clamped vs unclamped LOD when magnified and minified,MinLOD/MaxLOD,MipLODBias,DMASK0x2)Tested
XCL_ADAPTER=radeon, native wave64 + wave32), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (26200), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11, debug buildXCL_ADAPTER=radeon cargo test -p xcl --lib mimg_gather_lod_and_mip_refusals: 1 passed, 0 failedXCL_ADAPTER=radeon cargo test -p xcl --lib gpu_image_gather4_channels_offsets_and_cmp: 1 passed, 0 failedXCL_ADAPTER=radeon cargo test -p xcl --lib gpu_ps_image_load_mip_and_get_lod: 1 passed, 0 failedXCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4on this branch (rebased onmain9e3831e): 776 passed, 3 failed, 41 ignored. The 3 failures are pre-existing onmainon this RX 6600 (placed_title_textures_share_vram_and_preserve_pixelsand 2 mutex-poison cascades; D3D12.X: map and unmap 3D texture mips separately #1028 fixes them). 1 GPU test skipped inside the passing count:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Not tested
AI use
main, re-ran the suite and drafted this description. I reviewed the diff and the test output.