D3D12.X: force MipLevels=1 and skip mip arithmetic for MSAA descriptors in image_d3d12 #1329

Open
b3IKK wants to merge 1 commit from upstream-pr/1339 into main
b3IKK commented 2026-11-24 14:59:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T14:59:18Z.


valid_image_shape returns early for D2Msaa and D2MsaaArray without validating max_mip or last_level (which encodes log2(samples) for MSAA). image_d3d12 then unconditionally computed t.max_mip + 1 and t.last_level.saturating_sub(t.base_level) + 1, overflowing on u32::MAX and setting MipLevels > 1 for 1x MSAA textures (last_level == 0, samples == 1).

This sets mips = 1 and levels = 1 directly whenever t.ty is D2Msaa or D2MsaaArray.

What is in it

  • crates/xcl/src/gpu/desc.rs: force MipLevels = 1 and skip max_mip + 1 / last_level mip-level arithmetic for D2Msaa / D2MsaaArray in image_d3d12; add unit test msaa_resources_always_have_one_mip_and_never_overflow (verified failing before the fix).

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): 752 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2 no wave64 — gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware)
  • cargo test -p xcl --lib msaa_resources_always_have_one_mip_and_never_overflow: 1 passed, 0 failed (failed before the fix with MipLevels == 16)

Regression run

main:

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

PR:

xcl-smoke v1
commit: ad9c154d7734be7d78d8ea00a2cbe455f9246077
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: 14595 MB

Not tested

  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Gemini 4 Neon: audited desc.rs, wrote the fix and unit test, ran the test suite and scripts/smoke.ps1 regression runs, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5474634616 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1339). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T14:59:18Z. --- `valid_image_shape` returns early for `D2Msaa` and `D2MsaaArray` without validating `max_mip` or `last_level` (which encodes `log2(samples)` for MSAA). `image_d3d12` then unconditionally computed `t.max_mip + 1` and `t.last_level.saturating_sub(t.base_level) + 1`, overflowing on `u32::MAX` and setting `MipLevels > 1` for 1x MSAA textures (`last_level == 0`, `samples == 1`). This sets `mips = 1` and `levels = 1` directly whenever `t.ty` is `D2Msaa` or `D2MsaaArray`. **What is in it** - `crates/xcl/src/gpu/desc.rs`: force `MipLevels = 1` and skip `max_mip + 1` / `last_level` mip-level arithmetic for `D2Msaa` / `D2MsaaArray` in `image_d3d12`; add unit test `msaa_resources_always_have_one_mip_and_never_overflow` (verified failing before the fix). **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`): 752 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2 `no wave64` — `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware`) - `cargo test -p xcl --lib msaa_resources_always_have_one_mip_and_never_overflow`: 1 passed, 0 failed (failed before the fix with `MipLevels == 16`) **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1226 (PresentX 1226) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15341 MB ``` PR: ``` xcl-smoke v1 commit: ad9c154d7734be7d78d8ea00a2cbe455f9246077 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: 14595 MB ``` **Not tested** - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Gemini 4 Neon: audited `desc.rs`, wrote the fix and unit test, ran the test suite and `scripts/smoke.ps1` regression runs, and drafted this PR description.
DavidM1911 commented 2026-11-24 15:06:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T15:05:50Z.


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

  • cargo test -p xcl --lib: 708 passed, 0 failed, 21 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7135451885 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1339#issuecomment-7135451885). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T15:05:50Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 708 passed, 0 failed, 21 ignored. Thanks!
futurepro62 commented 2026-11-24 15:06:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T15:05:53Z.


Full-suite run, since this PR has no test report yet. Tested exact head ad9c154 (on its base 930e8b4).

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, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 752 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: msaa_resources_always_have_one_mip_and_never_overflow.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored, no skips.

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.
<!-- greyfinch-sync:ivall/xcl:comment:7135453715 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1339#issuecomment-7135453715). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T15:05:53Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `ad9c154` (on its base `930e8b4`). **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, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **752 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: `msaa_resources_always_have_one_mip_and_never_overflow`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **752 passed, 0 failed, 41 ignored**, no skips. **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.
DavidM1911 commented 2026-11-24 16:07:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T15:56:07Z.


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

  • cargo test -p xcl --lib -- --test-threads=1: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7136856702 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1339#issuecomment-7136856702). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T15:56:07Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib -- --test-threads=1`: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified `main`.) Thanks!
thehollowedone commented 2026-11-25 10:10:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T09:54:12Z.


Independent Windows test on ad9c154. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC.

cargo build --workspace --offline --locked -j 4 passed. cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4 finished with 752 passed, 0 failed, 41 ignored. The pass count includes two wave64 runtime skips.

With the D3D12 debug layer enabled, cargo test --offline --locked -j 4 -p xcl --lib local_msaa_descriptors_create_native_resources -- --nocapture --test-threads=1 passed 1 of 1 without skips in a scratch fixture. Both 1× cases created native resources with one mip, and a regular 2D control kept three mips. Both 4× cases, with max_mip = u32::MAX, created one-mip native resources and valid shader-resource views after the fixture added ALLOW_RENDER_TARGET. Passing the unmodified 4× resource descriptors directly produced E_INVALIDARG and debug message 599, which requires a render-target or depth-stencil flag for multisampled resources. All five successful resource and view cases emitted zero debug messages. This was synthetic descriptor and resource creation coverage.

