startup: check the 64 KiB tile plan without a device #1731

Merged
Asimmimx merged 1 commit from upstream-pr/1738 into main 2026-11-24 18:48:51 +00:00
Asimmimx commented 2026-11-24 17:58:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Asimmimx on 2026-11-24T17:58:55Z.


Refs #1149.

What the header does

src/startup_stubs/tile64_plan.h answers XG texture-computer slot 10 (GetResourceTiling without a resource, src/startup_stubs/xg_xs.cpp) for two-dimensional textures with the 64 KiB standard layout 0x10a. tile_shape() maps a DXGI format to the texels in one 64 KiB tile (512x256 for 8-byte blocks, 256x256 for 16-byte blocks and 8-bit texels, 256x128 for 16-bit texels, 128x128 for 32-bit texels with 8-bit channels). Plan::supports() decides which descriptions take the plan; everything else still goes to a desktop reserved resource. Plan counts the standard mips (a mip at most half a tile wide and one tile high shares the first tile with all smaller mips), the tiles each one covers and its start in the slice, smallest mip first.

Tests that reach it

startup_xg_tile64_tiling (tests/startup_xg_tile64_tiling_check.py) loads xg_xs.dll and asks slot 10 for 18 shapes in ten formats (BC1, BC3, BC5, BC7, R8G8B8A8, A8 and R16_FLOAT). All 18 take the plan, so supports() is only ever asked descriptions it accepts. No other test includes the header.

Mutation probe

Each mutant was applied alone to tile64_plan.h. For the existing check startup_stub_xg_xs was rebuilt and ctest -R '^startup_xg_tile64_tiling$' was run; for the new check startup_tile64_plan_check was rebuilt and ctest -R '^startup_tile64_plan$' was run. The header was restored after each mutant. The new check alone kills every mutant in the last column.

