Recompiler: preserve explicit cubemap sampling gradients #778

Open
github-bot wants to merge 1 commit from github-bot/gh-778 into main AGit
Owner

@⁠AkshatPal2007 on GitHub · 2026-11-24 05:09 UTC · original
AkshatPal2007:codex/cube-sample-gradients → main · +231 −38 · 4 files · 1 commits · open

Fixes #767.

XCL reduced the two face-space gradients of a cubemap sample to one mip level. That lost the direction of the texture footprint. On a synthetic 32×32 texture with a single white column, an 8×1 texel footprint returned 1.0 through the old cube path and 0.125 through the equivalent 2D-array slice on the same GPU. The retail shader survey in HANDOFF.md records this instruction on cubemaps.

What is in it

  • Transform both gradients through the selected cube face’s coordinate basis and pass them to TextureCubeArray.SampleGrad. image_sample_d_cl passes its minimum LOD directly to the sampler. This removes the cube path’s texture-size query and manual LOD calculation.
  • Add GPU regressions for face orientation, anisotropic filtering, linear filtering across edges, and mip selection. This supersedes the scalar-LOD approximation described in HANDOFF.md.

Tested

  • Commit 527a2c9, debug build. Windows 11 build 26300.8376, i9-14900HX, RTX 4070 Laptop GPU, driver 32.0.16.1656, Rust 1.100.0 MSVC, DXC 1.8.2502.11.
  • cargo build --workspace succeeded.
  • cargo test -p xcl --lib gpu_cube -- --nocapture — 4 passed, 0 failed, 0 ignored, 0 skipped. Off-centre samples matched the equivalent 2D-array slices on all six faces of two cubes for horizontal, vertical, and both diagonal anisotropic footprints.
  • Isotropic linear filtering produced the expected blend on both sides of all 12 edges, at the boundary and a quarter texel inside it. A supplemental local test checked all eight corners from each incident face. All 24 cases matched the three-face mean within 0.02 on this GPU.
  • On a four-mip texture, the shader selected mip 0 for a one-texel footprint and mip 2 for a four-texel footprint. Minimum LOD 1 preserved the gradient-selected mip 2. Minimum LOD 2.5 blended mips 2 and 3. Temporarily halving the gradient scale made two tests fail.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 — 701 reported passed, 3 failed, 41 ignored. The three failures match #718 on unchanged main. Existing texture-sampling regressions and the bundled end-to-end title passed.
  • cargo test --workspace --no-fail-fast -- --test-threads=1 — 704 reported passed, 0 failed, 41 ignored. Both workspace runs counted two native-wave64 skips among passes.

Regression run

Pending. No unpacked retail title was available for the required main and PR-head smoke runs.

Not tested

Retail visual quality and performance, external sample files, AMD GPUs, and Intel GPUs.

AI use

Codex (gpt-6.2-astra) investigated the issue, implemented the change and regression tests, ran verification.

**@⁠AkshatPal2007** on GitHub · 2026-11-24 05:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/778) `AkshatPal2007:codex/cube-sample-gradients` → `main` · +231 −38 · 4 files · 1 commits · open Fixes #767. XCL reduced the two face-space gradients of a cubemap sample to one mip level. That lost the direction of the texture footprint. On a synthetic 32×32 texture with a single white column, an 8×1 texel footprint returned 1.0 through the old cube path and 0.125 through the equivalent 2D-array slice on the same GPU. The retail shader survey in HANDOFF.md records this instruction on cubemaps. **What is in it** - Transform both gradients through the selected cube face’s coordinate basis and pass them to `TextureCubeArray.SampleGrad`. `image_sample_d_cl` passes its minimum LOD directly to the sampler. This removes the cube path’s texture-size query and manual LOD calculation. - Add GPU regressions for face orientation, anisotropic filtering, linear filtering across edges, and mip selection. This supersedes the scalar-LOD approximation described in HANDOFF.md. **Tested** - Commit `527a2c9`, debug build. Windows 11 build 26300.8376, i9-14900HX, RTX 4070 Laptop GPU, driver 32.0.16.1656, Rust 1.100.0 MSVC, DXC 1.8.2502.11. - `cargo build --workspace` succeeded. - `cargo test -p xcl --lib gpu_cube -- --nocapture` — 4 passed, 0 failed, 0 ignored, 0 skipped. Off-centre samples matched the equivalent 2D-array slices on all six faces of two cubes for horizontal, vertical, and both diagonal anisotropic footprints. - Isotropic linear filtering produced the expected blend on both sides of all 12 edges, at the boundary and a quarter texel inside it. A supplemental local test checked all eight corners from each incident face. All 24 cases matched the three-face mean within 0.02 on this GPU. - On a four-mip texture, the shader selected mip 0 for a one-texel footprint and mip 2 for a four-texel footprint. Minimum LOD 1 preserved the gradient-selected mip 2. Minimum LOD 2.5 blended mips 2 and 3. Temporarily halving the gradient scale made two tests fail. - `cargo test --workspace --no-fail-fast -- --test-threads=4` — 701 reported passed, 3 failed, 41 ignored. The three failures match #718 on unchanged main. Existing texture-sampling regressions and the bundled end-to-end title passed. - `cargo test --workspace --no-fail-fast -- --test-threads=1` — 704 reported passed, 0 failed, 41 ignored. Both workspace runs counted two native-wave64 skips among passes. **Regression run** Pending. No unpacked retail title was available for the required main and PR-head smoke runs. **Not tested** Retail visual quality and performance, external sample files, AMD GPUs, and Intel GPUs. **AI use** Codex (gpt-6.2-astra) investigated the issue, implemented the change and regression tests, ran verification.
Project face-space gradients into direction space for native anisotropic filtering. Keep the upstream scalar LOD path for clamped samples after AMD driver access violations in PR #778.

