startup: read single-mip 0x105 volumes in slot 70 #2863

Merged
pigalot merged 1 commit from upstream-pr/2871 into main 2026-11-27 13:55:24 +00:00
pigalot commented 2026-11-26 15:18:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-26T15:18:52Z.


Slot 70 reads console-layout textures from an address (gfx10_layout.h), but only for 2D descriptions. A Texture3D description in layout 0x105 was refused as unsupported_description, so its view kept the old descriptor.

This adds one shape: a 3D texture in 0x105 (4 KiB standard) with one mip, one sample, an uncompressed format with a known element size, and at most 2048 texels on each side, viewed as a Texture3D. addrlib lays a 3D resource in a standard mode out in thick blocks (Gfx10Lib::HwlIsThick):

  • the 12 address bits of a block follow the one-pipe rows of GFX10_SW_4K_S3_PATINFO;
  • the block is 16x16x16, 8x16x16, 8x16x8, 8x8x8 or 4x8x8 elements for 1- to 16-byte elements;
  • blocks follow along x, then y, then a layer of blocks at a time along z, with every side padded to whole blocks.

The rows are restated as data, as in the 2D layouts. No addrlib code is included.

Changes:

  • gfx10_layout.h: supports_volume, plus the thick addressing in Layout. address, tile and detile take a z coordinate and a layer pitch.
  • d3d12_draw.inl: the console upload checks the footprint depth and copies each depth layer to its own rows.
  • d3d12_memory_srv.inl: console_address_hold counts a volume as one slice. It used to multiply the footprint, which already spans every layer, by the depth, so a volume larger than the size the XG stand-in reports would have been published.

Still refused, unchanged: volume mip chains, block-compressed volumes, volumes in every other mode, cube views, and layout 0/0x100 without a live texture.

Tests (one new family, tests/cmake/startup_gfx10_volume.cmake):

  • startup_gfx10_volume (no device):
    • the address bit of every x, y and z bit for the five element sizes, and the block sizes;
    • the block order in a 17x17x17 volume;
    • distinct addresses and tile/detile round trips for ten volumes, odd sides included;
    • 15 layouts on either side of the accepted set, 6 slot 70 descriptions and 7 views.
  • startup_gfx10_volume_thin_control: lays each volume out as a thin 2D array of its layers. WILL_FAIL; it fails 51 checks.
  • startup_gfx10_volume_addrlib: compares the size and every element address of 190 volumes (276,885 addresses) with Addr2ComputeSurfaceInfo / Addr2ComputeSurfaceAddrFromCoord (ADDR_RSRC_TEX_3D, ADDR_SW_4KB_S, Navi21 configuration). Skips (77) without -DXBOX2WINDOWS_ADDRLIB_DIR.
  • startup_address_console_{warp,hardware} also draws two volumes, RGBA8 17x17x17 and 33x9x18, from a backing built in Python from the same S3 row.
    • All 65,536 pixels must match, and every layer must appear.
    • A third volume (RGBA8 64x8x40: 163,840 bytes in the layout, a 131,072-byte footprint once rounded) must be held as console_layout_beyond_xg_size.
    • X2W_TEST_CONSOLE_DESC takes an optional seventh field, depth.

Negative controls run once by hand, not registered: setting the upload's layer pitch to 0 fails startup_address_console_warp on the first volume's pixels, and restoring the old hold fails it on the held volume.

