D3D12.X: guard mip shift overflow and zero dimensions in tiling::Chain and image_chain #1499

Open
b3IKK wants to merge 1 commit from upstream-pr/1509 into main
b3IKK commented 2026-11-24 17:09:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T17:09:15Z.


tiling::Chain shifted the mip dimensions and the depth by the level index unconditionally: a chain with more than 32 levels (mips > 32) hit a shift overflow (a panic in debug, a wrong value in release), and Chain::new_3d with a zero width or height produced levels[0] of 0, so slice_bytes no longer matched the level it describes.

image_chain did not reject a zero width/height or a max_mip of 32 or more at all; it computed a chain for them.

This clamps every dimension to at least 1, uses checked shifts (a shift past 32 gives 1), and makes image_chain return None for a zero dimension or max_mip >= 32.

What is in it

  • crates/xcl/src/gpu/tiling.rs: the max(1) clamps and checked_shr in Chain::new / new_3d; the image_chain guard; test chain_and_image_chain_handle_large_mips_and_zero_dimensions (33 levels of a 16×16 image, a zero-size 3D chain, and image_chain with max_mip = u32::MAX, 32, a zero width and a zero height).

Since the last push: rebased onto main 06c9f55 (the commit was then re-created with the same tree so GitHub refreshed the PR's head); the only conflict was a test module where main had added layout_cache_shares_tables_and_isolates_base_xor at the same place, and both are kept.

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1)
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 1266 passed, 0 failed, 46 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses, no heap windows, and cannot disable the driver cache (Windows Developer Mode is required))
  • cargo test -p xcl --lib -- gpu::tiling: all pass, including the new test
  • the new test with the image_chain guard removed: 0 passed, 1 failed — a shift-overflow panic at tiling.rs:497

Regression run

main (426a5a7, clean tree, no local changes):

xcl-smoke v1
commit: 426a5a745db4d5e4b037449ede0b70cb342f5192
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1642 (PresentX 1642)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15158 MB

PR (a0178fc, clean tree, no local changes):

xcl-smoke v1
commit: a0178fce33f76bb767a461a04f12867e4c4f1f05
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1641 (PresentX 1641)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15759 MB

(The main block is 426a5a7, an ancestor of the current main 06c9f55, from the same machine and data folder.)

Not tested

  • a title that asks for more than 32 mips or a zero-sized image (the test builds both directly)
  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Claude Fable 5.2: rebased onto 06c9f55, kept both tests at the conflict, re-verified that the new test fails without the guard, ran the suite and the scripts/smoke.ps1 pair.
<!-- greyfinch-sync:ivall/xcl:issue:5476815762 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T17:09:15Z. --- `tiling::Chain` shifted the mip dimensions and the depth by the level index unconditionally: a chain with more than 32 levels (`mips > 32`) hit a shift overflow (a panic in debug, a wrong value in release), and `Chain::new_3d` with a zero width or height produced `levels[0]` of 0, so `slice_bytes` no longer matched the level it describes. `image_chain` did not reject a zero width/height or a `max_mip` of 32 or more at all; it computed a chain for them. This clamps every dimension to at least 1, uses checked shifts (a shift past 32 gives 1), and makes `image_chain` return `None` for a zero dimension or `max_mip >= 32`. **What is in it** - `crates/xcl/src/gpu/tiling.rs`: the `max(1)` clamps and `checked_shr` in `Chain::new` / `new_3d`; the `image_chain` guard; test `chain_and_image_chain_handle_large_mips_and_zero_dimensions` (33 levels of a 16×16 image, a zero-size 3D chain, and `image_chain` with `max_mip = u32::MAX`, `32`, a zero width and a zero height). **Since the last push**: rebased onto `main` `06c9f55` (the commit was then re-created with the same tree so GitHub refreshed the PR's head); the only conflict was a test module where `main` had added `layout_cache_shares_tables_and_isolates_base_xor` at the same place, and both are kept. **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5, debug (`scripts/test.ps1`) and release (`scripts/smoke.ps1`) - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): **1266 passed, 0 failed, 46 ignored** (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses, `no heap windows`, and `cannot disable the driver cache (Windows Developer Mode is required)`) - `cargo test -p xcl --lib -- gpu::tiling`: all pass, including the new test - the new test with the `image_chain` guard removed: 0 passed, 1 failed — a shift-overflow panic at `tiling.rs:497` **Regression run** main (`426a5a7`, clean tree, no local changes): ``` xcl-smoke v1 commit: 426a5a745db4d5e4b037449ede0b70cb342f5192 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1642 (PresentX 1642) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15158 MB ``` PR (`a0178fc`, clean tree, no local changes): ``` xcl-smoke v1 commit: a0178fce33f76bb767a461a04f12867e4c4f1f05 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1641 (PresentX 1641) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15759 MB ``` (The main block is `426a5a7`, an ancestor of the current `main` `06c9f55`, from the same machine and data folder.) **Not tested** - a title that asks for more than 32 mips or a zero-sized image (the test builds both directly) - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Claude Fable 5.2: rebased onto `06c9f55`, kept both tests at the conflict, re-verified that the new test fails without the guard, ran the suite and the `scripts/smoke.ps1` pair.
DavidM1911 commented 2026-11-24 19:07:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:46Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141302867 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509#issuecomment-7141302867). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:46Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
Belox17 commented 2026-11-24 21:09:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Belox17 on 2026-11-24T20:02:58Z.


Test report for 175ed9c6 on NVIDIA (RTX 3060 Ti): passes, and the test fails without the fix

Tested

  • NVIDIA GeForce RTX 3060 Ti 8 GB (32-lane waves), driver 32.0.16.2124; Ryzen 5 5600X; Windows 11 build 26300; rustc 1.98.1 MSVC; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build. Head 175ed9c6 as is (base b7aa9f3), clean tree.
  • The new test (chain_and_image_chain_handle_large_mips_and_zero_dimensions) with cargo test -p xcl --lib <name>: 1 passed.
  • cargo test --workspace -- --test-threads=4 on the head: 771 passed, 0 failed, 41 ignored; its base b7aa9f3 on the same machine: 770 passed, 0 failed, 41 ignored. SKIPPED on both: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).
  • Merged into current main c160d86e (clean merge): 859 passed, 0 failed, 42 ignored; main alone: 858 passed, 0 failed, 42 ignored, the same three SKIPPED as above.
  • With the non-test hunks of gpu/tiling.rs reverted (test kept), the test panics with attempt to shift right with overflow at tiling.rs:282.

Not tested

  • AMD / native wave64 hardware; any retail title (no smoke run).

AI use: Claude Code (Claude Opus 5.5) ran the commands on this machine and wrote this report from those runs.

<!-- greyfinch-sync:ivall/xcl:comment:7142968766 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509#issuecomment-7142968766). Originally posted by [Belox17](https://github.com/Belox17) on 2026-11-24T20:02:58Z. --- **Test report for `175ed9c6` on NVIDIA (RTX 3060 Ti): passes, and the test fails without the fix** **Tested** - NVIDIA GeForce RTX 3060 Ti 8 GB (32-lane waves), driver 32.0.16.2124; Ryzen 5 5600X; Windows 11 build 26300; rustc 1.98.1 MSVC; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build. Head `175ed9c6` as is (base `b7aa9f3`), clean tree. - The new test (`chain_and_image_chain_handle_large_mips_and_zero_dimensions`) with `cargo test -p xcl --lib <name>`: 1 passed. - `cargo test --workspace -- --test-threads=4` on the head: **771 passed, 0 failed, 41 ignored**; its base `b7aa9f3` on the same machine: 770 passed, 0 failed, 41 ignored. SKIPPED on both: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). - Merged into current `main` `c160d86e` (clean merge): **859 passed, 0 failed, 42 ignored**; `main` alone: 858 passed, 0 failed, 42 ignored, the same three SKIPPED as above. - With the non-test hunks of `gpu/tiling.rs` reverted (test kept), the test panics with `attempt to shift right with overflow` at `tiling.rs:282`. **Not tested** - AMD / native wave64 hardware; any retail title (no smoke run). **AI use:** Claude Code (Claude Opus 5.5) ran the commands on this machine and wrote this report from those runs.
JJAutoCompare commented 2026-11-25 06:05:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:20:25Z.


Empirical test report (175ed9c6)

PR #1509 was tested at commit 175ed9c6060b4424a25f856a423808844ee030cd from a clean checkout.

Hardware / environment

  • Windows x64, build 26200. AMD x64 CPU (family 23, model 113, stepping 0).
  • rustc 1.100.0 (0ef1bc386 2026-11-09), host x86_64-pc-windows-msvc. dxc.exe --version reported dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47).
  • Unoptimized Cargo test profile with debug info and incremental compilation disabled. The focused test ran with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1. Both commands ran outside Invoke-ArcTest.ps1 without acquiring the Arc GPU mutex.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test binaries. The build emitted a Rust deprecation warning for AtomicU32::fetch_update in XGameRuntime.
  • cargo test -p xcl --lib gpu::tiling::tests::chain_and_image_chain_handle_large_mips_and_zero_dimensions -- --exact --nocapture exited 0. The log recorded 1 passed, 0 failed, 0 ignored, 0 skipped, and 743 filtered out.

Observed behavior

  • The regression test exercises CPU layout arithmetic with a linear layout and in-memory image descriptors. A 33-level chain retained all 33 levels, produced a 1-by-1 mip at index 32, and had a positive slice size. A chain built with zero width and height produced a 1-by-1 base level and a slice size of at least four bytes.
  • image_chain returned None for max_mip values of 32 and u32::MAX, and for descriptors with zero width or zero height.

Not tested

The full GPU workspace suite and game smoke runs were omitted.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1509-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153676405 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509#issuecomment-7153676405). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:20:25Z. --- ### Empirical test report (175ed9c6) PR #1509 was tested at commit `175ed9c6060b4424a25f856a423808844ee030cd` from a clean checkout. **Hardware / environment** - Windows x64, build 26200. AMD x64 CPU (family 23, model 113, stepping 0). - `rustc 1.100.0 (0ef1bc386 2026-11-09)`, host `x86_64-pc-windows-msvc`. `dxc.exe --version` reported `dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47)`. - Unoptimized Cargo test profile with debug info and incremental compilation disabled. The focused test ran with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. Both commands ran outside `Invoke-ArcTest.ps1` without acquiring the Arc GPU mutex. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test binaries. The build emitted a Rust deprecation warning for `AtomicU32::fetch_update` in XGameRuntime. - `cargo test -p xcl --lib gpu::tiling::tests::chain_and_image_chain_handle_large_mips_and_zero_dimensions -- --exact --nocapture` exited 0. The log recorded 1 passed, 0 failed, 0 ignored, 0 skipped, and 743 filtered out. **Observed behavior** - The regression test exercises CPU layout arithmetic with a linear layout and in-memory image descriptors. A 33-level chain retained all 33 levels, produced a 1-by-1 mip at index 32, and had a positive slice size. A chain built with zero width and height produced a 1-by-1 base level and a slice size of at least four bytes. - `image_chain` returned `None` for `max_mip` values of 32 and `u32::MAX`, and for descriptors with zero width or zero height. **Not tested** The full GPU workspace suite and game smoke runs were omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1509-focused.log` and published.
b3IKK commented 2026-11-25 16:12:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-25T16:04:12Z.


Rebased onto main 06c9f55; the only conflict was layout_cache_shares_tables_and_isolates_base_xor, which main had added at the same place, and both tests are kept. The commit was then re-created with the same tree to refresh the PR head (GitHub kept the previous head after the first force-push). Current head a0178fc: suite 1266 passed, 0 failed, 46 ignored; the new test fails with the image_chain guard removed (shift-overflow panic at tiling.rs:497); smoke 1641 frames, 0 crashes, 0 removals. The JJAutoCompare report above is for the old 175ed9c; the smoke pair in the description now names this head.

AI use: OpenCode, Claude Fable 5.2 rebased it, re-created the commit, ran the suite and the smoke run and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7167565546 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509#issuecomment-7167565546). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-25T16:04:12Z. --- Rebased onto ``main`` ``06c9f55``; the only conflict was ``layout_cache_shares_tables_and_isolates_base_xor``, which ``main`` had added at the same place, and both tests are kept. The commit was then re-created with the same tree to refresh the PR head (GitHub kept the previous head after the first force-push). Current head ``a0178fc``: suite 1266 passed, 0 failed, 46 ignored; the new test fails with the ``image_chain`` guard removed (shift-overflow panic at ``tiling.rs:497``); smoke 1641 frames, 0 crashes, 0 removals. The JJAutoCompare report above is for the old ``175ed9c``; the smoke pair in the description now names this head. AI use: OpenCode, Claude Fable 5.2 rebased it, re-created the commit, ran the suite and the smoke run and wrote this.
DavidM1911 commented 2026-11-26 06:06:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:40:27Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7183700903 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509#issuecomment-7183700903). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:40:27Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Decodere commented 2026-11-27 15:37:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T15:37:30Z.


Independent desktop NVIDIA verification of PR #1509 at head a0178fce33f76bb767a461a04f12867e4c4f1f05 (1 commit; exact parent & merge-base: 06c9f5505f63f10c5ec49ef932d75b2c28177324, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted tests & build (a0178fce)

Command Result
cargo test --release -p xcl --lib -- --nocapture chain_and_image_chain_handle_large_mips_and_zero_dimensions (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1222 filtered out × 3 (0.00s, 0.00s, 0.00s, 0 skipped)
cargo test --release -p xcl --lib -- --nocapture gpu::tiling:: (3 consecutive runs) 16 passed; 0 failed; 0 ignored; 1207 filtered out × 3 (1.04s, 1.05s, 1.10s, 0 skipped)
cargo build --release -p xcl Clean build (1m 30s, exit 0, 0 new warnings in gpu/tiling.rs)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (06c9f5505f63f10c5ec49ef932d75b2c28177324, cached baseline on the same machine):

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1588 (PresentX 1589)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14452 MB

PR #1509 (a0178fce33f76bb767a461a04f12867e4c4f1f05):

xcl-smoke v1
commit: a0178fce33f76bb767a461a04f12867e4c4f1f05
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1597 (PresentX 1597)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14464 MB

Limits of coverage

  • chain_and_image_chain_handle_large_mips_and_zero_dimensions and the full gpu::tiling:: suite (16/16, 0 skipped) passed 3/3, directly verifying checked_shr/checked_shl for mips > 32, .max(1) clamping for zero dimensions in Chain::new_3d, and early rejection of zero dimensions or max_mip >= 32 in image_chain.
  • The 60 s retail smoke exercises normal valid title textures (0 device removals, 0 crashes, steady 60 Hz) rather than malformed T# descriptors with max_mip >= 32 or zero dimensions; single-run frame/commit delta vs. the cached parent reflects normal startup variance.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7222284635 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509#issuecomment-7222284635). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T15:37:30Z. --- Independent desktop NVIDIA verification of **PR #1509** at head `a0178fce33f76bb767a461a04f12867e4c4f1f05` (`1` commit; exact parent & merge-base: `06c9f5505f63f10c5ec49ef932d75b2c28177324`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, Wave32-only Ada), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted tests & build (`a0178fce`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib -- --nocapture chain_and_image_chain_handle_large_mips_and_zero_dimensions` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1222 filtered out` × 3 (`0.00s`, `0.00s`, `0.00s`, `0` skipped) | | `cargo test --release -p xcl --lib -- --nocapture gpu::tiling::` (3 consecutive runs) | `16 passed; 0 failed; 0 ignored; 1207 filtered out` × 3 (`1.04s`, `1.05s`, `1.10s`, `0` skipped) | | `cargo build --release -p xcl` | Clean build (`1m 30s`, exit `0`, `0` new warnings in `gpu/tiling.rs`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`06c9f5505f63f10c5ec49ef932d75b2c28177324`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1588 (PresentX 1589) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14452 MB ``` PR #1509 (`a0178fce33f76bb767a461a04f12867e4c4f1f05`): ``` xcl-smoke v1 commit: a0178fce33f76bb767a461a04f12867e4c4f1f05 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1597 (PresentX 1597) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14464 MB ``` ### Limits of coverage - `chain_and_image_chain_handle_large_mips_and_zero_dimensions` and the full `gpu::tiling::` suite (`16/16`, `0` skipped) passed `3/3`, directly verifying `checked_shr`/`checked_shl` for `mips > 32`, `.max(1)` clamping for zero dimensions in `Chain::new_3d`, and early rejection of zero dimensions or `max_mip >= 32` in `image_chain`. - The 60 s retail smoke exercises normal valid title textures (`0` device removals, `0` crashes, steady 60 Hz) rather than malformed T# descriptors with `max_mip >= 32` or zero dimensions; single-run frame/commit delta vs. the cached parent reflects normal startup variance. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
ClosetPie107 commented 2026-11-27 16:12:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T16:12:35Z.


Tested on AMD / Linux: a0178fce (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194 plus a local patch dropping the lpVtbl checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, x86_64-pc-windows-gnu debug build, tests run under Wine)

The head as it is (not merged onto current main), with its base 06c9f550 as the baseline.

Tests (XCL_REQUIRE_GPU=wave64)

  • cargo test -p xcl --lib -- gpu::tiling:: --test-threads=1: 16 passed, 0 failed, 0 ignored (includes chain_and_image_chain_handle_large_mips_and_zero_dimensions).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with --skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole (here the first loses the RADV device, the other two run out of memory under Wine): lib 1181 passed, 16 failed, 26 ignored; base 06c9f550 (this PR's base) the same session: lib 1180 passed, 16 failed, 26 ignored. The failures are the same set as on the base. The other binaries fail the same 3 tests as on the base (e2e, pls_quota, predication_e2e).
  • d3d12_resource_and_sync: its fence and queue test ended the process here, as it does on the base and most other trees in this setup.

Not tested

  • Native Windows, NVIDIA / Intel
  • A retail title

AI use

  • Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7222986985 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509#issuecomment-7222986985). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-27T16:12:35Z. --- **Tested on AMD / Linux: `a0178fce`** (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental `experimental-11.0-20261112` with vkd3d-proton master `ec207194` plus a local patch dropping the `lpVtbl` checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, `x86_64-pc-windows-gnu` debug build, tests run under Wine) The head as it is (not merged onto current `main`), with its base `06c9f550` as the baseline. **Tests** (`XCL_REQUIRE_GPU=wave64`) - `cargo test -p xcl --lib -- gpu::tiling:: --test-threads=1`: **16 passed, 0 failed**, 0 ignored (includes `chain_and_image_chain_handle_large_mips_and_zero_dimensions`). - `cargo test --workspace --no-fail-fast -- --test-threads=4` with `--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole` (here the first loses the RADV device, the other two run out of memory under Wine): lib 1181 passed, 16 failed, 26 ignored; base `06c9f550` (this PR's base) the same session: lib 1180 passed, 16 failed, 26 ignored. The failures are the same set as on the base. The other binaries fail the same 3 tests as on the base (`e2e`, `pls_quota`, `predication_e2e`). - `d3d12_resource_and_sync`: its fence and queue test ended the process here, as it does on the base and most other trees in this setup. **Not tested** - Native Windows, NVIDIA / Intel - A retail title **AI use** - Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
Foniass commented 2026-12-01 05:57:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:57:34Z.


Triage (#1607) – head a0178fc

No open or merged PR makes the same change. #1624 also clamps side/depth to 1 in Chain::new_3d, but its subject is mip-tail depth and base_xor masking, not the shift overflow.
The image_chain guards (width == 0, max_mip >= 32) cannot trigger for a decoded T# (desc.rs: width is a field + 1, max_mip is 4 bits); the Chain::new_3d clamps matter for the XG callers (hle/xg.rs), which pass title-supplied sizes and mip counts.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302321568 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1509#issuecomment-7302321568). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:57:34Z. --- **Triage (#1607)** – head a0178fc No open or merged PR makes the same change. #1624 also clamps side/depth to 1 in Chain::new_3d, but its subject is mip-tail depth and base_xor masking, not the shift overflow. The image_chain guards (width == 0, max_mip >= 32) cannot trigger for a decoded T# (desc.rs: width is a field + 1, max_mip is 4 bits); the Chain::new_3d clamps matter for the XG callers (hle/xg.rs), which pass title-supplied sizes and mip counts. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1509:upstream-pr/1509'
git switch 'upstream-pr/1509'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1509'
git switch 'upstream-pr/1509'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1509'
git switch 'upstream-pr/1509'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1509'
git switch 'main'
git merge --squash 'upstream-pr/1509'
git switch 'main'
git merge --ff-only 'upstream-pr/1509'
git switch 'main'
git merge 'upstream-pr/1509'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1499
No description provided.