AI use: Codex (GPT-6, exact variant unspecified) wrote the scratch fixture, ran the tests and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7158955250 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1339#issuecomment-7158955250). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-25T09:54:12Z. --- Independent Windows test on [ad9c154](https://github.com/xcl-dev/xcl/commit/ad9c154d7734be7d78d8ea00a2cbe455f9246077). Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC. `cargo build --workspace --offline --locked -j 4` passed. `cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4` finished with **752 passed, 0 failed, 41 ignored**. The pass count includes two wave64 runtime skips. With the D3D12 debug layer enabled, `cargo test --offline --locked -j 4 -p xcl --lib local_msaa_descriptors_create_native_resources -- --nocapture --test-threads=1` passed 1 of 1 without skips in a scratch fixture. Both 1× cases created native resources with one mip, and a regular 2D control kept three mips. Both 4× cases, with `max_mip = u32::MAX`, created one-mip native resources and valid shader-resource views after the fixture added `ALLOW_RENDER_TARGET`. Passing the unmodified 4× resource descriptors directly produced `E_INVALIDARG` and debug message 599, which requires a render-target or depth-stencil flag for multisampled resources. All five successful resource and view cases emitted zero debug messages. This was synthetic descriptor and resource creation coverage. AI use: Codex (GPT-6, exact variant unspecified) wrote the scratch fixture, ran the tests and drafted this report.
github-actions[bot] commented 2026-11-28 20:19:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:19:37Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7245203961 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1339#issuecomment-7245203961). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:19:37Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
BBareth commented 2026-11-30 13:11:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T13:11:39Z.


merge-check claim
head: ad9c154d77

<!-- greyfinch-sync:ivall/xcl:comment:7279489007 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1339#issuecomment-7279489007). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T13:11:39Z. --- merge-check claim head: ad9c154d7734be7d78d8ea00a2cbe455f9246077
BBareth commented 2026-11-30 13:22:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T13:22:11Z.


merge-check
base: 9dfbe3ea66
head: ad9c154d77
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The new test gpu::desc::tests::msaa_resources_always_have_one_mip_and_never_overflow passed, as did the existing desc tests. Note: the base failure above is in the MSAA tests too, and this PR does not change it (it fails the same way with and without the PR).
review: no blocking finding; one file, every hunk read. For D2Msaa / D2MsaaArray images image_d3d12 now sets the mip count to 1 from the image type and no longer from samples > 1, and the view's level count to 1. Two cases change: an MSAA-typed image with one sample (last_level 0) got max_mip + 1 mip levels before and gets 1 now; and max_mip + 1 / the level arithmetic are no longer evaluated for MSAA images, where last_level holds the sample count, so max_mip = u32::MAX no longer overflows (a panic in debug builds). Non-MSAA images take the same path as before. Not tested by me: a title that binds a one-sample MSAA-typed image.
performance: none.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7279745399 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1339#issuecomment-7279745399). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T13:22:11Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: ad9c154d7734be7d78d8ea00a2cbe455f9246077 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The new test `gpu::desc::tests::msaa_resources_always_have_one_mip_and_never_overflow` passed, as did the existing desc tests. Note: the base failure above is in the MSAA tests too, and this PR does not change it (it fails the same way with and without the PR). review: no blocking finding; one file, every hunk read. For `D2Msaa` / `D2MsaaArray` images `image_d3d12` now sets the mip count to 1 from the image type and no longer from `samples > 1`, and the view's level count to 1. Two cases change: an MSAA-typed image with one sample (`last_level` 0) got `max_mip + 1` mip levels before and gets 1 now; and `max_mip + 1` / the level arithmetic are no longer evaluated for MSAA images, where `last_level` holds the sample count, so `max_mip = u32::MAX` no longer overflows (a panic in debug builds). Non-MSAA images take the same path as before. Not tested by me: a title that binds a one-sample MSAA-typed image. performance: none. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
tiagonleal commented 2026-11-30 13:46:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-30T13:46:41Z.