Mutant Existing check With new cases
bc1-lo: (f >= 70 && f <= 72) → (f >= 71 && f <= 72) survived killed
bc1-hi: (f >= 70 && f <= 72) → (f >= 70 && f <= 71) killed killed
bc4-lo: (f >= 79 && f <= 81) → (f >= 80 && f <= 81) survived killed
bc4-hi: (f >= 79 && f <= 81) → (f >= 79 && f <= 80) survived killed
bc23-lo: (f >= 73 && f <= 78) → (f >= 74 && f <= 78) survived killed
bc23-hi: (f >= 73 && f <= 78) → (f >= 73 && f <= 77) survived killed
bc5-lo: (f >= 82 && f <= 84) → (f >= 83 && f <= 84) survived killed
bc5-hi: (f >= 82 && f <= 84) → (f >= 82 && f <= 83) survived killed
bc67-lo: (f >= 94 && f <= 99) → (f >= 95 && f <= 99) survived killed
bc67-hi: (f >= 94 && f <= 99) → (f >= 94 && f <= 98) killed killed
r8-lo: f >= 60 && f <= 65 → f >= 61 && f <= 65 survived killed
r8-hi: f >= 60 && f <= 65 → f >= 60 && f <= 64 killed killed
r8-wide: f >= 60 && f <= 65 → f >= 60 && f <= 66 survived killed
r16-lo: f >= 48 && f <= 59 → f >= 49 && f <= 59 survived killed
r16-hi: f >= 48 && f <= 59 → f >= 48 && f <= 58 survived killed
r16-wide: f >= 48 && f <= 59 → f >= 47 && f <= 59 survived survived
rgba8-lo: (f >= 27 && f <= 32) → (f >= 28 && f <= 32) survived killed
rgba8-hi: (f >= 27 && f <= 32) → (f >= 27 && f <= 31) survived killed
rgba8-wide: (f >= 27 && f <= 32) → (f >= 26 && f <= 32) survived survived
bgra-87: f == 87 || f == 88 || → f == 88 || survived killed
bgra-88: f == 87 || f == 88 || → f == 87 || survived killed
bgra-89: f == 87 || f == 88 || → (f >= 87 && f <= 89) || survived survived
bgra-lo: (f >= 90 && f <= 93) → (f >= 91 && f <= 93) survived killed
bgra-hi: (f >= 90 && f <= 93) → (f >= 90 && f <= 92) survived killed
bc8-shape: return width = 512, height = 256, true; → return width = 256, height = 512, true; killed killed
r16-shape: return width = 256, height = 128, true; → return width = 128, height = 256, true; killed killed
r8-shape: if (f >= 60 && f <= 65) return width = 256, height = 256, true; → if (f >= 60 && f <= 65) return width = 256, height = 128, true; killed killed
drop-dim: d.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D && → (removed) survived killed
drop-layout: static_cast<UINT>(d.Layout) == 0x10a && → (removed) survived killed
drop-width0: d.Width && d.Height && → d.Height && survived killed
drop-height0: d.Width && d.Height && → d.Width && survived killed
drop-wmax: d.Width <= 16384 && → (removed) survived killed
drop-hmax: d.Height <= 16384 && → (removed) survived killed
wmax-off: d.Width <= 16384 && → d.Width <= 16383 && survived killed
drop-depth0: d.DepthOrArraySize && d.MipLevels && → d.MipLevels && survived killed
drop-mips0: d.DepthOrArraySize && d.MipLevels && → d.DepthOrArraySize && survived killed
drop-mipmax: d.MipLevels <= max_mips && → (removed) survived killed
mipmax-lt: d.MipLevels <= max_mips && → d.MipLevels < max_mips && survived killed
drop-samples: d.SampleDesc.Count <= 1 && → (removed) survived killed
shared-w-lt: if (w * 2 <= tile_width && h <= tile_height) break; → if (w * 2 < tile_width && h <= tile_height) break; killed killed
shared-h-lt: if (w * 2 <= tile_width && h <= tile_height) break; → if (w * 2 <= tile_width && h < tile_height) break; killed killed
shared-w-full: if (w * 2 <= tile_width && h <= tile_height) break; → if (w <= tile_width && h <= tile_height) break; killed killed
shared-h-half: if (w * 2 <= tile_width && h <= tile_height) break; → if (w * 2 <= tile_width && h * 2 <= tile_height) break; killed killed
height-no-clamp: h = (std::max)(1u, d.Height >> standard) → h = d.Height >> standard survived killed
width-no-clamp: w = (std::max)(1u, static_cast<UINT>(d.Width) >> standard) → w = static_cast<UINT>(d.Width) >> standard survived killed
wide-floor: wide[standard] = (w + tile_width - 1) / tile_width; → wide[standard] = (w + tile_width - 2) / tile_width + (w < tile_width); killed killed
high-floor: high[standard] = (h + tile_height - 1) / tile_height; → high[standard] = (std::max)(1u, h / tile_height); survived killed
shared-always: shared_tiles = standard < mips ? 1 : 0; → shared_tiles = 1; killed killed
shared-never: shared_tiles = standard < mips ? 1 : 0; → shared_tiles = 0; killed killed
order-largest-first: for (UINT mip = standard; mip-- > 0;) { → for (UINT mip = 0; mip < standard; ++mip) { killed killed

Existing check: 14 of 50 killed. New check: 47 of 50 killed.

New check

tests/startup_tile64_plan_check.cpp includes the header directly; it needs neither the XG DLL nor a device. It is registered next to startup_bc64_supports, the device-free check of the sibling bc64_chain.h, rather than next to startup_xg_tile64_tiling, which sits inside the INTAKE_PYTHON block and needs the Python environment.

  • Tile shapes. The 51 formats the plan takes, listed by DXGI name in four groups: BC1 and BC4 (512x256); BC2, BC3, BC5, BC6H, BC7, R8 and A8 (256x256); R8G8, R16 and D16 (256x128); R8G8B8A8, B8G8R8A8 and B8G8R8X8 (128x128). Three formats that must have no shape: UNKNOWN, X32_TYPELESS_G8X24_UINT (8 bytes) and R1_UNORM (1 bit).
  • Descriptions. Each bound of supports() from both sides, starting from a 256x256 R8 texture: width and height 16384 taken, 16385 and 0 refused; a width of 0x1'00000100 (256 when cut to 32 bits) refused; 2048 slices taken and 0 refused; 16 mips taken, 17 and 0 refused; two samples; 1D, 3D and buffer dimensions; layout 0x109, the desktop 64 KiB standard swizzle and unknown; an unknown format.
  • Plans, worked by hand from the rule in the header's comment (tile shape, standard and packed mip counts, shared tile, tiles per slice, and each standard mip's tiles wide, tiles high and start):
    • 1024x1 RGBA8, 11 mips: 8x1@8, 4x1@4, 2x1@2, 1x1@1, 16 tiles. The height is clamped to one texel at every mip.
    • 1x1024 RGBA8, 11 mips: 1x8@7, 1x4@3, 1x2@1, 15 tiles. The width is clamped to one texel.
    • 1024x512 BC4, 6 slices, 11 mips: 2x2@2, 1x1@1, 6 tiles per slice. Mip 1 is exactly one tile.
    • 516x128 R16, 10 mips: 3x1@4, 2x1@2, 1x1@1, 7 tiles. Mip 2 is 129 texels wide, one more than half a tile.
    • 128x256 B8G8R8A8, 9 mips: 1x2@1, 3 tiles. Mip 1 (64x128) is exactly half a tile wide and one tile high, so it shares tile 0.
    • 300x600 R8, one mip: 2x3@0, 6 tiles. Rounds up in both directions.
    • 512x256 BC6H, one mip: 2x1@0, 2 tiles, no shared tile.

Negative controls

Registered with WILL_FAIL TRUE:

  • startup_tile64_plan_bc4_control (--mutate bc4): expects the BC4 formats to have no tile shape. Prints FAIL format 79: 512x256, expected no shape and the same for 80 and 81.
  • startup_tile64_plan_width_control (--mutate width): expects a 16385-texel width to be taken. Prints FAIL width 16385 taken.
  • startup_tile64_plan_clamp_control (--mutate clamp): expects the 1024x1 chain without the height clamp (mips 1 to 3 zero tiles high, 9 tiles). Prints FAIL 1024x1 RGBA8: tile 128x128, 4 standard of 11 mips, 1 shared, 16 tiles per slice; mips: 8x1@8 4x1@4 2x1@2 1x1@1.

Not pinned

  • The three 32-bit formats next to the listed ranges, R11G11B10_FLOAT (26), R10G10B10_XR_BIAS_A2 (89) and X24_TYPELESS_G8_UINT (47), are not pinned as refused. The header's comment limits 32-bit formats to 8-bit channels, but a 64 KiB standard tile shape depends only on the texel size, so taking them later (with a 128x128 shape) may be intended. These are the three surviving mutants.
  • Other unlisted formats (for example R16G16_*, B5G6R5_UNORM) are not pinned as refused for the same reason.
  • SampleDesc.Count == 0 is taken by supports(); the check does not pin it either way.
  • Texel addresses inside a tile and slots 2, 8 and 9 are outside this header.

Commands and results

cmake --preset dev
cmake --build --preset dev --target startup_tile64_plan_check startup_stub_xg_xs
ctest --preset dev --no-tests=error -R '^startup_(tile64_plan|xg_tile64_tiling)' --output-on-failure
1/5 Test #194: startup_tile64_plan .................   Passed    0.02 sec
2/5 Test #195: startup_tile64_plan_bc4_control .....   Passed    0.01 sec
3/5 Test #196: startup_tile64_plan_width_control ...   Passed    0.01 sec
4/5 Test #197: startup_tile64_plan_clamp_control ...   Passed    0.01 sec
5/5 Test #356: startup_xg_tile64_tiling ............   Passed    0.28 sec
100% tests passed, 0 tests failed out of 5

python -B tests/docs_links_check.py: Checked 17 Markdown files and 364 links. No capability skips. startup_tile64_plan uses no device. docs/experiments.md gains a paragraph on the new check and its commands under "Slot-10 tile plan for layout 0x10a".

Environment

Windows 11 Pro 26300.9974, MSVC from Visual Studio, dev preset (Debug). Commit ad410f54c89503edb2c685d1d145103e676cd8b0 on main at 68969ed8.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6588145920 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1738). Originally posted by [Asimmimx](https://github.com/Asimmimx) on 2026-11-24T17:58:55Z. --- Refs #1149. ## What the header does `src/startup_stubs/tile64_plan.h` answers XG texture-computer slot 10 (`GetResourceTiling` without a resource, `src/startup_stubs/xg_xs.cpp`) for two-dimensional textures with the 64 KiB standard layout `0x10a`. `tile_shape()` maps a DXGI format to the texels in one 64 KiB tile (512x256 for 8-byte blocks, 256x256 for 16-byte blocks and 8-bit texels, 256x128 for 16-bit texels, 128x128 for 32-bit texels with 8-bit channels). `Plan::supports()` decides which descriptions take the plan; everything else still goes to a desktop reserved resource. `Plan` counts the standard mips (a mip at most half a tile wide and one tile high shares the first tile with all smaller mips), the tiles each one covers and its start in the slice, smallest mip first. ## Tests that reach it `startup_xg_tile64_tiling` (`tests/startup_xg_tile64_tiling_check.py`) loads `xg_xs.dll` and asks slot 10 for 18 shapes in ten formats (BC1, BC3, BC5, BC7, R8G8B8A8, A8 and R16_FLOAT). All 18 take the plan, so `supports()` is only ever asked descriptions it accepts. No other test includes the header. ## Mutation probe Each mutant was applied alone to `tile64_plan.h`. For the existing check `startup_stub_xg_xs` was rebuilt and `ctest -R '^startup_xg_tile64_tiling$'` was run; for the new check `startup_tile64_plan_check` was rebuilt and `ctest -R '^startup_tile64_plan$'` was run. The header was restored after each mutant. The new check alone kills every mutant in the last column. | Mutant | Existing check | With new cases | |---|---|---| | bc1-lo: `(f >= 70 && f <= 72)` → `(f >= 71 && f <= 72)` | survived | killed | | bc1-hi: `(f >= 70 && f <= 72)` → `(f >= 70 && f <= 71)` | killed | killed | | bc4-lo: `(f >= 79 && f <= 81)` → `(f >= 80 && f <= 81)` | survived | killed | | bc4-hi: `(f >= 79 && f <= 81)` → `(f >= 79 && f <= 80)` | survived | killed | | bc23-lo: `(f >= 73 && f <= 78)` → `(f >= 74 && f <= 78)` | survived | killed | | bc23-hi: `(f >= 73 && f <= 78)` → `(f >= 73 && f <= 77)` | survived | killed | | bc5-lo: `(f >= 82 && f <= 84)` → `(f >= 83 && f <= 84)` | survived | killed | | bc5-hi: `(f >= 82 && f <= 84)` → `(f >= 82 && f <= 83)` | survived | killed | | bc67-lo: `(f >= 94 && f <= 99)` → `(f >= 95 && f <= 99)` | survived | killed | | bc67-hi: `(f >= 94 && f <= 99)` → `(f >= 94 && f <= 98)` | killed | killed | | r8-lo: `f >= 60 && f <= 65` → `f >= 61 && f <= 65` | survived | killed | | r8-hi: `f >= 60 && f <= 65` → `f >= 60 && f <= 64` | killed | killed | | r8-wide: `f >= 60 && f <= 65` → `f >= 60 && f <= 66` | survived | killed | | r16-lo: `f >= 48 && f <= 59` → `f >= 49 && f <= 59` | survived | killed | | r16-hi: `f >= 48 && f <= 59` → `f >= 48 && f <= 58` | survived | killed | | r16-wide: `f >= 48 && f <= 59` → `f >= 47 && f <= 59` | survived | survived | | rgba8-lo: `(f >= 27 && f <= 32)` → `(f >= 28 && f <= 32)` | survived | killed | | rgba8-hi: `(f >= 27 && f <= 32)` → `(f >= 27 && f <= 31)` | survived | killed | | rgba8-wide: `(f >= 27 && f <= 32)` → `(f >= 26 && f <= 32)` | survived | survived | | bgra-87: `f == 87 \|\| f == 88 \|\|` → `f == 88 \|\|` | survived | killed | | bgra-88: `f == 87 \|\| f == 88 \|\|` → `f == 87 \|\|` | survived | killed | | bgra-89: `f == 87 \|\| f == 88 \|\|` → `(f >= 87 && f <= 89) \|\|` | survived | survived | | bgra-lo: `(f >= 90 && f <= 93)` → `(f >= 91 && f <= 93)` | survived | killed | | bgra-hi: `(f >= 90 && f <= 93)` → `(f >= 90 && f <= 92)` | survived | killed | | bc8-shape: `return width = 512, height = 256, true;` → `return width = 256, height = 512, true;` | killed | killed | | r16-shape: `return width = 256, height = 128, true;` → `return width = 128, height = 256, true;` | killed | killed | | r8-shape: `if (f >= 60 && f <= 65) return width = 256, height = 256, true;` → `if (f >= 60 && f <= 65) return width = 256, height = 128, true;` | killed | killed | | drop-dim: `d.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D &&` → `(removed)` | survived | killed | | drop-layout: `static_cast<UINT>(d.Layout) == 0x10a &&` → `(removed)` | survived | killed | | drop-width0: `d.Width && d.Height &&` → `d.Height &&` | survived | killed | | drop-height0: `d.Width && d.Height &&` → `d.Width &&` | survived | killed | | drop-wmax: `d.Width <= 16384 &&` → `(removed)` | survived | killed | | drop-hmax: `d.Height <= 16384 &&` → `(removed)` | survived | killed | | wmax-off: `d.Width <= 16384 &&` → `d.Width <= 16383 &&` | survived | killed | | drop-depth0: `d.DepthOrArraySize && d.MipLevels &&` → `d.MipLevels &&` | survived | killed | | drop-mips0: `d.DepthOrArraySize && d.MipLevels &&` → `d.DepthOrArraySize &&` | survived | killed | | drop-mipmax: `d.MipLevels <= max_mips &&` → `(removed)` | survived | killed | | mipmax-lt: `d.MipLevels <= max_mips &&` → `d.MipLevels < max_mips &&` | survived | killed | | drop-samples: `d.SampleDesc.Count <= 1 &&` → `(removed)` | survived | killed | | shared-w-lt: `if (w * 2 <= tile_width && h <= tile_height) break;` → `if (w * 2 < tile_width && h <= tile_height) break;` | killed | killed | | shared-h-lt: `if (w * 2 <= tile_width && h <= tile_height) break;` → `if (w * 2 <= tile_width && h < tile_height) break;` | killed | killed | | shared-w-full: `if (w * 2 <= tile_width && h <= tile_height) break;` → `if (w <= tile_width && h <= tile_height) break;` | killed | killed | | shared-h-half: `if (w * 2 <= tile_width && h <= tile_height) break;` → `if (w * 2 <= tile_width && h * 2 <= tile_height) break;` | killed | killed | | height-no-clamp: `h = (std::max)(1u, d.Height >> standard)` → `h = d.Height >> standard` | survived | killed | | width-no-clamp: `w = (std::max)(1u, static_cast<UINT>(d.Width) >> standard)` → `w = static_cast<UINT>(d.Width) >> standard` | survived | killed | | wide-floor: `wide[standard] = (w + tile_width - 1) / tile_width;` → `wide[standard] = (w + tile_width - 2) / tile_width + (w < tile_width);` | killed | killed | | high-floor: `high[standard] = (h + tile_height - 1) / tile_height;` → `high[standard] = (std::max)(1u, h / tile_height);` | survived | killed | | shared-always: `shared_tiles = standard < mips ? 1 : 0;` → `shared_tiles = 1;` | killed | killed | | shared-never: `shared_tiles = standard < mips ? 1 : 0;` → `shared_tiles = 0;` | killed | killed | | order-largest-first: `for (UINT mip = standard; mip-- > 0;) {` → `for (UINT mip = 0; mip < standard; ++mip) {` | killed | killed | Existing check: 14 of 50 killed. New check: 47 of 50 killed. ## New check `tests/startup_tile64_plan_check.cpp` includes the header directly; it needs neither the XG DLL nor a device. It is registered next to `startup_bc64_supports`, the device-free check of the sibling `bc64_chain.h`, rather than next to `startup_xg_tile64_tiling`, which sits inside the `INTAKE_PYTHON` block and needs the Python environment. - **Tile shapes.** The 51 formats the plan takes, listed by DXGI name in four groups: BC1 and BC4 (512x256); BC2, BC3, BC5, BC6H, BC7, R8 and A8 (256x256); R8G8, R16 and D16 (256x128); R8G8B8A8, B8G8R8A8 and B8G8R8X8 (128x128). Three formats that must have no shape: `UNKNOWN`, `X32_TYPELESS_G8X24_UINT` (8 bytes) and `R1_UNORM` (1 bit). - **Descriptions.** Each bound of `supports()` from both sides, starting from a 256x256 R8 texture: width and height 16384 taken, 16385 and 0 refused; a width of 0x1'00000100 (256 when cut to 32 bits) refused; 2048 slices taken and 0 refused; 16 mips taken, 17 and 0 refused; two samples; 1D, 3D and buffer dimensions; layout `0x109`, the desktop 64 KiB standard swizzle and unknown; an unknown format. - **Plans**, worked by hand from the rule in the header's comment (tile shape, standard and packed mip counts, shared tile, tiles per slice, and each standard mip's tiles wide, tiles high and start): - 1024x1 RGBA8, 11 mips: 8x1@8, 4x1@4, 2x1@2, 1x1@1, 16 tiles. The height is clamped to one texel at every mip. - 1x1024 RGBA8, 11 mips: 1x8@7, 1x4@3, 1x2@1, 15 tiles. The width is clamped to one texel. - 1024x512 BC4, 6 slices, 11 mips: 2x2@2, 1x1@1, 6 tiles per slice. Mip 1 is exactly one tile. - 516x128 R16, 10 mips: 3x1@4, 2x1@2, 1x1@1, 7 tiles. Mip 2 is 129 texels wide, one more than half a tile. - 128x256 B8G8R8A8, 9 mips: 1x2@1, 3 tiles. Mip 1 (64x128) is exactly half a tile wide and one tile high, so it shares tile 0. - 300x600 R8, one mip: 2x3@0, 6 tiles. Rounds up in both directions. - 512x256 BC6H, one mip: 2x1@0, 2 tiles, no shared tile. ## Negative controls Registered with `WILL_FAIL TRUE`: - `startup_tile64_plan_bc4_control` (`--mutate bc4`): expects the BC4 formats to have no tile shape. Prints `FAIL format 79: 512x256, expected no shape` and the same for 80 and 81. - `startup_tile64_plan_width_control` (`--mutate width`): expects a 16385-texel width to be taken. Prints `FAIL width 16385 taken`. - `startup_tile64_plan_clamp_control` (`--mutate clamp`): expects the 1024x1 chain without the height clamp (mips 1 to 3 zero tiles high, 9 tiles). Prints `FAIL 1024x1 RGBA8: tile 128x128, 4 standard of 11 mips, 1 shared, 16 tiles per slice; mips: 8x1@8 4x1@4 2x1@2 1x1@1`. ## Not pinned - The three 32-bit formats next to the listed ranges, `R11G11B10_FLOAT` (26), `R10G10B10_XR_BIAS_A2` (89) and `X24_TYPELESS_G8_UINT` (47), are not pinned as refused. The header's comment limits 32-bit formats to 8-bit channels, but a 64 KiB standard tile shape depends only on the texel size, so taking them later (with a 128x128 shape) may be intended. These are the three surviving mutants. - Other unlisted formats (for example `R16G16_*`, `B5G6R5_UNORM`) are not pinned as refused for the same reason. - `SampleDesc.Count == 0` is taken by `supports()`; the check does not pin it either way. - Texel addresses inside a tile and slots 2, 8 and 9 are outside this header. ## Commands and results ```powershell cmake --preset dev cmake --build --preset dev --target startup_tile64_plan_check startup_stub_xg_xs ctest --preset dev --no-tests=error -R '^startup_(tile64_plan|xg_tile64_tiling)' --output-on-failure ``` ``` 1/5 Test #194: startup_tile64_plan ................. Passed 0.02 sec 2/5 Test #195: startup_tile64_plan_bc4_control ..... Passed 0.01 sec 3/5 Test #196: startup_tile64_plan_width_control ... Passed 0.01 sec 4/5 Test #197: startup_tile64_plan_clamp_control ... Passed 0.01 sec 5/5 Test #356: startup_xg_tile64_tiling ............ Passed 0.28 sec 100% tests passed, 0 tests failed out of 5 ``` `python -B tests/docs_links_check.py`: `Checked 17 Markdown files and 364 links.` No capability skips. `startup_tile64_plan` uses no device. `docs/experiments.md` gains a paragraph on the new check and its commands under "Slot-10 tile plan for layout `0x10a`". ## Environment Windows 11 Pro 26300.9974, MSVC from Visual Studio, `dev` preset (Debug). Commit `ad410f54c89503edb2c685d1d145103e676cd8b0` on `main` at `68969ed8`. AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-24 19:01:12 +00:00
tedin7 commented 2026-11-24 19:01:12 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T18:24:28Z.

Review: COMMENTED


Peer review of PR #1738 at head ad410f54c89503edb2c685d1d145103e676cd8b0.

Summary

  • Scope & hygiene: Changes are confined to CMakeLists.txt, docs/experiments.md, and tests/startup_tile64_plan_check.cpp. No src/ files were modified. Title-neutral, MIT clean-room.
  • Test quality: startup_tile64_plan verifies x2w_startup::tile64::tile_shape() across all supported format groups (512x256, 256x256, 256x128, 128x128) and three unsupported formats (DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_X32_TYPELESS_G8X24_UINT, DXGI_FORMAT_R1_UNORM); Plan::supports() boundary checks (width/height 0, 16384, 16385, 0x100000100ull 32-bit wrap, slice/mip bounds, sample count, dimension, layout 0x109 vs 0x10a vs desktop standard swizzle); and seven hand-worked Plan layouts covering 1-texel chains, shared-tile threshold, multi-slice BC4, and non-multiple-of-tile dimensions.
  • Negative controls: startup_tile64_plan_bc4_control, startup_tile64_plan_width_control, and startup_tile64_plan_clamp_control (WILL_FAIL TRUE) verify failure detection for --mutate bc4|width|clamp.
  • Findings: No P1 or P2 issues found.

Checks executed

  • Linux (prep-verify 1738):
    • python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py prep-verify 1738 --dir /tmp/rev-x2w-84/1738 --json -> git_diff_check: PASS, docs_links_check: PASS, bidi_controls_check: PASS, py_compile: PASS.
  • Win2025 Debug & Release /O2 (win2025 1738, Build 26100, MSVC 14.44.35207):
    • python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py win2025 1738 --wait 600 --targets startup_tile64_plan_check --regex "^startup_tile64_plan"
    • Debug (--preset dev): 4/4 passed (startup_tile64_plan 0.03s, startup_tile64_plan_bc4_control 0.02s, startup_tile64_plan_width_control 0.01s, startup_tile64_plan_clamp_control 0.01s).
    • Release /O2 (--preset release): 4/4 passed (startup_tile64_plan 0.03s, startup_tile64_plan_bc4_control 0.02s, startup_tile64_plan_width_control 0.01s, startup_tile64_plan_clamp_control 0.01s).
  • Mutation check on src/startup_stubs/tile64_plan.h (Win2025 Debug):
    • python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py win2025 1738 --wait 600 --targets startup_tile64_plan_check --regex "^startup_tile64_plan$" --skip-release --patch /tmp/rev-x2w-84/mut_1738.patch (changing w * 2 <= tile_width to w <= tile_width in Plan::Plan) -> Mutant killed: startup_tile64_plan failed on 1024x1 RGBA8, 1024x512 BC4, and 516x128 R16.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6044995274 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1738#pullrequestreview-6044995274). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T18:24:28Z. **Review:** COMMENTED --- Peer review of PR #1738 at head `ad410f54c89503edb2c685d1d145103e676cd8b0`. ### Summary - **Scope & hygiene**: Changes are confined to `CMakeLists.txt`, `docs/experiments.md`, and `tests/startup_tile64_plan_check.cpp`. No `src/` files were modified. Title-neutral, MIT clean-room. - **Test quality**: `startup_tile64_plan` verifies `x2w_startup::tile64::tile_shape()` across all supported format groups (`512x256`, `256x256`, `256x128`, `128x128`) and three unsupported formats (`DXGI_FORMAT_UNKNOWN`, `DXGI_FORMAT_X32_TYPELESS_G8X24_UINT`, `DXGI_FORMAT_R1_UNORM`); `Plan::supports()` boundary checks (width/height `0`, `16384`, `16385`, `0x100000100ull` 32-bit wrap, slice/mip bounds, sample count, dimension, layout `0x109` vs `0x10a` vs desktop standard swizzle); and seven hand-worked `Plan` layouts covering 1-texel chains, shared-tile threshold, multi-slice BC4, and non-multiple-of-tile dimensions. - **Negative controls**: `startup_tile64_plan_bc4_control`, `startup_tile64_plan_width_control`, and `startup_tile64_plan_clamp_control` (`WILL_FAIL TRUE`) verify failure detection for `--mutate bc4|width|clamp`. - **Findings**: No P1 or P2 issues found. ### Checks executed - **Linux (`prep-verify 1738`)**: - `python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py prep-verify 1738 --dir /tmp/rev-x2w-84/1738 --json` -> `git_diff_check`: PASS, `docs_links_check`: PASS, `bidi_controls_check`: PASS, `py_compile`: PASS. - **Win2025 Debug & Release `/O2` (`win2025 1738`, Build 26100, MSVC 14.44.35207)**: - `python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py win2025 1738 --wait 600 --targets startup_tile64_plan_check --regex "^startup_tile64_plan"` - Debug (`--preset dev`): **4/4 passed** (`startup_tile64_plan` `0.03s`, `startup_tile64_plan_bc4_control` `0.02s`, `startup_tile64_plan_width_control` `0.01s`, `startup_tile64_plan_clamp_control` `0.01s`). - Release `/O2` (`--preset release`): **4/4 passed** (`startup_tile64_plan` `0.03s`, `startup_tile64_plan_bc4_control` `0.02s`, `startup_tile64_plan_width_control` `0.01s`, `startup_tile64_plan_clamp_control` `0.01s`). - **Mutation check on `src/startup_stubs/tile64_plan.h` (Win2025 Debug)**: - `python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py win2025 1738 --wait 600 --targets startup_tile64_plan_check --regex "^startup_tile64_plan$" --skip-release --patch /tmp/rev-x2w-84/mut_1738.patch` (changing `w * 2 <= tile_width` to `w <= tile_width` in `Plan::Plan`) -> **Mutant killed**: `startup_tile64_plan` failed on `1024x1 RGBA8`, `1024x512 BC4`, and `516x128 R16`. AI-assisted; commands listed were executed locally.
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
R0Y00/Xbox2Windows!1731
No description provided.