Compare translated samples to independently projected native cubemap samples rather than assuming that cube and 2D array filtering footprints agree on every driver. Keep the seam, point sampling, and minimum-LOD checks.

Assisted-by: Codex (gpt-6.2-astra and gpt-6.2-sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:32:20 +00:00
Author
Owner

@⁠mastrr9 on GitHub · 2026-11-24 05:20 UTC · original

Independent native Windows NVIDIA RTX 5080 build/test run and code review at head 527a2c9cab49669e88d5d079ad63cd912f7a6216.

Code Review

  • Clean analytic differentiation of cube_dir via cube_face_vector(2.0f * dx, 2.0f * dy, 0.0f, face) across all 6 cube faces (+X/-X/+Y/-Y/+Z/-Z), matching cube_dir's (s - 1.5) * 2, (t - 1.5) * 2 parameterization with constant major axis.
  • Verified all three new GPU tests (anisotropic 16x cube vs 2D array footprint, all 12 cube edges, and IMAGE_SAMPLE_D_CL min-LOD clamp) pass directly on NVIDIA RTX 5080. No issues found.

Tested

  • Environment: NVIDIA GeForce RTX 5080 (16 GB, wave32, driver 617.42 / 32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC from Windows SDK 10.0.26100.0, debug build.
  • Command: cargo build --workspace && cargo test --workspace -- --test-threads=4
  • Result: 704 passed, 0 failed, 41 ignored (0 new warnings).
  • PR-specific GPU tests (3/3 ok, executed on RTX 5080, not skipped):
    • gpu::recomp::tests::gpu_cube_sample_grad_matches_face_texture
    • gpu::recomp::tests::gpu_cube_sample_grad_edges
    • gpu::recomp::tests::gpu_cube_sample_grad_min_lod
  • SKIPPED (2):
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64)
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64)

Not tested

  • D3D12 debug layer, AMD/wave64 hardware, release build, and retail titles.

AI use: Antigravity (Gemini 4 Neon) performed the code review, ran the RTX 5080 workspace tests, and drafted this comment.

**@⁠mastrr9** on GitHub · 2026-11-24 05:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7122849772) Independent native Windows NVIDIA RTX 5080 build/test run and code review at head `527a2c9cab49669e88d5d079ad63cd912f7a6216`. ### Code Review - Clean analytic differentiation of `cube_dir` via `cube_face_vector(2.0f * dx, 2.0f * dy, 0.0f, face)` across all 6 cube faces (`+X/-X/+Y/-Y/+Z/-Z`), matching `cube_dir`'s `(s - 1.5) * 2`, `(t - 1.5) * 2` parameterization with constant major axis. - Verified all three new GPU tests (anisotropic 16x cube vs 2D array footprint, all 12 cube edges, and `IMAGE_SAMPLE_D_CL` min-LOD clamp) pass directly on NVIDIA RTX 5080. No issues found. ### Tested - **Environment:** NVIDIA GeForce RTX 5080 (16 GB, wave32, driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC from Windows SDK `10.0.26100.0`, debug build. - **Command:** `cargo build --workspace && cargo test --workspace -- --test-threads=4` - **Result:** **704 passed, 0 failed, 41 ignored** (0 new warnings). - **PR-specific GPU tests (3/3 `ok`, executed on RTX 5080, not skipped):** - `gpu::recomp::tests::gpu_cube_sample_grad_matches_face_texture` - `gpu::recomp::tests::gpu_cube_sample_grad_edges` - `gpu::recomp::tests::gpu_cube_sample_grad_min_lod` - **SKIPPED (2):** - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`) - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`) ### Not tested - D3D12 debug layer, AMD/wave64 hardware, release build, and retail titles. **AI use:** Antigravity (Gemini 4 Neon) performed the code review, ran the RTX 5080 workspace tests, and drafted this comment.
Author
Owner