merge-check
base: 9dfbe3ea66
head: ad9c154d77
merge: clean
build: cargo build --workspace -> ok (also cargo build --release -p xcl)
tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; SKIPPED: 24 lines, the same as on the base; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails the same way on the base alone (2885 passed, 1 failed, 51 ignored; #3513 fixes it). The new test gpu::desc::tests::msaa_resources_always_have_one_mip_and_never_overflow ran and passed. With the two lines put back to main (mips = t.max_mip + 1 and MipLevels: if samples > 1 { 1 } else { mips }), it fails at desc.rs:597 (left 16, right 1); file restored after.
review: one file, whole diff read. What this adds to the first check: no path a title reaches today runs the changed lines for an MSAA image. In production image_d3d12 is called only from texture::create (texture.rs:142), which first calls subresources and so placement, and placement returns an error for D2Msaa / D2MsaaArray (texture.rs:61-63, "not yet (MSAA)"). The other callers are tests (real.rs:10456, real.rs:10492, recomp/tests.rs:5565). The overflow case also needs max_mip or last_level near u32::MAX, but image() decodes both from 4-bit fields (desc.rs:68-69), so only a hand-built Image reaches it. The change is still correct and consistent: levels is not used by the MSAA view arms (desc.rs:279-283), and a one-sample MSAA image now gets one mip. A note for whoever enables MSAA upload later: tiling::image_chain still builds max_mip + 1 levels (tiling.rs:927), so a one-sample MSAA image with max_mip > 0 would give more subresources than MipLevels and fail validate_subresource_count (texture.rs:185); today placement stops it first. Overlap: #540 adds D3D12 tests of image_d3d12 that include D2Msaa; I did not check whether its expectations match the new mip count.
performance: scripts/smoke.ps1, 60 s of a retail title, release, after one warm-up run of the base: 1667 frames and 17425 MB peak commit against 1659 frames and 17322 MB on the base (warm-up: 1689, 17197 MB). No device removal, no crash. The changed path is not reached, so this only shows no regression elsewhere.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5 ran the build, suite, tests and smoke, reviewed the diff against the merged source and wrote this)

  • Tiago
<!-- greyfinch-sync:ivall/xcl:comment:7280341933 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1339#issuecomment-7280341933). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-30T13:46:41Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: ad9c154d7734be7d78d8ea00a2cbe455f9246077 merge: clean build: cargo build --workspace -> ok (also `cargo build --release -p xcl`) tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; SKIPPED: 24 lines, the same as on the base; failing: `gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16`, which fails the same way on the base alone (2885 passed, 1 failed, 51 ignored; #3513 fixes it). The new test `gpu::desc::tests::msaa_resources_always_have_one_mip_and_never_overflow` ran and passed. With the two lines put back to main (`mips = t.max_mip + 1` and `MipLevels: if samples > 1 { 1 } else { mips }`), it fails at `desc.rs:597` (left 16, right 1); file restored after. review: one file, whole diff read. What this adds to the first check: no path a title reaches today runs the changed lines for an MSAA image. In production `image_d3d12` is called only from `texture::create` (`texture.rs:142`), which first calls `subresources` and so `placement`, and `placement` returns an error for `D2Msaa` / `D2MsaaArray` (`texture.rs:61-63`, "not yet (MSAA)"). The other callers are tests (`real.rs:10456`, `real.rs:10492`, `recomp/tests.rs:5565`). The overflow case also needs `max_mip` or `last_level` near `u32::MAX`, but `image()` decodes both from 4-bit fields (`desc.rs:68-69`), so only a hand-built `Image` reaches it. The change is still correct and consistent: `levels` is not used by the MSAA view arms (`desc.rs:279-283`), and a one-sample MSAA image now gets one mip. A note for whoever enables MSAA upload later: `tiling::image_chain` still builds `max_mip + 1` levels (`tiling.rs:927`), so a one-sample MSAA image with `max_mip > 0` would give more subresources than `MipLevels` and fail `validate_subresource_count` (`texture.rs:185`); today `placement` stops it first. Overlap: #540 adds D3D12 tests of `image_d3d12` that include `D2Msaa`; I did not check whether its expectations match the new mip count. performance: `scripts/smoke.ps1`, 60 s of a retail title, release, after one warm-up run of the base: 1667 frames and 17425 MB peak commit against 1659 frames and 17322 MB on the base (warm-up: 1689, 17197 MB). No device removal, no crash. The changed path is not reached, so this only shows no regression elsewhere. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5 ran the build, suite, tests and smoke, reviewed the diff against the merged source and wrote this) - Tiago
Foniass commented 2026-12-01 05:28:27 +00:00 (Migrated from github.com)

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


Triage (#1607) – head ad9c154

No open or merged PR makes this change. On main, image_d3d12 still computes t.max_mip + 1 and last_level - base_level + 1 for MSAA images. valid_image_shape returns early for MSAA without bounding max_mip, so a large max_mip overflows, and a 1-sample MSAA image gets MipLevels = max_mip + 1. The new test exercises both cases. No problems found in the diff.
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:7301807007 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1339#issuecomment-7301807007). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:28:27Z. --- **Triage (#1607)** – head ad9c154 No open or merged PR makes this change. On main, `image_d3d12` still computes `t.max_mip + 1` and `last_level - base_level + 1` for MSAA images. `valid_image_shape` returns early for MSAA without bounding `max_mip`, so a large `max_mip` overflows, and a 1-sample MSAA image gets `MipLevels = max_mip + 1`. The new test exercises both cases. No problems found in the diff. 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/1339:upstream-pr/1339'
git switch 'upstream-pr/1339'

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/1339'
git switch 'upstream-pr/1339'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1339'
git switch 'upstream-pr/1339'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1339'
git switch 'main'
git merge --squash 'upstream-pr/1339'
git switch 'main'
git merge --ff-only 'upstream-pr/1339'
git switch 'main'
git merge 'upstream-pr/1339'
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!1329
No description provided.