Checks (Windows 11 build 26200, MSVC 14.52, debug layer off; the _hardware run's adapter on this host was Microsoft Basic Render Driver 10.0.26100.9818, so no physical-GPU result is claimed):

ctest --preset dev --no-tests=error -j 1 -R "startup_gfx10_(layout|volume)|^startup_address_(console|volume_srv)_(warp|hardware)$|startup_memory_srv_volume"
# 100% tests passed, 0 tests failed out of 14
ctest --preset dev --no-tests=error -R "startup_gfx10_(layout|volume)|startup_memory_srv_volume|startup_address_|startup_small_texture_4k|xg_swizzle|bc7_|texture_bc_volume"
# 53 passed; bc7_mode6_multiblock_{warp,hardware} skipped (77), unchanged
python -B tests/docs_links_check.py      # Checked 27 Markdown files and 542 links.
python -B tests/bidi_controls_check.py   # no bidirectional controls

The layout is checked against addrlib, not against console memory.

This change was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5512652331 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2871). Originally posted by [pigalot](https://github.com/pigalot) on 2026-11-26T15:18:52Z. --- Slot 70 reads console-layout textures from an address (`gfx10_layout.h`), but only for 2D descriptions. A Texture3D description in layout `0x105` was refused as `unsupported_description`, so its view kept the old descriptor. This adds one shape: a 3D texture in `0x105` (4 KiB standard) with one mip, one sample, an uncompressed format with a known element size, and at most 2048 texels on each side, viewed as a Texture3D. addrlib lays a 3D resource in a standard mode out in thick blocks (`Gfx10Lib::HwlIsThick`): - the 12 address bits of a block follow the one-pipe rows of `GFX10_SW_4K_S3_PATINFO`; - the block is 16x16x16, 8x16x16, 8x16x8, 8x8x8 or 4x8x8 elements for 1- to 16-byte elements; - blocks follow along x, then y, then a layer of blocks at a time along z, with every side padded to whole blocks. The rows are restated as data, as in the 2D layouts. No addrlib code is included. Changes: - `gfx10_layout.h`: `supports_volume`, plus the thick addressing in `Layout`. `address`, `tile` and `detile` take a z coordinate and a layer pitch. - `d3d12_draw.inl`: the console upload checks the footprint depth and copies each depth layer to its own rows. - `d3d12_memory_srv.inl`: `console_address_hold` counts a volume as one slice. It used to multiply the footprint, which already spans every layer, by the depth, so a volume larger than the size the XG stand-in reports would have been published. Still refused, unchanged: volume mip chains, block-compressed volumes, volumes in every other mode, cube views, and layout `0`/`0x100` without a live texture. Tests (one new family, `tests/cmake/startup_gfx10_volume.cmake`): - `startup_gfx10_volume` (no device): - the address bit of every x, y and z bit for the five element sizes, and the block sizes; - the block order in a 17x17x17 volume; - distinct addresses and tile/detile round trips for ten volumes, odd sides included; - 15 layouts on either side of the accepted set, 6 slot 70 descriptions and 7 views. - `startup_gfx10_volume_thin_control`: lays each volume out as a thin 2D array of its layers. `WILL_FAIL`; it fails 51 checks. - `startup_gfx10_volume_addrlib`: compares the size and every element address of 190 volumes (276,885 addresses) with `Addr2ComputeSurfaceInfo` / `Addr2ComputeSurfaceAddrFromCoord` (`ADDR_RSRC_TEX_3D`, `ADDR_SW_4KB_S`, Navi21 configuration). Skips (77) without `-DXBOX2WINDOWS_ADDRLIB_DIR`. - `startup_address_console_{warp,hardware}` also draws two volumes, RGBA8 17x17x17 and 33x9x18, from a backing built in Python from the same S3 row. - All 65,536 pixels must match, and every layer must appear. - A third volume (RGBA8 64x8x40: 163,840 bytes in the layout, a 131,072-byte footprint once rounded) must be held as `console_layout_beyond_xg_size`. - `X2W_TEST_CONSOLE_DESC` takes an optional seventh field, depth. Negative controls run once by hand, not registered: setting the upload's layer pitch to 0 fails `startup_address_console_warp` on the first volume's pixels, and restoring the old hold fails it on the held volume. Checks (Windows 11 build 26200, MSVC 14.52, debug layer off; the `_hardware` run's adapter on this host was Microsoft Basic Render Driver 10.0.26100.9818, so no physical-GPU result is claimed): ``` ctest --preset dev --no-tests=error -j 1 -R "startup_gfx10_(layout|volume)|^startup_address_(console|volume_srv)_(warp|hardware)$|startup_memory_srv_volume" # 100% tests passed, 0 tests failed out of 14 ctest --preset dev --no-tests=error -R "startup_gfx10_(layout|volume)|startup_memory_srv_volume|startup_address_|startup_small_texture_4k|xg_swizzle|bc7_|texture_bc_volume" # 53 passed; bc7_mode6_multiblock_{warp,hardware} skipped (77), unchanged python -B tests/docs_links_check.py # Checked 27 Markdown files and 542 links. python -B tests/bidi_controls_check.py # no bidirectional controls ``` The layout is checked against addrlib, not against console memory. This change was AI-assisted.
thepatrickworld commented 2026-11-27 11:27:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-27T11:27:23Z.


thick()/address() reproduce addrlib's size and every element address on 190 volumes — independent Linux/x86_64 run at ef4ee2e8

Not a code change; measurements only.

Environment

  • Ubuntu 26.04.1 LTS, GCC 15.2.0. No Windows, no MSVC, no D3D12 device.
  • addrlib: Mesa 25.1.0, commit 5c142e46, fetched by this repository's own tools/fetch_addrlib.py, built from the 16 sources listed for the xbw_addrlib target with -DADDR_FASTCALL= -DLITTLEENDIAN_CPU -DDEBUG=0.
  • tests/startup_gfx10_volume_check.cpp (sha256 7eab180e…) and src/startup_stubs/gfx10_layout.h (sha256 f040ad0a…) at ef4ee2e8, unmodified, compiled against a reduced d3d12.h I wrote for this: DXGI_FORMAT is imported unmodified from Microsoft's DirectX-Headers dxgiformat.h, the rest is the handful of constants and structs these two headers touch.

Commands

python3 tools/fetch_addrlib.py                        # out/deps/mesa at 5c142e46
g++ -std=c++17 -O1 -c $ADDRLIB_INCLUDES -DADDR_FASTCALL= -DLITTLEENDIAN_CPU -DDEBUG=0 <the 16 sources>
ar rcs libaddrlib.a *.o
g++ -std=c++17 -O1 -I<shim> -Isrc -DXBOX2WINDOWS_HAVE_ADDRLIB -Iout/deps/mesa/src/amd/addrlib/inc \
    tests/startup_gfx10_volume_check.cpp libaddrlib.a -o volume_check
./volume_check; ./volume_check --mutate thin; ./volume_check --addrlib

cwd is the repository root for the first two lines and the build directory for the last.

Observed

$ ./volume_check
startup_gfx10_volume: PASS (5 element sizes, block order, 10 round trips, 15 layouts, 6 address descriptions, 7 views)

$ ./volume_check --mutate thin
startup_gfx10_volume: 50 failures

$ ./volume_check --addrlib
startup_gfx10_volume --addrlib: 190 volumes, 276885 element addresses compared, 0 mismatches (Mesa 25.1.0 addrlib, SW_4KB_S, 3D)

The volume and address counts are the ones the description gives, from a different compiler, a different OS, and addrlib built from source rather than linked from an existing build; that agreement is what tells me this build behaves like the author's. The addrlib run takes 0.037 s.

My own mutations, not the PR's controls

The only negative control this change registers is --mutate thin. Seven mutations of thick()/address(), applied one at a time, rebuilt each time, then restored from a pristine copy (sha256 back to f040ad0a…, git status --porcelain --untracked-files=no empty):

  • blocks_wide[0] floored → default entry rc -6, free(): invalid next size (normal), no FAIL line on stdout; addrlib 148 mismatches, element addresses compared falling to 182,528 because a volume whose surfSize disagrees is not swept
  • blocks_high floored → rc -6, same abort; 185 mismatches / 104,448 compared
  • slice_size floored on the depth → rc -6, same abort; 185 mismatches / 122,880 compared
  • layer stride z / block_height instead of z / block_depth → 5 reported failures; 74,786 mismatches
  • 16-byte row with X0 and Z0 swapped → 2 reported failures; 11,076 mismatches
  • z_bits[z % block_width] instead of z % block_depth → 4 reported failures; 17,818 mismatches
  • y / block_depth instead of y / block_height → rc -11 (SIGSEGV); 57,144 mismatches

All seven turn the default entry red, but only three of them leave a FAIL … line behind: the three that abort in glibc's heap check and the one that segfaults lose their buffered stdout. All seven are reported as counted mismatches by --addrlib, so that mode is not a redundant confirmation of the default entry — it is the only one that names every one of these mutations.

The Python oracle behind the draw

startup_address_console_check.py builds its backing bytes from its own restatement of the same row (THICK_4K_S3, ConsoleVolume), so a wrong row there would agree with itself. I imported that class from the file, fed it addrlib's addresses for the three volumes the family names, and compared:

  • 17x17x17: 4,913 elements, 0 differences, size 0x12000 on both sides
  • 33x9x18: 5,346 elements, 0 differences, size 0xf000 on both sides. This shape is not in the fixture's --addrlib sweep (17³ RGBA16F, 32³ RGBA8, 33³ RGBA16F, 32³ A8, 16x16x8 R16F, 16³ R8G8, 32³ R10G10B10A2, 5x3x7 RGBA32F, 1x1x2 R8, 64x8x40 R32F, plus 1/3/9/24 × 1/7/17 × 1/5/18), so the draw's second volume gets an addrlib reference here
  • 64x8x40: 20,480 elements, 0 differences, 0x28000 (163,840) on both sides, which is the number given for the held volume

Potentially useful follow-up: adding 33x9x18 to that sweep costs one line.

Where these entries run

  • On a pull request: none of startup_gfx10_volume, startup_gfx10_volume_thin_control or startup_gfx10_volume_addrlib matches the pr test preset's include regex (CMakePresets.json:45), and startup_gfx10_volume_check is absent from that preset's targets list, so cmake --build --preset pr does not build it either.
  • On a push to main: ctest --preset dev -E '_hardware$' runs the first two; ..._addrlib exits 77 because no workflow calls tools/fetch_addrlib.py, as do xg_bc64_tiling_reference and startup_small_texture_4k_addrlib.
  • The two behaviour changes are reached only by startup_address_console_{warp,hardware}: _warp from the push sweep, _hardware never. Since the description already states the _hardware run used the Basic Render Driver, the layer-pitch copy and the console_address_hold change have no physical-GPU result yet.

Two small notes

  • Four of the seven mutants are killed by corrupting the fixture's own heap rather than by a reported mismatch: check_distinct_and_round_trip records clash and then runs the round trip anyway, and tile()/detile() write at address() with no bound. An if (clash) continue; after the failure would turn a free(): invalid next size or a SIGSEGV into a readable FAIL … line.
  • --mutate thin prints 50 failures here against 51 in the description. The count is arithmetic over the tables in the file, so one of the two comes from another revision of it. The entry is WILL_FAIL, so the verdict does not change.

Limits

  • One machine, Linux/x86_64, no adapter: nothing here runs the upload path, the console upload of a volume, or console_address_hold. What is covered is gfx10_layout.h and the refusals in address_texture.h.
  • addrlib is independent of the address equations, not of the description: the width, height, depth and bpp it is given are the ones Layout derives, so a wrong reading of the description would feed both sides the same wrong sides. What the comparison covers is the coordinate-to-address mapping and the size.
  • The build uses a reduced d3d12.h, not the Windows SDK; the fixture and both headers are unmodified.
  • If the two plain entries should run before a merge, they need their names in the pr test filter and startup_gfx10_volume_check in buildPresets.pr.targets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7217094321 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2871#issuecomment-7217094321). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-27T11:27:23Z. --- **`thick()`/`address()` reproduce addrlib's size and every element address on 190 volumes — independent Linux/x86_64 run at `ef4ee2e8`** Not a code change; measurements only. ### Environment - Ubuntu 26.04.1 LTS, GCC 15.2.0. No Windows, no MSVC, no D3D12 device. - addrlib: Mesa 25.1.0, commit `5c142e46`, fetched by this repository's own `tools/fetch_addrlib.py`, built from the 16 sources listed for the `xbw_addrlib` target with `-DADDR_FASTCALL= -DLITTLEENDIAN_CPU -DDEBUG=0`. - `tests/startup_gfx10_volume_check.cpp` (sha256 `7eab180e…`) and `src/startup_stubs/gfx10_layout.h` (sha256 `f040ad0a…`) at `ef4ee2e8`, unmodified, compiled against a reduced `d3d12.h` I wrote for this: `DXGI_FORMAT` is imported unmodified from Microsoft's DirectX-Headers `dxgiformat.h`, the rest is the handful of constants and structs these two headers touch. ### Commands ```bash python3 tools/fetch_addrlib.py # out/deps/mesa at 5c142e46 g++ -std=c++17 -O1 -c $ADDRLIB_INCLUDES -DADDR_FASTCALL= -DLITTLEENDIAN_CPU -DDEBUG=0 <the 16 sources> ar rcs libaddrlib.a *.o g++ -std=c++17 -O1 -I<shim> -Isrc -DXBOX2WINDOWS_HAVE_ADDRLIB -Iout/deps/mesa/src/amd/addrlib/inc \ tests/startup_gfx10_volume_check.cpp libaddrlib.a -o volume_check ./volume_check; ./volume_check --mutate thin; ./volume_check --addrlib ``` cwd is the repository root for the first two lines and the build directory for the last. ### Observed ``` $ ./volume_check startup_gfx10_volume: PASS (5 element sizes, block order, 10 round trips, 15 layouts, 6 address descriptions, 7 views) $ ./volume_check --mutate thin startup_gfx10_volume: 50 failures $ ./volume_check --addrlib startup_gfx10_volume --addrlib: 190 volumes, 276885 element addresses compared, 0 mismatches (Mesa 25.1.0 addrlib, SW_4KB_S, 3D) ``` The volume and address counts are the ones the description gives, from a different compiler, a different OS, and addrlib built from source rather than linked from an existing build; that agreement is what tells me this build behaves like the author's. The addrlib run takes 0.037 s. ### My own mutations, not the PR's controls The only negative control this change registers is `--mutate thin`. Seven mutations of `thick()`/`address()`, applied one at a time, rebuilt each time, then restored from a pristine copy (sha256 back to `f040ad0a…`, `git status --porcelain --untracked-files=no` empty): - `blocks_wide[0]` floored → default entry rc -6, `free(): invalid next size (normal)`, no `FAIL` line on stdout; addrlib 148 mismatches, element addresses compared falling to 182,528 because a volume whose `surfSize` disagrees is not swept - `blocks_high` floored → rc -6, same abort; 185 mismatches / 104,448 compared - `slice_size` floored on the depth → rc -6, same abort; 185 mismatches / 122,880 compared - layer stride `z / block_height` instead of `z / block_depth` → 5 reported failures; 74,786 mismatches - 16-byte row with `X0` and `Z0` swapped → 2 reported failures; 11,076 mismatches - `z_bits[z % block_width]` instead of `z % block_depth` → 4 reported failures; 17,818 mismatches - `y / block_depth` instead of `y / block_height` → rc -11 (SIGSEGV); 57,144 mismatches All seven turn the default entry red, but only three of them leave a `FAIL …` line behind: the three that abort in glibc's heap check and the one that segfaults lose their buffered stdout. All seven are reported as counted mismatches by `--addrlib`, so that mode is not a redundant confirmation of the default entry — it is the only one that names every one of these mutations. ### The Python oracle behind the draw `startup_address_console_check.py` builds its backing bytes from its own restatement of the same row (`THICK_4K_S3`, `ConsoleVolume`), so a wrong row there would agree with itself. I imported that class from the file, fed it addrlib's addresses for the three volumes the family names, and compared: - 17x17x17: 4,913 elements, 0 differences, size 0x12000 on both sides - 33x9x18: 5,346 elements, 0 differences, size 0xf000 on both sides. This shape is **not** in the fixture's `--addrlib` sweep (17³ RGBA16F, 32³ RGBA8, 33³ RGBA16F, 32³ A8, 16x16x8 R16F, 16³ R8G8, 32³ R10G10B10A2, 5x3x7 RGBA32F, 1x1x2 R8, 64x8x40 R32F, plus 1/3/9/24 × 1/7/17 × 1/5/18), so the draw's second volume gets an addrlib reference here - 64x8x40: 20,480 elements, 0 differences, 0x28000 (163,840) on both sides, which is the number given for the held volume Potentially useful follow-up: adding `33x9x18` to that sweep costs one line. ### Where these entries run - On a pull request: none of `startup_gfx10_volume`, `startup_gfx10_volume_thin_control` or `startup_gfx10_volume_addrlib` matches the `pr` test preset's include regex (`CMakePresets.json:45`), and `startup_gfx10_volume_check` is absent from that preset's `targets` list, so `cmake --build --preset pr` does not build it either. - On a push to main: `ctest --preset dev -E '_hardware$'` runs the first two; `..._addrlib` exits 77 because no workflow calls `tools/fetch_addrlib.py`, as do `xg_bc64_tiling_reference` and `startup_small_texture_4k_addrlib`. - The two behaviour changes are reached only by `startup_address_console_{warp,hardware}`: `_warp` from the push sweep, `_hardware` never. Since the description already states the `_hardware` run used the Basic Render Driver, the layer-pitch copy and the `console_address_hold` change have no physical-GPU result yet. ### Two small notes - Four of the seven mutants are killed by corrupting the fixture's own heap rather than by a reported mismatch: `check_distinct_and_round_trip` records `clash` and then runs the round trip anyway, and `tile()`/`detile()` write at `address()` with no bound. An `if (clash) continue;` after the failure would turn a `free(): invalid next size` or a SIGSEGV into a readable `FAIL …` line. - `--mutate thin` prints 50 failures here against 51 in the description. The count is arithmetic over the tables in the file, so one of the two comes from another revision of it. The entry is `WILL_FAIL`, so the verdict does not change. ### Limits - One machine, Linux/x86_64, no adapter: nothing here runs the upload path, the console upload of a volume, or `console_address_hold`. What is covered is `gfx10_layout.h` and the refusals in `address_texture.h`. - addrlib is independent of the address equations, not of the description: the width, height, depth and bpp it is given are the ones `Layout` derives, so a wrong reading of the description would feed both sides the same wrong sides. What the comparison covers is the coordinate-to-address mapping and the size. - The build uses a reduced `d3d12.h`, not the Windows SDK; the fixture and both headers are unmodified. - If the two plain entries should run before a merge, they need their names in the `pr` test filter and `startup_gfx10_volume_check` in `buildPresets.pr.targets`. _AI-assisted._
thepatrickworld commented 2026-11-27 13:11:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-27T13:11:21Z.


Independent AMD Radeon RX 9070 XT result on ef4ee2e8 — the volume path and console_address_hold on a physical GPU

Not a code change; measurements only. This closes the line my previous comment left open (“the layer-pitch copy and the console_address_hold change have no physical-GPU result yet”).

Environment

  • Windows 10.0.26200.9974, cl 19.44.35230 (VC\Tools\MSVC lists 14.44.35207), Windows SDK 10.0.26100.0, dxc 1.9.2602.17.
  • AMD Radeon RX 9070 XT, driver 32.0.32029.2010 (dated 2026-11-18). The machine also exposes Meta Virtual Monitor; the adapter is selected by name, so that selection is not cosmetic.
  • Preset dev (Debug, Ninja), configured with -DINTAKE_PYTHON=C:/Users/walde/Downloads/x2w-pr641/out/pe-env/Scripts/python.exe; ctest -N -R '^startup_address_console' lists 6 entries.
  • git rev-parse HEAD = ef4ee2e8, git status --porcelain --untracked-files=no empty before and after each run.
  • The D3D12 debug layer is not installed on this machine: no validation output accompanies these runs.

Commands

cd /d C:\Users\walde\Downloads\x2w-main
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
cmake --preset dev -DINTAKE_PYTHON=C:/Users/walde/Downloads/x2w-pr641/out/pe-env/Scripts/python.exe
cmake --build --preset dev --target startup_stream_consumer
cmake --build --preset dev --target startup_gfx10_volume_check
set "XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT"
ctest --preset dev --no-tests=error -R "^startup_address_console_(warp|hardware)$" -V
ctest --preset dev --no-tests=error -R "^startup_address_console" -V
ctest --preset dev --no-tests=error -R "^startup_gfx10_volume" -V

cwd is the repository root throughout. The adapter is set in the quoted form: set VAR=valeur & leaves a trailing space in the name and no adapter matches.

Observed

Each hardware case prints the card immediately above its verdict:

1377: adapter=AMD Radeon RX 9070 XT driver=32.0.32029.2010
1377: hardware RGBA8 volume 17x17x17 4 KiB standard: 65536 RGBA pixels exact over 17 layers
1377: adapter=AMD Radeon RX 9070 XT driver=32.0.32029.2010
1377: hardware RGBA8 volume 33x9x18 4 KiB standard: 65536 RGBA pixels exact over 18 layers
1377: adapter=AMD Radeon RX 9070 XT driver=32.0.32029.2010
1377: hardware RGBA8 volume 64x8x40 4 KiB standard past the XG size: held (console_layout_beyond_xg_size), 65536 pixels read the null view
2/2 Test #1377: startup_address_console_hardware ...   Passed   11.12 sec

The same three lines appear on the WARP entry as 1333: warp …, with the same values.

The 13 adapter=Microsoft Basic Render Driver driver=10.0.26100.9818 lines in the same log are not draws and not the author's WARP run: each one sits between x2w-draw no translation for pipeline 0067af00a2b74bb7 and 0067af00a2b74bb7: ok / compilation object save succeeded, i.e. inside the per-case shader compilation. The warp entry carries 13 of them too, and there they are followed by 13 more for its draws, all on the same adapter.

What the 65,536 pixels cover

Replaying the fixture’s tiling formula (z = (x // w + (y // h) * across) % depth) over the 512x128 target:

  • 17x17x17: all 4,913 element positions of the volume are compared at least once, 13.3 times each; each of the 17 layers is read through all 289 of its (x, y) pairs.
  • 33x9x18: all 5,346 element positions, 12.3 times each; each of the 18 layers through all 297 pairs.
  • The blue channel is the layer number (29z+11 mod 256), and 29 is odd, so the 17 layer values are distinct: a layer mix-up cannot pass a pixel comparison.

These are counts over the fixture’s own formula, not a property of the device; what the device contributes is that every one of those comparisons matched, plus the published console layout line the fixture also requires for each volume (startup_address_console_check.py:212).

Regression

  • ctest -R "^startup_address_console" on the clean head: 6 pass / 0 skip / 0 fail, 33.54 s.
  • ctest -R "^startup_gfx10_volume": 2 pass / 1 skip / 0 fail. The skip is startup_gfx10_volume_addrlib, exit 77, this tree configured without XBOX2WINDOWS_ADDRLIB_DIR. startup_gfx10_volume_thin_control is WILL_FAIL, so its Passed means the mutated binary exited non-zero.

Mutation A — the step between depth layers

src/startup_stubs/d3d12_draw.inl:1448-1449 passes plan.placed[i].Footprint.RowPitch as the row pitch and std::size_t{plan.placed[i].Footprint.RowPitch} * plan.rows[i] as the step between depth layers. A sets that second argument to std::size_t{0} * plan.rows[i] (mutated file sha256 cf9303cf…, occurrences=1). Both backends stop on the first volume:

AssertionError: RGBA8 volume 17x17x17 4 KiB standard: pixel (0,0) layer 0 actual 0103dbff expected 01030bff

0xdb = 219 = (29*16 + 11) & 255: the texel of layer 16 lands at layer 0, i.e. every layer is written to the same rows and the last one covers the others. A copy that wrote nothing would leave zeros or a stale target, never a well-formed texel of another layer. This proves the layer term must be non-zero; it does not pin its value, and it does not touch the row pitch.

Mutation B — the slice count of the hold test

src/startup_stubs/d3d12_memory_srv.inl:523 reads const u64 slices = desc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? 1 : desc.DepthOrArraySize;. B puts the pre-PR const u64 slices = desc.DepthOrArraySize; back (mutated file sha256 896e6225…, occurrences=1). Both backends, on the volume that used to be held:

AssertionError: RGBA8 volume 64x8x40 4 KiB standard past the XG size: a held description drew texels

2 of the 6 entries fail (1333 warp, 1377 hardware), the other 4 stay green. The arithmetic is the edited term alone: the desktop footprints of one slice are 81,920 bytes, rounded to 131,072; the layout is 163,840. With slices = 1 the hold fires (163,840 > 131,072); with slices = 40 the reported size becomes 5,242,880 and the volume is published and sampled. The assertion that fires is the readback one, not the log one, so the description really was drawn from. What B does not establish is that 1 is the right value — that rests on GetCopyableFootprints already spanning the depth, which is an API contract, not something this mutant measures.

The accepted branch of that ternary has no case

const u64 slices = 1;, unconditionally, keeps all 6 entries green (mutated file sha256 e574645d…). No entry in this family describes a 2D array with DepthOrArraySize > 1, so the pass-through branch of ? 1 : is never taken. A 2D-array case whose one-slice footprint is under the size the XG stand-in reports and whose DepthOrArraySize-multiplied footprint is over it would exercise it.

After each restore

git status --porcelain --untracked-files=no empty, working-tree sha256 7fa3c167… (d3d12_memory_srv.inl) and db7c6092… (d3d12_draw.inl), rebuild, and the family green again (2/2, 6/6). An empty git status is what ties those bytes to ef4ee2e8; the hashes are working-tree bytes, not the LF blobs.

Limits

  • One machine, one adapter, one driver. No debug layer, so no validation output.
  • The volume cases are RGBA8 only: THICK_4K_S3 has a single entry (4), so this path is exercised for one element size and one block shape (8x16x8). The five element sizes startup_gfx10_volume sweeps are CPU side. No volume with more than 3 block layers is drawn — the 64x8x40 one is held, never detiled.
  • No mip chain, no compressed volume, no cube volume: those stay refused and are not what this run measures.
  • Mutation A isolates the fifth argument of detile() only; the fourth is not isolated here.
  • The kind 1 in the trap-log line is an ordinal of first sight (kinds.size(), d3d12_memory_srv.inl:488), so it is stable for the current order of cases, not an identifier of the description.
  • The fixture’s Python oracle restates the same addrlib rows; it was already compared with addrlib for exactly these three shapes in my previous comment (4,913 / 5,346 / 20,480 elements, 0 differences), and that comparison — not this run — is what separates it.
  • Unchanged since my previous comment: none of these entries runs on a pull request, and startup_address_console_hardware never runs in CI.

AI-assisted; runs executed on the machine above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7219167360 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2871#issuecomment-7219167360). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-27T13:11:21Z. --- **Independent AMD Radeon RX 9070 XT result on `ef4ee2e8` — the volume path and `console_address_hold` on a physical GPU** Not a code change; measurements only. This closes the line my previous comment left open (“the layer-pitch copy and the `console_address_hold` change have no physical-GPU result yet”). ### Environment - Windows 10.0.26200.9974, `cl` 19.44.35230 (`VC\Tools\MSVC` lists 14.44.35207), Windows SDK 10.0.26100.0, `dxc` 1.9.2602.17. - AMD Radeon RX 9070 XT, driver 32.0.32029.2010 (dated 2026-11-18). The machine also exposes `Meta Virtual Monitor`; the adapter is selected by name, so that selection is not cosmetic. - Preset `dev` (Debug, Ninja), configured with `-DINTAKE_PYTHON=C:/Users/walde/Downloads/x2w-pr641/out/pe-env/Scripts/python.exe`; `ctest -N -R '^startup_address_console'` lists 6 entries. - `git rev-parse HEAD` = `ef4ee2e8`, `git status --porcelain --untracked-files=no` empty before and after each run. - The D3D12 debug layer is not installed on this machine: no validation output accompanies these runs. ### Commands ```bat cd /d C:\Users\walde\Downloads\x2w-main call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1 cmake --preset dev -DINTAKE_PYTHON=C:/Users/walde/Downloads/x2w-pr641/out/pe-env/Scripts/python.exe cmake --build --preset dev --target startup_stream_consumer cmake --build --preset dev --target startup_gfx10_volume_check set "XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT" ctest --preset dev --no-tests=error -R "^startup_address_console_(warp|hardware)$" -V ctest --preset dev --no-tests=error -R "^startup_address_console" -V ctest --preset dev --no-tests=error -R "^startup_gfx10_volume" -V ``` cwd is the repository root throughout. The adapter is set in the quoted form: `set VAR=valeur &` leaves a trailing space in the name and no adapter matches. ### Observed Each hardware case prints the card immediately above its verdict: ``` 1377: adapter=AMD Radeon RX 9070 XT driver=32.0.32029.2010 1377: hardware RGBA8 volume 17x17x17 4 KiB standard: 65536 RGBA pixels exact over 17 layers 1377: adapter=AMD Radeon RX 9070 XT driver=32.0.32029.2010 1377: hardware RGBA8 volume 33x9x18 4 KiB standard: 65536 RGBA pixels exact over 18 layers 1377: adapter=AMD Radeon RX 9070 XT driver=32.0.32029.2010 1377: hardware RGBA8 volume 64x8x40 4 KiB standard past the XG size: held (console_layout_beyond_xg_size), 65536 pixels read the null view 2/2 Test #1377: startup_address_console_hardware ... Passed 11.12 sec ``` The same three lines appear on the WARP entry as `1333: warp …`, with the same values. The 13 `adapter=Microsoft Basic Render Driver driver=10.0.26100.9818` lines in the same log are **not** draws and not the author's WARP run: each one sits between `x2w-draw no translation for pipeline 0067af00a2b74bb7` and `0067af00a2b74bb7: ok` / `compilation object save succeeded`, i.e. inside the per-case shader compilation. The warp entry carries 13 of them too, and there they are followed by 13 more for its draws, all on the same adapter. ### What the 65,536 pixels cover Replaying the fixture’s tiling formula (`z = (x // w + (y // h) * across) % depth`) over the 512x128 target: - 17x17x17: all 4,913 element positions of the volume are compared at least once, 13.3 times each; each of the 17 layers is read through all 289 of its (x, y) pairs. - 33x9x18: all 5,346 element positions, 12.3 times each; each of the 18 layers through all 297 pairs. - The blue channel is the layer number (`29z+11 mod 256`), and 29 is odd, so the 17 layer values are distinct: a layer mix-up cannot pass a pixel comparison. These are counts over the fixture’s own formula, not a property of the device; what the device contributes is that every one of those comparisons matched, plus the `published console layout` line the fixture also requires for each volume (`startup_address_console_check.py:212`). ### Regression - `ctest -R "^startup_address_console"` on the clean head: **6 pass / 0 skip / 0 fail**, 33.54 s. - `ctest -R "^startup_gfx10_volume"`: **2 pass / 1 skip / 0 fail**. The skip is `startup_gfx10_volume_addrlib`, exit 77, this tree configured without `XBOX2WINDOWS_ADDRLIB_DIR`. `startup_gfx10_volume_thin_control` is `WILL_FAIL`, so its `Passed` means the mutated binary exited non-zero. ### Mutation A — the step between depth layers `src/startup_stubs/d3d12_draw.inl:1448-1449` passes `plan.placed[i].Footprint.RowPitch` as the row pitch and `std::size_t{plan.placed[i].Footprint.RowPitch} * plan.rows[i]` as the step between depth layers. A sets that second argument to `std::size_t{0} * plan.rows[i]` (mutated file sha256 `cf9303cf…`, `occurrences=1`). Both backends stop on the first volume: ``` AssertionError: RGBA8 volume 17x17x17 4 KiB standard: pixel (0,0) layer 0 actual 0103dbff expected 01030bff ``` `0xdb` = 219 = `(29*16 + 11) & 255`: the texel of layer 16 lands at layer 0, i.e. every layer is written to the same rows and the last one covers the others. A copy that wrote nothing would leave zeros or a stale target, never a well-formed texel of another layer. This proves the layer term must be non-zero; it does not pin its value, and it does not touch the row pitch. ### Mutation B — the slice count of the hold test `src/startup_stubs/d3d12_memory_srv.inl:523` reads `const u64 slices = desc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? 1 : desc.DepthOrArraySize;`. B puts the pre-PR `const u64 slices = desc.DepthOrArraySize;` back (mutated file sha256 `896e6225…`, `occurrences=1`). Both backends, on the volume that used to be held: ``` AssertionError: RGBA8 volume 64x8x40 4 KiB standard past the XG size: a held description drew texels ``` 2 of the 6 entries fail (1333 warp, 1377 hardware), the other 4 stay green. The arithmetic is the edited term alone: the desktop footprints of one slice are 81,920 bytes, rounded to 131,072; the layout is 163,840. With `slices = 1` the hold fires (163,840 > 131,072); with `slices = 40` the reported size becomes 5,242,880 and the volume is published and sampled. The assertion that fires is the readback one, not the log one, so the description really was drawn from. What B does not establish is that `1` is the right value — that rests on `GetCopyableFootprints` already spanning the depth, which is an API contract, not something this mutant measures. ### The accepted branch of that ternary has no case `const u64 slices = 1;`, unconditionally, keeps all 6 entries green (mutated file sha256 `e574645d…`). No entry in this family describes a 2D array with `DepthOrArraySize > 1`, so the pass-through branch of `? 1 :` is never taken. A 2D-array case whose one-slice footprint is under the size the XG stand-in reports and whose `DepthOrArraySize`-multiplied footprint is over it would exercise it. ### After each restore `git status --porcelain --untracked-files=no` empty, working-tree sha256 `7fa3c167…` (`d3d12_memory_srv.inl`) and `db7c6092…` (`d3d12_draw.inl`), rebuild, and the family green again (`2/2`, `6/6`). An empty `git status` is what ties those bytes to `ef4ee2e8`; the hashes are working-tree bytes, not the LF blobs. ### Limits - One machine, one adapter, one driver. No debug layer, so no validation output. - The volume cases are RGBA8 only: `THICK_4K_S3` has a single entry (`4`), so this path is exercised for one element size and one block shape (8x16x8). The five element sizes `startup_gfx10_volume` sweeps are CPU side. No volume with more than 3 block layers is drawn — the 64x8x40 one is held, never detiled. - No mip chain, no compressed volume, no cube volume: those stay refused and are not what this run measures. - Mutation A isolates the fifth argument of `detile()` only; the fourth is not isolated here. - The `kind 1` in the trap-log line is an ordinal of first sight (`kinds.size()`, `d3d12_memory_srv.inl:488`), so it is stable for the current order of cases, not an identifier of the description. - The fixture’s Python oracle restates the same addrlib rows; it was already compared with addrlib for exactly these three shapes in my previous comment (4,913 / 5,346 / 20,480 elements, 0 differences), and that comparison — not this run — is what separates it. - Unchanged since my previous comment: none of these entries runs on a pull request, and `startup_address_console_hardware` never runs in CI. _AI-assisted; runs executed on the machine above._
R0Y00 commented 2026-11-27 13:54:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T13:54:09Z.

Review: APPROVED


Independent integration review on main 36d2cbeb (tree c9d3721adb0063619851bc8d6b7f7c3788e87f5e). The new shape is confined to single-mip, uncompressed 0x105 Texture3D. The copy uses the footprint depth and depth-layer pitch, and the bounds check counts a full 3D footprint once.

Built startup_stream_consumer d3d12_xs_shim startup_gfx10_layout_check startup_gfx10_volume_check startup_memory_srv_volume_check. ctest --test-dir <build> --no-tests=error -V -R '^(startup_gfx10_(layout|volume).*|startup_memory_srv_volume.*|startup_address_(console|volume_srv)_(warp|hardware))$' produced 13 passes and one addrlib capability skip (77) in both Debug and Release /O2. WARP and RTX matched all 65,536 pixels for each of two volumes. The 64x8x40 oversize case was held with a null view and the thin-layout negative control reported 50 mismatches. The independent Linux result above compared 276,885 addresses against addrlib, and the RX 9070 XT run independently covered physical-GPU slot 70.

Local environment: Windows 11 build 26200.9974, WARP 10.0.26100.9818, RTX 4060 Laptop driver 32.0.16.1656, SDK DXC 10.0.26100, address-console fixture debug layer off. These are source-built tests.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6089187127 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2871#pullrequestreview-6089187127). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T13:54:09Z. **Review:** APPROVED --- Independent integration review on `main` `36d2cbeb` (tree `c9d3721adb0063619851bc8d6b7f7c3788e87f5e`). The new shape is confined to single-mip, uncompressed 0x105 Texture3D. The copy uses the footprint depth and depth-layer pitch, and the bounds check counts a full 3D footprint once. Built `startup_stream_consumer d3d12_xs_shim startup_gfx10_layout_check startup_gfx10_volume_check startup_memory_srv_volume_check`. `ctest --test-dir <build> --no-tests=error -V -R '^(startup_gfx10_(layout|volume).*|startup_memory_srv_volume.*|startup_address_(console|volume_srv)_(warp|hardware))$'` produced 13 passes and one addrlib capability skip (77) in both Debug and Release `/O2`. WARP and RTX matched all 65,536 pixels for each of two volumes. The 64x8x40 oversize case was held with a null view and the thin-layout negative control reported 50 mismatches. The independent Linux result above compared 276,885 addresses against addrlib, and the RX 9070 XT run independently covered physical-GPU slot 70. Local environment: Windows 11 build 26200.9974, WARP 10.0.26100.9818, RTX 4060 Laptop driver 32.0.16.1656, SDK DXC 10.0.26100, address-console fixture debug layer off. These are source-built tests.
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!2863
No description provided.