@⁠eizispark on GitHub · 2026-11-24 05:22 UTC · original

Hardware check of 527a2c9cab49669e88d5d079ad63cd912f7a6216 (verified clean merge with main d208e14): regression noted.

Tested

  • Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profile
  • cargo test --workspace -- --test-threads=4: -p xcl --lib exited abnormally (0xc0000005, STATUS_ACCESS_VIOLATION) in gpu::recomp::tests::gpu_cube_sample_grad_min_lod after gpu::recomp::tests::gpu_cube_sample_grad_matches_face_texture failed; all other workspace targets passed (41 passed, 0 failed, 20 ignored). Rerunning cargo test -p xcl --lib -- --test-threads=4 --skip gpu::recomp::tests::gpu_cube_sample_grad_min_lod gave 661 passed, 1 failed, 21 ignored (702 passed, 2 failed, 41 ignored across the workspace; GPU tests skipped on this adapter: none; baseline main f4ce27c: 701 passed, 0 failed, 41 ignored)
  • cargo test -p xcl --lib gpu_cube: 2 passed, 2 failed when run individually (gpu_cube_array_slices: ok; gpu_cube_sample_grad_edges: ok; gpu_cube_sample_grad_matches_face_texture: panicked at crates/xcl/src/gpu/recomp/tests.rs:2355:5 with the reference must resolve the two footprint directions; gpu_cube_sample_grad_min_lod: process exited with 0xc0000005, STATUS_ACCESS_VIOLATION)

Regression run
main (f4ce27c):

xcl-smoke v1
commit: f4ce27ceb6d1b0576d0c659b713b674778bf1968
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1667 (PresentX 1667)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14847 MB

PR (527a2c9):

xcl-smoke v1
commit: 527a2c9cab49669e88d5d079ad63cd912f7a6216
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1659 (PresentX 1659)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14863 MB

Not tested

  • wave32-only GPUs (NVIDIA / Intel); gameplay past the menus

AI use

  • Antigravity (Gemini 4 Carbon) ran the build, test suite, and scripts/smoke.ps1 harness on this machine and formatted this report.
**@⁠eizispark** on GitHub · 2026-11-24 05:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7122892270) Hardware check of `527a2c9cab49669e88d5d079ad63cd912f7a6216` (verified clean merge with `main` `d208e14`): **regression noted**. **Tested** - Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, release + test profile - `cargo test --workspace -- --test-threads=4`: `-p xcl --lib` exited abnormally (`0xc0000005`, `STATUS_ACCESS_VIOLATION`) in `gpu::recomp::tests::gpu_cube_sample_grad_min_lod` after `gpu::recomp::tests::gpu_cube_sample_grad_matches_face_texture` failed; all other workspace targets passed (`41 passed, 0 failed, 20 ignored`). Rerunning `cargo test -p xcl --lib -- --test-threads=4 --skip gpu::recomp::tests::gpu_cube_sample_grad_min_lod` gave `661 passed, 1 failed, 21 ignored` (`702 passed, 2 failed, 41 ignored` across the workspace; GPU tests skipped on this adapter: `none`; baseline `main` `f4ce27c`: `701 passed, 0 failed, 41 ignored`) - `cargo test -p xcl --lib gpu_cube`: `2 passed, 2 failed` when run individually (`gpu_cube_array_slices`: ok; `gpu_cube_sample_grad_edges`: ok; `gpu_cube_sample_grad_matches_face_texture`: panicked at `crates/xcl/src/gpu/recomp/tests.rs:2355:5` with `the reference must resolve the two footprint directions`; `gpu_cube_sample_grad_min_lod`: process exited with `0xc0000005`, `STATUS_ACCESS_VIOLATION`) **Regression run** `main` (`f4ce27c`): ``` xcl-smoke v1 commit: f4ce27ceb6d1b0576d0c659b713b674778bf1968 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1667 (PresentX 1667) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14847 MB ``` PR (`527a2c9`): ``` xcl-smoke v1 commit: 527a2c9cab49669e88d5d079ad63cd912f7a6216 gpu: AMD Radeon RX 9070 XT title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1659 (PresentX 1659) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14863 MB ``` **Not tested** - wave32-only GPUs (NVIDIA / Intel); gameplay past the menus **AI use** - Antigravity (Gemini 4 Carbon) ran the build, test suite, and `scripts/smoke.ps1` harness on this machine and formatted this report.
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 05:24 UTC · original

AMD RDNA4 run of 527a2c9cab49669e88d5d079ad63cd912f7a6216: the new test fails here, every time. I merged it onto current main d208e14 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo test -p xcl --lib gpu_cube_sample_grad_matches_face_texture, 3 runs: 3 of 3 failed at tests.rs:2355, the reference must resolve the two footprint directions.
  • cargo build --workspace + cargo test --workspace -- --test-threads=4, 2 runs: the test fails, and afterwards the xcl lib test binary stops with 0xc0000005 (STATUS_ACCESS_VIOLATION) before printing a result. The five other PRs I ran on the same main d208e14 right before and after (#782, #777, #491, #481, #514) finished their lib runs without a crash, so the crash goes with this failure.
  • With a temporary eprintln! before the failing assert (not committed), the values on this adapter are: reference(0) = reference(12) = reference(24) = reference(36) = 2.09375, and the cube lanes 0 and 12 read 2.09375 too.

What that shows: it is the test's own precondition that fails, not the comparison with the cube path. 2.09375 is slice 2 + 3/32 of the synthetic texture, i.e. the same texel for every lane, whatever the gradients, and not at v = 19.5/32. So on this driver the 2D-array reference with D3D12_FILTER_ANISOTROPIC does not show the footprint direction at all (and the cube path returns the same value), which makes the test depend on how a driver implements anisotropic filtering on a one-mip R32_FLOAT texture. A texture with mips, or comparing against a CPU reference instead of the GPU's own 2D-array sample, would make it hold on AMD too. I have not looked into why the texel is the one at y = 3.

Not tested: the retail shaders the description mentions (no game data), release build.

Run and report by Claude Code (Claude Opus 5.5) on this machine; the values come from the runs above.

**@⁠MesshM** on GitHub · 2026-11-24 05:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7122910660) AMD RDNA4 run of `527a2c9cab49669e88d5d079ad63cd912f7a6216`: **the new test fails here, every time.** I merged it onto current `main` `d208e14` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo test -p xcl --lib gpu_cube_sample_grad_matches_face_texture`, 3 runs: **3 of 3 failed** at `tests.rs:2355`, `the reference must resolve the two footprint directions`. - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4`, 2 runs: the test fails, and afterwards the `xcl` lib test binary stops with `0xc0000005` (STATUS_ACCESS_VIOLATION) before printing a result. The five other PRs I ran on the same `main` `d208e14` right before and after (#782, #777, #491, #481, #514) finished their lib runs without a crash, so the crash goes with this failure. - With a temporary `eprintln!` before the failing assert (not committed), the values on this adapter are: `reference(0) = reference(12) = reference(24) = reference(36) = 2.09375`, and the cube lanes 0 and 12 read 2.09375 too. **What that shows:** it is the test's own precondition that fails, not the comparison with the cube path. 2.09375 is slice 2 + 3/32 of the synthetic texture, i.e. the same texel for every lane, whatever the gradients, and not at v = 19.5/32. So on this driver the 2D-array reference with `D3D12_FILTER_ANISOTROPIC` does not show the footprint direction at all (and the cube path returns the same value), which makes the test depend on how a driver implements anisotropic filtering on a one-mip `R32_FLOAT` texture. A texture with mips, or comparing against a CPU reference instead of the GPU's own 2D-array sample, would make it hold on AMD too. I have not looked into why the texel is the one at y = 3. **Not tested:** the retail shaders the description mentions (no game data), release build. Run and report by Claude Code (Claude Opus 5.5) on this machine; the values come from the runs above.
Author
Owner

@⁠milas6669 on GitHub · 2026-11-24 05:24 UTC · original

Test report and regression run for 527a2c9 (PR head, based on main 64b3f35; main is now d208e14, no conflict).

Tested

  • NVIDIA GeForce RTX 3070 (32-lane waves), Intel i9-10900KF, Windows 11 Pro 10.0.26200, rustc 1.100.0 x86_64-pc-windows-msvc, debug
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the PR head: 701 passed, 3 failed, 41 ignored. The 3 failures are placed_title_textures_share_vram_and_preserve_pixels, transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory; they also fail on main here (#718, #770) and are not from this PR. The 4 new tests (gpu_cube_array_slices, gpu_cube_sample_grad_edges, gpu_cube_sample_grad_matches_face_texture, gpu_cube_sample_grad_min_lod) pass.
  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)

Regression run (the one this PR lists as pending; the same retail title, 60 s, release builds; the PR's run is on its own head, based on 64b3f35)

main (d208e14):

xcl-smoke v1
commit: d208e14b765f469f4b56301b78afa8dac5378339
gpu: NVIDIA GeForce RTX 3070
title: dumped
seconds: 60
exit: 0x0
frames shown: 359 (PresentX 359)
presents per 2 s (last 3): 13 13 13
device removals: 0
crashes: 0
peak commit: 15865 MB

this PR (527a2c9):

xcl-smoke v1
commit: 527a2c9cab49669e88d5d079ad63cd912f7a6216
gpu: NVIDIA GeForce RTX 3070
title: dumped
seconds: 60
exit: 0x0
frames shown: 331 (PresentX 331)
presents per 2 s (last 3): 13 13 12
device removals: 0
crashes: 0
peak commit: 15868 MB

That is 92 % of main's frames and the same peak commit, with no crash and no device removal. Both runs are on an NVIDIA card, so they say nothing about AMD.

Not tested

  • AMD / wave64 hardware, retail visual quality of cubemap sampling (the title was only run for a regression check; I did not look at the picture)
  • the cold DXIL cache: the translated HLSL changes with this PR, and I did not measure the first run separately

AI use

  • Claude Code, Claude Sonnet 5.5, ran the commands and wrote this report. I did not review the diff beyond reading it.
**@⁠milas6669** on GitHub · 2026-11-24 05:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7122919159) Test report and regression run for `527a2c9` (PR head, based on main 64b3f35; main is now d208e14, no conflict). **Tested** - NVIDIA GeForce RTX 3070 (32-lane waves), Intel i9-10900KF, Windows 11 Pro 10.0.26200, rustc 1.100.0 `x86_64-pc-windows-msvc`, debug - `cargo test --workspace --no-fail-fast -- --test-threads=4` on the PR head: **701 passed, 3 failed, 41 ignored**. The 3 failures are `placed_title_textures_share_vram_and_preserve_pixels`, `transitions_apply_when_their_list_is_submitted` and `d32s8_targets_take_their_own_size_of_video_memory`; they also fail on `main` here (#718, #770) and are not from this PR. The 4 new tests (`gpu_cube_array_slices`, `gpu_cube_sample_grad_edges`, `gpu_cube_sample_grad_matches_face_texture`, `gpu_cube_sample_grad_min_lod`) pass. - SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) **Regression run** (the one this PR lists as pending; the same retail title, 60 s, release builds; the PR's run is on its own head, based on 64b3f35) main (d208e14): ``` xcl-smoke v1 commit: d208e14b765f469f4b56301b78afa8dac5378339 gpu: NVIDIA GeForce RTX 3070 title: dumped seconds: 60 exit: 0x0 frames shown: 359 (PresentX 359) presents per 2 s (last 3): 13 13 13 device removals: 0 crashes: 0 peak commit: 15865 MB ``` this PR (527a2c9): ``` xcl-smoke v1 commit: 527a2c9cab49669e88d5d079ad63cd912f7a6216 gpu: NVIDIA GeForce RTX 3070 title: dumped seconds: 60 exit: 0x0 frames shown: 331 (PresentX 331) presents per 2 s (last 3): 13 13 12 device removals: 0 crashes: 0 peak commit: 15868 MB ``` That is 92 % of main's frames and the same peak commit, with no crash and no device removal. Both runs are on an NVIDIA card, so they say nothing about AMD. **Not tested** - AMD / wave64 hardware, retail visual quality of cubemap sampling (the title was only run for a regression check; I did not look at the picture) - the cold DXIL cache: the translated HLSL changes with this PR, and I did not measure the first run separately **AI use** - Claude Code, Claude Sonnet 5.5, ran the commands and wrote this report. I did not review the diff beyond reading it.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-24 05:59 UTC · original

RDNA2 test results for the cubemap gradient changes

Tested clean PR head 527a2c9cab49669e88d5d079ad63cd912f7a6216, debug build, Windows 11 Home build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver 30.0.13002.13003, Rust 1.99.0 MSVC and DXC 1.8.2502.11. Set XCL_ADAPTER=6800M.

I ran each test separately with cargo test --locked -p xcl --lib gpu::recomp::tests::<name> -- --exact --test-threads=1 --nocapture.

Test Result
gpu_cube_array_slices Passed
gpu_cube_sample_grad_edges Passed
gpu_cube_sample_grad_matches_face_texture Failed at the reference must resolve the two footprint directions
gpu_cube_sample_grad_min_lod Process access violation 0xc0000005 in amdxc64.dll 30.0.13002.13003, fault offset 0x80B300

On a separate diagnostic run with only a print added, both the cube and 2D reference were 2.09375 for lanes 0, 12, 24 and 36. The first assertion compared two 2D reference values and failed before the cube-versus-2D comparisons. I removed the diagnostic print afterwards.

Not tested

The full workspace suite at this PR head, release mode, other drivers, and retail titles.

AI use

OpenAI Codex (GPT-6 family, exact model variant unavailable) ran the tests, checked the Windows crash event, and drafted this report.

**@⁠luckyteagirl** on GitHub · 2026-11-24 05:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7123464989) **RDNA2 test results for the cubemap gradient changes** Tested clean PR head `527a2c9cab49669e88d5d079ad63cd912f7a6216`, debug build, Windows 11 Home build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver `30.0.13002.13003`, Rust `1.99.0` MSVC and DXC `1.8.2502.11`. Set `XCL_ADAPTER=6800M`. I ran each test separately with `cargo test --locked -p xcl --lib gpu::recomp::tests::<name> -- --exact --test-threads=1 --nocapture`. | Test | Result | | --- | --- | | `gpu_cube_array_slices` | Passed | | `gpu_cube_sample_grad_edges` | Passed | | `gpu_cube_sample_grad_matches_face_texture` | Failed at `the reference must resolve the two footprint directions` | | `gpu_cube_sample_grad_min_lod` | Process access violation `0xc0000005` in `amdxc64.dll` `30.0.13002.13003`, fault offset `0x80B300` | On a separate diagnostic run with only a print added, both the cube and 2D reference were `2.09375` for lanes 0, 12, 24 and 36. The first assertion compared two 2D reference values and failed before the cube-versus-2D comparisons. I removed the diagnostic print afterwards. **Not tested** The full workspace suite at this PR head, release mode, other drivers, and retail titles. **AI use** OpenAI Codex (GPT-6 family, exact model variant unavailable) ran the tests, checked the Windows crash event, and drafted this report.
Author
Owner

@⁠Abuudiii on GitHub · 2026-11-24 06:59 UTC · original

Independent exact-head synthetic checks at 527a2c9cab49669e88d5d079ad63cd912f7a6216: RX 9070 (RADV / Mesa 26.2.5), Arch Linux, GE-Proton 11-7 + vkd3d-proton 3.1, DXC/DXIL 1.9.2609.5, Rust 1.99.1 Windows GNU debug build.

Tested: Each gpu::recomp::tests:: case below ran in a fresh process with --exact --test-threads=1 --nocapture. The cube-array slice and seam controls (gpu_cube_array_slices, gpu_cube_sample_grad_edges) passed. gpu_cube_sample_grad_matches_face_texture failed at the 2D precondition, “the reference must resolve the two footprint directions.” Exact head: 2 passed, 1 failed, no skips.

A separate scratch run changed only logging, not the assertions: lanes 0, 12, 24 and 36 all returned 2.09375 for both cube and 2D reference. The reference did not distinguish the inputs, so this run cannot validate or refute cube-gradient preservation. No runtime change is proposed from that result.

Not tested: Minimum-LOD pixel test, native Windows, or retail. No game data was used.

AI use: omp (GPT-6.2 Sol) ran the checks and drafted this report.

**@⁠Abuudiii** on GitHub · 2026-11-24 06:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7124503032) Independent exact-head synthetic checks at `527a2c9cab49669e88d5d079ad63cd912f7a6216`: RX 9070 (RADV / Mesa 26.2.5), Arch Linux, GE-Proton 11-7 + vkd3d-proton 3.1, DXC/DXIL 1.9.2609.5, Rust 1.99.1 Windows GNU debug build. **Tested:** Each `gpu::recomp::tests::` case below ran in a fresh process with `--exact --test-threads=1 --nocapture`. The cube-array slice and seam controls (`gpu_cube_array_slices`, `gpu_cube_sample_grad_edges`) passed. `gpu_cube_sample_grad_matches_face_texture` failed at the 2D precondition, “the reference must resolve the two footprint directions.” Exact head: **2 passed, 1 failed, no skips**. A separate scratch run changed only logging, not the assertions: lanes 0, 12, 24 and 36 all returned **2.09375 for both cube and 2D reference**. The reference did not distinguish the inputs, so this run cannot validate or refute cube-gradient preservation. No runtime change is proposed from that result. **Not tested:** Minimum-LOD pixel test, native Windows, or retail. No game data was used. **AI use:** omp (GPT-6.2 Sol) ran the checks and drafted this report.
Author
Owner

@⁠Xeltax on GitHub · 2026-11-24 09:30 UTC · original

Same result as luckyteagirl (RX 6800M) and Abuudiii (RX 9070, RADV) above, on a third AMD setup: the Ryzen 9 9900X's RDNA2 iGPU, driver 32.0.21042.62, native Windows 11, PR head 527a2c9 merged onto main 077ce40.

  • gpu_cube_sample_grad_matches_face_texture fails at the 2D precondition (2 of 2).
  • Lanes 0/12/24/36 all read 2.09375 for both the cube and the 2D reference.

For comparison, the RTX 4080 on the same machine passes all three tests, with the 2D reference at 0.78125 / 1.65625 / 1.0761719 / 0.80566406 and the cube equal to it on those lanes. So the precondition holds there and not on any AMD driver tried so far.

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

**@⁠Xeltax** on GitHub · 2026-11-24 09:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7127516559) Same result as `luckyteagirl` (RX 6800M) and Abuudiii (RX 9070, RADV) above, on a third AMD setup: the Ryzen 9 9900X's RDNA2 iGPU, driver 32.0.21042.62, native Windows 11, PR head `527a2c9` merged onto `main` `077ce40`. - `gpu_cube_sample_grad_matches_face_texture` fails at the 2D precondition (2 of 2). - Lanes 0/12/24/36 all read 2.09375 for both the cube and the 2D reference. For comparison, the RTX 4080 on the same machine passes all three tests, with the 2D reference at 0.78125 / 1.65625 / 1.0761719 / 0.80566406 and the cube equal to it on those lanes. So the precondition holds there and not on any AMD driver tried so far. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.
Author
Owner

@⁠AkshatPal2007 on GitHub · 2026-11-24 10:56 UTC · original

Thanks everyone for the feedback! Updated PR head to 1921924 with changes addressing the AMD test failures and driver crash.

Local tests: 738 passed, 0 failed, 41 ignored (2 wave64 skips counted as passes).

Could someone with AMD hardware retest the latest revision? Retail smoke tests are still pending.

**@⁠AkshatPal2007** on GitHub · 2026-11-24 10:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7129435764) Thanks everyone for the feedback! Updated PR head to `1921924` with changes addressing the AMD test failures and driver crash. Local tests: 738 passed, 0 failed, 41 ignored (2 wave64 skips counted as passes). Could someone with AMD hardware retest the latest revision? Retail smoke tests are still pending.
Author
Owner

@⁠AkshatPal2007 on GitHub · 2026-11-24 17:39 UTC · original

Could someone with AMD hardware retest the latest revision?

**@⁠AkshatPal2007** on GitHub · 2026-11-24 17:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7139508384) Could someone with AMD hardware retest the latest revision?
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 01:43 UTC · original

Independent Intel Arc A770 test of #778 (fixes #767)

Tested

  • Clean, detached PR head 556300f4ecfa4bf507d9ec9e5f8df6e03b085d85, verified against the open PR. Intel Arc A770 driver 32.0.101.9175, Ryzen 7 3800X, Windows 11 Enterprise Evaluation 26200.9974, Rust 1.100.0 (x86_64-pc-windows-msvc), DXC/DXIL 1.9.2609.5 (DXC 01b62ad4). Set XCL_ADAPTER=A770 and pointed XCL_DXC_DIR at that DXC installation. Used the unoptimized test profile with debug info and incremental compilation disabled and two Cargo build jobs.
  • Prebuilt with cargo test --locked -p xcl --lib gpu_cube --no-run. Ran L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe gpu::recomp::tests::gpu_cube --test-threads=1 --nocapture under the Arc GPU lock.
  • 4 passed, 0 failed, 0 ignored, 0 GPU skips (742 filtered out). gpu_cube_array_slices checked face and slice selection and resource info. gpu_cube_sample_grad_matches_native_cube matched the native D3D12 cube reference for horizontal, vertical and diagonal anisotropic footprints across all six faces in two cubes, with off-center point samples checking orientation. gpu_cube_sample_grad_edges checked linear filtering from both incident faces of all 12 edges. gpu_cube_sample_grad_min_lod checked gradient-selected mip levels and minimum LOD in a draw with pixel readback.
  • These fixtures used HLSL → DXIL via DXC on D3D12. The translated compute kernels used split wave64 and the anisotropy reference used a 32-lane HLSL wave. The mip test ran through the graphics path.

Not tested

  • AMD retest, NVIDIA, native wave64, direct DXIL emission, retail rendering or smoke, and the workspace suite. This run adds Intel coverage for the checked-in synthetic cases.

AI use

  • Codex (gpt-6.2-sol) in T3 Code ran the tests and wrote this report from the logs.
**@⁠JJAutoCompare** on GitHub · 2026-11-25 01:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7149885511) **Independent Intel Arc A770 test of #778 (fixes #767)** **Tested** - Clean, detached PR head `556300f4ecfa4bf507d9ec9e5f8df6e03b085d85`, verified against the open PR. Intel Arc A770 driver `32.0.101.9175`, Ryzen 7 3800X, Windows 11 Enterprise Evaluation `26200.9974`, Rust `1.100.0` (`x86_64-pc-windows-msvc`), DXC/DXIL `1.9.2609.5` (DXC `01b62ad4`). Set `XCL_ADAPTER=A770` and pointed `XCL_DXC_DIR` at that DXC installation. Used the unoptimized test profile with debug info and incremental compilation disabled and two Cargo build jobs. - Prebuilt with `cargo test --locked -p xcl --lib gpu_cube --no-run`. Ran `L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe gpu::recomp::tests::gpu_cube --test-threads=1 --nocapture` under the Arc GPU lock. - **4 passed, 0 failed, 0 ignored, 0 GPU skips** (742 filtered out). `gpu_cube_array_slices` checked face and slice selection and resource info. `gpu_cube_sample_grad_matches_native_cube` matched the native D3D12 cube reference for horizontal, vertical and diagonal anisotropic footprints across all six faces in two cubes, with off-center point samples checking orientation. `gpu_cube_sample_grad_edges` checked linear filtering from both incident faces of all 12 edges. `gpu_cube_sample_grad_min_lod` checked gradient-selected mip levels and minimum LOD in a draw with pixel readback. - These fixtures used HLSL → DXIL via DXC on D3D12. The translated compute kernels used split wave64 and the anisotropy reference used a 32-lane HLSL wave. The mip test ran through the graphics path. **Not tested** - AMD retest, NVIDIA, native wave64, direct DXIL emission, retail rendering or smoke, and the workspace suite. This run adds Intel coverage for the checked-in synthetic cases. **AI use** - Codex (`gpt-6.2-sol`) in T3 Code ran the tests and wrote this report from the logs.
Author
Owner

@⁠Toons29 on GitHub · 2026-11-24 13:40 UTC · original · edited 2026-11-25 10:24 UTC

Retest of 1921924 on AMD, as asked: the crash is gone, and gpu_cube_sample_grad_matches_face_texture still fails, now at a later check.

Tested

  • 1921924 merged into main 47efa2e (clean merge), debug
  • AMD Radeon RX 9070 (RDNA4, native wave64, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0 (stable MSVC)
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 743 passed, 1 failed, 41 ignored, 0 GPU tests SKIPPED
new test 527a2c9 on main 077ce40 1921924 on main 47efa2e
whole suite lib test process crashed (0xC0000005) in gpu_cube_sample_grad_min_lod, 2 of 2 reruns at --test-threads=1 no crash
gpu_cube_sample_grad_matches_face_texture, alone (--exact) failed 8 of 8: the reference must resolve the two footprint directions (tests.rs:2355) failed 8 of 8: lane 0: cube 0.6480392, 2D face 0.18431373 (tests.rs:2378)
gpu_cube_sample_grad_edges, alone passed 5 of 5 passed 5 of 5
gpu_cube_sample_grad_min_lod, alone not reached (crash) passed 5 of 5

The lane 0 values were the same in all 9 runs of 1921924 (the suite run and the 8 alone).

Not tested

  • No regression run (scripts/smoke.ps1): I have no retail title.
  • NVIDIA / wave32-only GPUs.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and tests and drafted this report on the machine above; I checked each point against the logs before posting.

Game run

Regression run of 556300f4 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 556300f4ecfa4bf507d9ec9e5f8df6e03b085d85
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1628 (PresentX 1628)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14692 MB

Against the limits in CONTRIBUTING.md: 101 % of main's frames, 99 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

**@⁠Toons29** on GitHub · 2026-11-24 13:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7133173059) · edited 2026-11-25 10:24 UTC Retest of `1921924` on AMD, as asked: the crash is gone, and `gpu_cube_sample_grad_matches_face_texture` still fails, now at a later check. **Tested** - `1921924` merged into `main` `47efa2e` (clean merge), debug - AMD Radeon RX 9070 (RDNA4, native wave64, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0 (stable MSVC) - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 743 passed, 1 failed, 41 ignored, 0 GPU tests SKIPPED | new test | `527a2c9` on `main` `077ce40` | `1921924` on `main` `47efa2e` | |---|---|---| | whole suite | lib test process crashed (0xC0000005) in `gpu_cube_sample_grad_min_lod`, 2 of 2 reruns at `--test-threads=1` | no crash | | `gpu_cube_sample_grad_matches_face_texture`, alone (`--exact`) | **failed 8 of 8**: `the reference must resolve the two footprint directions` (tests.rs:2355) | **failed 8 of 8**: `lane 0: cube 0.6480392, 2D face 0.18431373` (tests.rs:2378) | | `gpu_cube_sample_grad_edges`, alone | passed 5 of 5 | passed 5 of 5 | | `gpu_cube_sample_grad_min_lod`, alone | not reached (crash) | passed 5 of 5 | The `lane 0` values were the same in all 9 runs of `1921924` (the suite run and the 8 alone). **Not tested** - No regression run (`scripts/smoke.ps1`): I have no retail title. - NVIDIA / wave32-only GPUs. **AI use** - Claude Code (Claude Opus 5.5) ran the builds and tests and drafted this report on the machine above; I checked each point against the logs before posting. --- ### Game run Regression run of `556300f4` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 556300f4ecfa4bf507d9ec9e5f8df6e03b085d85 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1628 (PresentX 1628) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14692 MB ``` Against the limits in CONTRIBUTING.md: 101 % of `main`'s frames, 99 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 11:08 UTC · original

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-25 11:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/778#issuecomment-7160658158) Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/gpu/recomp/runner.rs
  • crates/xcl/src/gpu/recomp/tests.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/778/head:github-bot/gh-778'
git switch 'github-bot/gh-778'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-778'
git switch 'github-bot/gh-778'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-778'
git switch 'github-bot/gh-778'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-778'
git switch 'main'
git merge --squash 'github-bot/gh-778'
git switch 'main'
git merge --ff-only 'github-bot/gh-778'
git switch 'main'
git merge 'github-bot/gh-778'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.