Skip to content

[upstream #1101] Recompiler tests: cover v_cubeid/sc/tc/ma_f32 and cubemap sample roundtrip on the GPU - #57

Closed
ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1101
Closed

ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1101

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 24, 2026

Copy link
Copy Markdown
Owner

What is in it
Adds two GPU recompiler tests in crates/xcl/src/gpu/recomp/tests.rs covering the RDNA2 cubemap coordinate instructions (v_cubeid_f32, v_cubesc_f32, v_cubetc_f32, v_cubema_f32), which previously had no non-retail test coverage:

  • gpu_cube_coords: verifies all four instructions against the AMD RDNA2 ISA specification in both wave64 and wave32 across all 6 faces with asymmetric magnitudes/signs, all tie-breaking boundaries (|z| >= |x|, |y|, then |y| >= |x|, else x), signed-zero inputs, and VOP3 NEG, ABS, OMOD (/2), and CLAMP modifiers.
  • gpu_cube_coords_sample_roundtrip: runs the full RDNA2 cubemap projection sequence (v_cubeid/sc/tc/ma_f32 -> v_rcp_f32(|ma|) -> v_fma_f32(..., 1.5) -> image_sample_lz) against a 2x2x6 TexDim::Cube texture with 24 unique [face, tx, ty, 1.0] texels across all 24 off-center face/quadrant directions at multiple scales, verifying that cube_id/cube_sc/cube_tc/cube_ma and cube_dir agree on every face and both S/T orientations on D3D12 hardware.

Tests-only change (crates/xcl/src/gpu/recomp/tests.rs, +148 lines).

Tested

  • Hardware: Ryzen 7 9800X3D, Windows 10 Pro (build 19045), rustc 1.100.0 (0ef1bc386 2026-11-09), debug build, Agility SDK v614 (XCL_D3D12_DIR).
  • cargo test -p xcl --lib gpu_cube -- --nocapture with XCL_REQUIRE_GPU=wave64:
    • NVIDIA GeForce RTX 5070 (driver 32.0.16.1074, XCL_ADAPTER=0, split wave64 + wave32): 3 passed, 0 failed.
    • AMD Radeon(TM) Graphics RDNA2 gfx1036 (driver 32.0.21030.2001, XCL_ADAPTER=1, native wave64 + wave32): 3 passed, 0 failed.
  • XCL_ADAPTER=warp: skips cleanly via gpu_ready() (WARP lacks SM 6.6).
  • cargo test --workspace -- --test-threads=4 on RTX 5070: 742 passed, 0 failed, 41 ignored.

Not tested

  • Retail titles (scripts/smoke.ps1; no retail game files on this machine, tests-only change).
  • D3D12 debug layer (XCL_D3D12_DEBUG=1; Windows Graphics Tools optional feature not installed on this host).

AI use
Written and audited with Antigravity (gemini-4-neon orchestrating and reviewing gemini-4-hydrogen), verified on local NVIDIA RTX 5070 and AMD RDNA2 gfx1036 hardware.


Mirror of xcl-dev#1101 (auto-synced, do not edit).

@ufoptg

ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Upstream PR xcl-dev#1101 was closed or merged.

@ufoptg ufoptg closed this Nov 25, 2026
@ufoptg
ufoptg deleted the upstream-pr/1101 branch November 25, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants