Textures: require thick 3D mip-tail levels to fit within block depth #1614

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

@⁠OtavioTadeu on GitHub · 2026-11-24 18:15 UTC · original
OtavioTadeu:fix/tiling-thick-3d-mip-tail-depth-1488 → main · +47 −11 · 1 files · 1 commits · open

What is in it

  • Addresses XCL-BT-014 (Part of #1488): track padded depth in tiling::Chain::new_3d and include per-axis thick block depth bounds (td, halving bh/bw/bd by blk % 3) when selecting first_tail for thick 3D layouts.
  • Add thick_3d_mip_tail_respects_block_depth unit test covering 4 KiB and 64 KiB thick 3D mip chains and volume tile/detile round-trips.

Tested

  • hardware (GPU + driver, CPU), Rust version, debug / release: NVIDIA GeForce GTX 1660 SUPER (driver 32.0.16.1088, Turing wave32), AMD Ryzen 5 5600G, Windows 11 26200, rustc 1.100.0, debug
  • cargo test -p xcl --lib gpu::tiling: 15 passed, 0 failed
  • cargo test --workspace -- --test-threads=4: 777 passed, 0 failed, 41 ignored (SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask [no wave64], gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware [no wave64], heap_window_out_of_memory_falls_back_to_the_switch_form [no heap windows])

Regression run

  • scripts/smoke.ps1 -Game retail_title -Seconds 60 (main baseline vs PR head on NVIDIA GeForce GTX 1660 SUPER):

xcl-smoke v1

commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485

gpu: NVIDIA GeForce GTX 1660 SUPER

title: retail_title

seconds: 60

exit: 0x0

frames shown: 631 (PresentX 631)

presents per 2 s (last 3): 47 47 49

device removals: 0

crashes: 0

peak commit: 15199 MB


xcl-smoke v1

commit: f2ba8f443a022677f74632a4170e28c4079e8f2e

gpu: NVIDIA GeForce GTX 1660 SUPER

title: retail_title

seconds: 60

exit: 0x0

frames shown: 639 (PresentX 639)

presents per 2 s (last 3): 49 40 38

device removals: 0

crashes: 0

peak commit: 15193 MB

Not tested

  • AMD / Intel / native wave64 GPUs, Linux/Wine, and extended gameplay past the 60 s smoke window

AI use

  • Antigravity (Gemini 4 Neon) implemented the depth-bounds fix, unit test, and commit message; human reviewed.
**@⁠OtavioTadeu** on GitHub · 2026-11-24 18:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1614) `OtavioTadeu:fix/tiling-thick-3d-mip-tail-depth-1488` → `main` · +47 −11 · 1 files · 1 commits · open **What is in it** - Addresses `XCL-BT-014` (Part of #1488): track padded depth in `tiling::Chain::new_3d` and include per-axis thick block depth bounds (`td`, halving `bh`/`bw`/`bd` by `blk % 3`) when selecting `first_tail` for thick 3D layouts. - Add `thick_3d_mip_tail_respects_block_depth` unit test covering 4 KiB and 64 KiB thick 3D mip chains and volume tile/detile round-trips. **Tested** - hardware (GPU + driver, CPU), Rust version, debug / release: NVIDIA GeForce GTX 1660 SUPER (driver 32.0.16.1088, Turing wave32), AMD Ryzen 5 5600G, Windows 11 26200, rustc 1.100.0, debug - `cargo test -p xcl --lib gpu::tiling`: 15 passed, 0 failed - `cargo test --workspace -- --test-threads=4`: 777 passed, 0 failed, 41 ignored (SKIPPED GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` [no wave64], `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` [no wave64], `heap_window_out_of_memory_falls_back_to_the_switch_form` [no heap windows]) **Regression run** - `scripts/smoke.ps1 -Game retail_title -Seconds 60` (`main` baseline vs PR head on NVIDIA GeForce GTX 1660 SUPER): ``` xcl-smoke v1 commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485 gpu: NVIDIA GeForce GTX 1660 SUPER title: retail_title seconds: 60 exit: 0x0 frames shown: 631 (PresentX 631) presents per 2 s (last 3): 47 47 49 device removals: 0 crashes: 0 peak commit: 15199 MB ``` ``` xcl-smoke v1 commit: f2ba8f443a022677f74632a4170e28c4079e8f2e gpu: NVIDIA GeForce GTX 1660 SUPER title: retail_title seconds: 60 exit: 0x0 frames shown: 639 (PresentX 639) presents per 2 s (last 3): 49 40 38 device removals: 0 crashes: 0 peak commit: 15193 MB ``` **Not tested** - AMD / Intel / native wave64 GPUs, Linux/Wine, and extended gameplay past the 60 s smoke window **AI use** - Antigravity (Gemini 4 Neon) implemented the depth-bounds fix, unit test, and commit message; human reviewed.
In tiling::Chain::new_3d, thick 3D mip-tail selection previously checked
only w <= tw && h <= th && mips - i <= max_tail and omitted block depth
bounds. A tall-in-Z thick volume texture (e.g. 16x16x64 with block_d = 16)
therefore placed mip 0 into the mip tail even though depth exceeded a
single thick tile block (XCL-BT-014 in #1488).

Track the padded level depth and per-axis tail dimension (tw, th, td) for
thick modes (halving bh on blk % 3 == 0, bw on blk % 3 == 1, bd on
blk % 3 == 2) and require padded depth <= td before a level enters the
tail. Add thick_3d_mip_tail_respects_block_depth regression coverage for
both 4 KiB and 64 KiB thick 3D modes.

Verified locally with:
cargo test -p xcl --lib gpu::tiling
(15 passed, 0 failed)

Assisted-by: Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:59:30 +00:00
Author
Owner

@⁠Anon64 on GitHub · 2026-11-24 18:23 UTC · original

Regression run for this PR: head f2ba8f4, based on main 9e3831e. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, XCL_NETWORK=0, A pressed every 4 s from 20 s, scripts/smoke.ps1 on a retail title for 60 s, back to back with the main run.

main 9e3831e:

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1587 (PresentX 1588)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 99220 MB

this PR:

xcl-smoke v1
commit: f2ba8f443a022677f74632a4170e28c4079e8f2e
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1515 (PresentX 1515)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 94751 MB

No device removals or crashes; 95 % of main's frames, 95 % of its peak commit.

Peak commit on this machine is mostly the pipeline preload's DXC compiles (#1035) and varies a lot from run to run, so it says little about this PR.

Not tested: the whole suite; whether the title reaches the changed code in these 60 s.

Written with Claude Code (Claude Opus 5.5) from runs on this machine.

**@⁠Anon64** on GitHub · 2026-11-24 18:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/1614#issuecomment-7140580142) Regression run for this PR: head `f2ba8f4`, based on `main` `9e3831e`. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, `XCL_NETWORK=0`, A pressed every 4 s from 20 s, `scripts/smoke.ps1` on a retail title for 60 s, back to back with the `main` run. main `9e3831e`: ``` xcl-smoke v1 commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1587 (PresentX 1588) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 99220 MB ``` this PR: ``` xcl-smoke v1 commit: f2ba8f443a022677f74632a4170e28c4079e8f2e gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1515 (PresentX 1515) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 94751 MB ``` No device removals or crashes; 95 % of main's frames, 95 % of its peak commit. Peak commit on this machine is mostly the pipeline preload's DXC compiles (#1035) and varies a lot from run to run, so it says little about this PR. **Not tested:** the whole suite; whether the title reaches the changed code in these 60 s. Written with Claude Code (Claude Opus 5.5) from runs on this machine.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 19:00 UTC · original

Full-suite run, since this PR has no test report yet. Tested exact head f2ba8f4 (on its base 9e3831e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form: 776 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: thick_3d_mip_tail_respects_block_depth.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 777 passed, 0 failed, 41 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • heap_window_out_of_memory_falls_back_to_the_switch_form was skipped with --skip. It fails on main 9e3831e too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (XCL_HEAP_WINDOWS unset). Reported as #1651.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 19:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/1614#issuecomment-7141459532) Full-suite run, since this PR has no test report yet. Tested exact head `f2ba8f4` (on its base `9e3831e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form`: **776 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `thick_3d_mip_tail_respects_block_depth`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **777 passed, 0 failed, 41 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `heap_window_out_of_memory_falls_back_to_the_switch_form` was skipped with `--skip`. It fails on main `9e3831e` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (`XCL_HEAP_WINDOWS` unset). Reported as #1651. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 20:30 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 20:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/1614#issuecomment-7143649661) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. Thanks!
Author
Owner

@⁠throny on GitHub · 2026-11-25 00:15 UTC · original

Two contributors checked independently and found that #1624 solves the same problem (for #1488) in a different way: #1607, group D50. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

**@⁠throny** on GitHub · 2026-11-25 00:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1614#issuecomment-7148319565) <!-- xcl-1607-hint:D50 --> Two contributors checked independently and found that #1624 solves the same problem (for #1488) in a different way: #1607, group D50. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 05:02 UTC · original

Focused Windows verification of XCL PR #1614

Tested head f2ba8f443a022677f74632a4170e28c4079e8f2e on a clean, detached checkout. The PR changes only crates/xcl/src/gpu/tiling.rs.

Tested

  • STOR-WINLAB, AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), Windows 11 Enterprise Evaluation x64 (build 26200), DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Used unoptimized dev and test profiles with debug info and incremental compilation disabled.
  • cargo build --workspace succeeded. cargo test --workspace --no-run compiled all workspace test targets.
  • cargo test -p xcl --lib gpu::tiling::tests:: -- --nocapture — 15 passed, 0 failed, 0 ignored, 0 SKIPPED lines.
  • cargo test -p xcl --lib gpu::texture::tests:: -- --nocapture --skip gpu::texture::tests::gpu_ --skip gpu::texture::tests::one_dimensional_arrays_ignore_tsharp_height_for_linear_and_tiled_layouts --skip gpu::texture::tests::non_array_2d_ignores_tsharp_depth_for_linear_and_tiled_uploads --skip gpu::texture::tests::retail_ttpf_textures_detile_with_their_mip_chains — 7 passed, 0 failed, 0 ignored, 0 SKIPPED lines.
  • Both focused runs used XCL_ADAPTER=NONE_CPU_ONLY and ran outside the Arc mutex, as did workspace compilation. Parsed totals from pr1614-focused.log were 22 passed, 0 failed, 0 ignored, and 0 lines beginning with SKIPPED .

The new regression test used thick 3D chains with 64 KiB and 4 KiB tiles. In both cases, mips 0 and 1 exceeded the block depth and stayed outside the tail, while mips 2 and 3 entered it. After tiling all four mips into the same allocation, detiling each mip recovered its original bytes. Existing CPU tests also covered non-overlap for other volume layouts and mipped array subresources.

Not tested

Execution was limited to focused CPU texture and tiling tests, alongside full workspace compilation. The full workspace GPU suite, GPU texture uploads, retail texture data, and title smoke runs were omitted.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1614-focused.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 05:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1614#issuecomment-7153390171) ## Focused Windows verification of XCL PR #1614 Tested head `f2ba8f443a022677f74632a4170e28c4079e8f2e` on a clean, detached checkout. The PR changes only `crates/xcl/src/gpu/tiling.rs`. **Tested** - STOR-WINLAB, AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), Windows 11 Enterprise Evaluation x64 (build 26200), DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Used unoptimized dev and test profiles with debug info and incremental compilation disabled. - `cargo build --workspace` succeeded. `cargo test --workspace --no-run` compiled all workspace test targets. - `cargo test -p xcl --lib gpu::tiling::tests:: -- --nocapture` — 15 passed, 0 failed, 0 ignored, 0 `SKIPPED` lines. - `cargo test -p xcl --lib gpu::texture::tests:: -- --nocapture --skip gpu::texture::tests::gpu_ --skip gpu::texture::tests::one_dimensional_arrays_ignore_tsharp_height_for_linear_and_tiled_layouts --skip gpu::texture::tests::non_array_2d_ignores_tsharp_depth_for_linear_and_tiled_uploads --skip gpu::texture::tests::retail_ttpf_textures_detile_with_their_mip_chains` — 7 passed, 0 failed, 0 ignored, 0 `SKIPPED` lines. - Both focused runs used `XCL_ADAPTER=NONE_CPU_ONLY` and ran outside the Arc mutex, as did workspace compilation. Parsed totals from `pr1614-focused.log` were 22 passed, 0 failed, 0 ignored, and 0 lines beginning with `SKIPPED `. The new regression test used thick 3D chains with 64 KiB and 4 KiB tiles. In both cases, mips 0 and 1 exceeded the block depth and stayed outside the tail, while mips 2 and 3 entered it. After tiling all four mips into the same allocation, detiling each mip recovered its original bytes. Existing CPU tests also covered non-overlap for other volume layouts and mipped array subresources. **Not tested** Execution was limited to focused CPU texture and tiling tests, alongside full workspace compilation. The full workspace GPU suite, GPU texture uploads, retail texture data, and title smoke runs were omitted. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1614-focused.log` and published.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/gpu/tiling.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/1614/head:github-bot/gh-1614'
git switch 'github-bot/gh-1614'

Merge

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