gpu: answer console allocation sizes for depth-stencil and multisampled textures #1283

Merged
JohnConnorNPC merged 5 commits from upstream-pr/1290 into main 2026-11-24 09:24:51 +00:00
JohnConnorNPC commented 2026-11-24 06:58:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-24T06:58:07Z.


Refs #870, #874.

Problem

The startup device wrapper forwards the desktop answer of GetResourceAllocationInfo / GetResourceAllocationInfo1. A console executable reserves memory of its own for every placed texture from that answer, and it can take all of that memory from one fixed block. For two families the desktop answer is larger than the console's:

  • Depth with stencil. The R32G8X24 family takes 8 bytes a texel on the desktop adapter measured here. The console keeps a 4-byte depth plane and a 1-byte stencil plane.
  • Multisampled textures. 4 MiB placement alignment on desktop, 64 KiB on the console.

On the run described below the block ran out, an allocation returned null and the run stopped on a null object about 18 s in. I believe this is the stop reported on #870 for a GTX 1660 SUPER ("a NULL the title expects to be a live object"): it happens at the same point here and goes away with this change. I have not confirmed that on that machine.

Change

src/startup_stubs/console_plane_size.h: for a single description that is single-mip 2D and either depth with stencil (R32G8X24 family, or the console's 16-bit depth with stencil, formats 118-120) or multisampled in a listed colour format, answer the console size. Every plane is padded to whole 64 KiB tiles; a tile holds 64 KiB of samples (128 x 128 texels at 4 bytes, 256 x 128 at 2, 256 x 256 at 1, 64 x 64 at 4 bytes with four samples).

Everything else keeps the desktop answer: other formats, mip chains, 3D textures, sample counts outside 1/2/4/8, and any case where the console size would not be smaller than a valid desktop answer. So an adapter that already answers 5 bytes a texel for R32G8X24 is not affected.

Only the amount of memory the executable sets aside changes. The desktop texture created for the description is the same as before. The first eight uses are logged as x2w-d3d12 allocation info: console size ....

Evidence

Commit under test: the head of this branch, on main at 93cb6a2a.

Device-free check (tests/startup_plane_size_check.cpp, registered as startup_plane_size):

startup_plane_size: PASS (12 answered, 9 left alone)

Negative control, registered as startup_plane_size_packed_control with WILL_FAIL: startup_plane_size_check --mutate packed swaps in the expectations of a rule without tile padding and must fail. It reports 6 failures, on the six descriptions whose planes are not whole tiles, for example:

FAIL d32s8 3840x2160: changed 1 size 0x2850000 alignment 0x10000, expected 0x27a0000

Where the expected sizes come from. The first nine are console allocation sizes for descriptions the executable queries, read from the log of an independent implementation of the same device interface. No code was taken from it. The tile rule in the header reproduces all nine; the other three expected values follow from the rule.

Whole-program run. One console executable under the startup debugger, offline; Linux host, Wine with vkd3d-proton, NVIDIA RTX 4070 Ti SUPER:

  • Before: the executable's fixed block was exhausted after 352 texture allocations and the run stopped about 18 s in. Three runs, same point each time.
  • Over the 1,561 distinct descriptions queried up to that point, the desktop answers were 154 MiB larger in total than the sizes this change answers. The largest single differences were R32G8X24 depth targets (for example 24,000 KiB for one 3840 x 2160 target).
  • After: with this branch's header the same run passes that point and was still presenting frames at a 60 s timeout. An earlier local build with the same depth-stencil rule ran to a 300 s timeout.

Also ran python -B tests/docs_links_check.py (286 links, pass) and git diff --check (clean).

Not measured

  • Windows. I have no Windows host. I compiled the check and syntax-checked d3d12_xs_device.cpp with clang-cl against the Windows SDK and ran the check under Wine; CI is the first MSVC build and the first Windows run.
  • Native Windows driver sizes. Whether NVIDIA, AMD and Intel drivers on Windows return the same larger sizes as vkd3d-proton is not measured here. If an AMD adapter answers 5 bytes a texel for R32G8X24, that would explain why earlier AMD runs did not hit this stop; that is a hypothesis.
  • The 16-bit depth with stencil rule (formats 118-120) rests on one reference size.
  • Multisampled sizes rest on two reference sizes, both 1 x 1 with four samples.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6576432347 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1290). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-24T06:58:07Z. --- Refs #870, #874. ## Problem The startup device wrapper forwards the desktop answer of `GetResourceAllocationInfo` / `GetResourceAllocationInfo1`. A console executable reserves memory of its own for every placed texture from that answer, and it can take all of that memory from one fixed block. For two families the desktop answer is larger than the console's: - **Depth with stencil.** The R32G8X24 family takes 8 bytes a texel on the desktop adapter measured here. The console keeps a 4-byte depth plane and a 1-byte stencil plane. - **Multisampled textures.** 4 MiB placement alignment on desktop, 64 KiB on the console. On the run described below the block ran out, an allocation returned null and the run stopped on a null object about 18 s in. I believe this is the stop [reported on #870 for a GTX 1660 SUPER](https://github.com/R0Y00/Xbox2Windows/issues/870#issuecomment-7122326265) ("a NULL the title expects to be a live object"): it happens at the same point here and goes away with this change. I have not confirmed that on that machine. ## Change `src/startup_stubs/console_plane_size.h`: for a single description that is single-mip 2D and either depth with stencil (R32G8X24 family, or the console's 16-bit depth with stencil, formats 118-120) or multisampled in a listed colour format, answer the console size. Every plane is padded to whole 64 KiB tiles; a tile holds 64 KiB of samples (128 x 128 texels at 4 bytes, 256 x 128 at 2, 256 x 256 at 1, 64 x 64 at 4 bytes with four samples). Everything else keeps the desktop answer: other formats, mip chains, 3D textures, sample counts outside 1/2/4/8, and any case where the console size would not be smaller than a valid desktop answer. So an adapter that already answers 5 bytes a texel for R32G8X24 is not affected. Only the amount of memory the executable sets aside changes. The desktop texture created for the description is the same as before. The first eight uses are logged as `x2w-d3d12 allocation info: console size ...`. ## Evidence Commit under test: the head of this branch, on `main` at `93cb6a2a`. **Device-free check** (`tests/startup_plane_size_check.cpp`, registered as `startup_plane_size`): ``` startup_plane_size: PASS (12 answered, 9 left alone) ``` Negative control, registered as `startup_plane_size_packed_control` with `WILL_FAIL`: `startup_plane_size_check --mutate packed` swaps in the expectations of a rule without tile padding and must fail. It reports 6 failures, on the six descriptions whose planes are not whole tiles, for example: ``` FAIL d32s8 3840x2160: changed 1 size 0x2850000 alignment 0x10000, expected 0x27a0000 ``` **Where the expected sizes come from.** The first nine are console allocation sizes for descriptions the executable queries, read from the log of an independent implementation of the same device interface. No code was taken from it. The tile rule in the header reproduces all nine; the other three expected values follow from the rule. **Whole-program run.** One console executable under the startup debugger, offline; Linux host, Wine with vkd3d-proton, NVIDIA RTX 4070 Ti SUPER: - Before: the executable's fixed block was exhausted after 352 texture allocations and the run stopped about 18 s in. Three runs, same point each time. - Over the 1,561 distinct descriptions queried up to that point, the desktop answers were 154 MiB larger in total than the sizes this change answers. The largest single differences were R32G8X24 depth targets (for example 24,000 KiB for one 3840 x 2160 target). - After: with this branch's header the same run passes that point and was still presenting frames at a 60 s timeout. An earlier local build with the same depth-stencil rule ran to a 300 s timeout. Also ran `python -B tests/docs_links_check.py` (286 links, pass) and `git diff --check` (clean). ## Not measured - **Windows.** I have no Windows host. I compiled the check and syntax-checked `d3d12_xs_device.cpp` with clang-cl against the Windows SDK and ran the check under Wine; CI is the first MSVC build and the first Windows run. - **Native Windows driver sizes.** Whether NVIDIA, AMD and Intel drivers on Windows return the same larger sizes as vkd3d-proton is not measured here. If an AMD adapter answers 5 bytes a texel for R32G8X24, that would explain why earlier AMD runs did not hit this stop; that is a hypothesis. - The 16-bit depth with stencil rule (formats 118-120) rests on one reference size. - Multisampled sizes rest on two reference sizes, both 1 x 1 with four samples.
R0Y00 commented 2026-11-24 07:07:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T07:01:20Z.

Review: CHANGES_REQUESTED


The helper currently turns any invalid desktop result into a plausible allocation size for a matching numeric format. For example, a D32S8 description with Width=UINT64_MAX passes the shape checks, wraps while rounding to a tile and can become a 64 KiB result. Invalid sample quality, layout and explicit alignment can also reach the override. Restrict the rule to validated dimensions and supported description fields, with checked size arithmetic. Preserve the desktop failure for desktop formats unless there is independent evidence that the exact rejected shape is valid on the guest. For a console-only format, validate the full supported shape before replacing the sentinel.

Please exercise both device query entries and the corresponding placed texture creation on that allocation layout. The helper test confirms the formula but does not establish that the returned size and alignment describe backing accepted by the resource path.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6034985765 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1290#pullrequestreview-6034985765). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T07:01:20Z. **Review:** CHANGES_REQUESTED --- The helper currently turns any invalid desktop result into a plausible allocation size for a matching numeric format. For example, a D32S8 description with `Width=UINT64_MAX` passes the shape checks, wraps while rounding to a tile and can become a 64 KiB result. Invalid sample quality, layout and explicit alignment can also reach the override. Restrict the rule to validated dimensions and supported description fields, with checked size arithmetic. Preserve the desktop failure for desktop formats unless there is independent evidence that the exact rejected shape is valid on the guest. For a console-only format, validate the full supported shape before replacing the sentinel. Please exercise both device query entries and the corresponding placed texture creation on that allocation layout. The helper test confirms the formula but does not establish that the returned size and alignment describe backing accepted by the resource path.
tedin7 commented 2026-11-24 07:07:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T07:03:15Z.

Review: COMMENTED


Dual-platform review at commit b316ad128e909139793593354801ab3d6b76af9c:

Linux checks

  • git diff --check origin/main...HEAD: passed
  • python -B tests/docs_links_check.py: passed (16 Markdown files, 286 links)
  • python -B tests/bidi_controls_check.py: passed (1081 tracked files)

Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP)

  • Debug (--preset dev):
    • cmake --build --preset dev --target startup_plane_size_check -- -j 6: 3.68s
    • ctest --preset dev -R '^startup_plane_size' --parallel 4 --no-tests=error --output-on-failure: 2/2 passed (startup_plane_size, startup_plane_size_packed_control negative control)
  • Release /O2 (--preset release):
    • cmake --build --preset release --target startup_plane_size_check -- -j 6: 1.10s
    • ctest --preset release -R '^startup_plane_size' --parallel 4 --no-tests=error --output-on-failure: 2/2 passed

Notes & Edge Cases

  • desc.MipLevels == 0 in src/startup_stubs/console_plane_size.h: desc.MipLevels > 1 treats MipLevels == 0 as single-mip. In D3D12, MipLevels == 0 requests a full mip chain down to 1x1, so a non-MSAA d32s8/d16s8 descriptor with MipLevels == 0 and Width > 1 || Height > 1 would be under-sized; guarding desc.MipLevels != 1 (or desc.MipLevels == 0 && (desc.Width > 1 || desc.Height > 1)) would match the single-mip contract.
  • Scope note: startup_plane_size_check exercises console_plane_size.h standalone; src/startup_stubs/d3d12_xs_device.cpp was reviewed by inspection (descs[0] is correctly passed unsanitized so formats 118–120 match, and info1 is updated for count == 1), not compiled in this targeted target run.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6035003116 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1290#pullrequestreview-6035003116). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T07:03:15Z. **Review:** COMMENTED --- Dual-platform review at commit `b316ad128e909139793593354801ab3d6b76af9c`: ### Linux checks - `git diff --check origin/main...HEAD`: passed - `python -B tests/docs_links_check.py`: passed (16 Markdown files, 286 links) - `python -B tests/bidi_controls_check.py`: passed (1081 tracked files) ### Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) - **Debug (`--preset dev`)**: - `cmake --build --preset dev --target startup_plane_size_check -- -j 6`: `3.68s` - `ctest --preset dev -R '^startup_plane_size' --parallel 4 --no-tests=error --output-on-failure`: **2/2 passed** (`startup_plane_size`, `startup_plane_size_packed_control` negative control) - **Release `/O2` (`--preset release`)**: - `cmake --build --preset release --target startup_plane_size_check -- -j 6`: `1.10s` - `ctest --preset release -R '^startup_plane_size' --parallel 4 --no-tests=error --output-on-failure`: **2/2 passed** ### Notes & Edge Cases - **`desc.MipLevels == 0` in `src/startup_stubs/console_plane_size.h`**: `desc.MipLevels > 1` treats `MipLevels == 0` as single-mip. In D3D12, `MipLevels == 0` requests a full mip chain down to `1x1`, so a non-MSAA `d32s8`/`d16s8` descriptor with `MipLevels == 0` and `Width > 1 || Height > 1` would be under-sized; guarding `desc.MipLevels != 1` (or `desc.MipLevels == 0 && (desc.Width > 1 || desc.Height > 1)`) would match the single-mip contract. - **Scope note**: `startup_plane_size_check` exercises `console_plane_size.h` standalone; `src/startup_stubs/d3d12_xs_device.cpp` was reviewed by inspection (`descs[0]` is correctly passed unsanitized so formats `118`–`120` match, and `info1` is updated for `count == 1`), not compiled in this targeted target run.
JohnConnorNPC commented 2026-11-24 08:01:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-24T07:16:05Z.


Thanks, both points were right. Addressed in the commit just pushed.

Validation (R0Y00, and the MipLevels == 0 note from tedin7). console_plane_shape now gates the rule: 2D, MipLevels == 1 exactly, width and height within D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, slices within D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION, 1/2/4/8 samples at quality 0, D3D12_TEXTURE_LAYOUT_UNKNOWN, alignment 0 or 64 KiB. With those bounds the size arithmetic stays below 2^45, so there is nothing left to wrap. A desktop failure is now kept for desktop formats (the R32G8X24 family and the multisampled colour formats): the helper returns false on an all-ones size. Only formats 118-120, which desktop cannot answer, are answered over the sentinel, and only for the validated shape.

The device-free check grew from 9 to 25 left-alone cases: Width = UINT64_MAX (with a failed and with a valid desktop answer), width 16385, zero height, zero slices, MipLevels == 0 for both families, sample quality 1, zero samples, row-major and 64 KiB-swizzle layouts, 4 KiB and 4 MiB alignment, and a desktop failure for D32S8 and for 4-sample RGBA8.

startup_plane_size: PASS (13 answered, 25 left alone)

Device entries and placed creation. New tests/startup_plane_size_device_check.cpp, registered as startup_plane_size_device_warp and _hardware (skip code 77). For each description it takes the adapter's own desktop answer, applies the helper to get the expectation, and then:

  • calls slot 25 and slot 108 on the wrapper through its table and requires both to equal the expectation, and the slot 108 per-resource entry to describe it;
  • allocates memory of exactly the answered size at the answered alignment and creates the texture through slot 133, requiring S_OK, an object and no device removal;
  • for two descriptions outside the rule (single-sample RGBA8, D32 without stencil) and one invalid width, requires the wrapper's answer to equal desktop's.

Because the expectation is derived from the adapter's own answer, the test holds on an adapter whose desktop size is already the smaller one; it prints which case applied.

Result here, at this branch's head, with the branch's own d3d12_xs.dll built by clang-cl against the Windows SDK and run under Wine with vkd3d-proton on an NVIDIA RTX 4070 Ti SUPER (so a translation-layer result, not Windows, and hardware only; there is no WARP there):

d32s8 1024x512: desktop size 0x400000 alignment 0x10000; wrapper slot 25 size 0x280000 alignment 0x10000 (console size)
d32s8 200x100 4 samples: desktop size 0x400000 alignment 0x400000; wrapper slot 25 size 0xa0000 alignment 0x10000 (console size)
rgba8 256x256 4 samples: desktop size 0x400000 alignment 0x400000; wrapper slot 25 size 0x100000 alignment 0x10000 (console size)
control rgba8 512x512: desktop size 0x100000 alignment 0x10000; wrapper slot 25 size 0x100000 alignment 0x10000 (desktop answer kept)
control d32 1024x512: desktop size 0x200000 alignment 0x10000; wrapper slot 25 size 0x200000 alignment 0x10000 (desktop answer kept)
invalid width: desktop size 0x100000000; wrapper size 0x100000000
startup_plane_size_device: PASS (3 of 3 descriptions answered with the console size on this adapter, 5 placed textures, out-of-rule answers unchanged)

Two limits I want to be plain about:

  • The invalid-width line shows vkd3d-proton answering a size where native D3D12 answers all ones, so "desktop failure kept" is only exercised by the device-free check here. On Windows the same line should print all ones on both sides.
  • Slot 133 creates a committed desktop texture that does not alias the address. So the device test shows the answered size and alignment are accepted by the creation path. It does not show that a console layout fits in that many bytes; that still rests on the nine reference sizes.

I have not run _warp or anything on Windows; CI is the first run of both device tests there.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7124802252 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1290#issuecomment-7124802252). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-24T07:16:05Z. --- Thanks, both points were right. Addressed in the commit just pushed. **Validation (R0Y00, and the `MipLevels == 0` note from tedin7).** `console_plane_shape` now gates the rule: 2D, `MipLevels == 1` exactly, width and height within `D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION`, slices within `D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION`, 1/2/4/8 samples at quality 0, `D3D12_TEXTURE_LAYOUT_UNKNOWN`, alignment 0 or 64 KiB. With those bounds the size arithmetic stays below 2^45, so there is nothing left to wrap. A desktop failure is now kept for desktop formats (the R32G8X24 family and the multisampled colour formats): the helper returns false on an all-ones size. Only formats 118-120, which desktop cannot answer, are answered over the sentinel, and only for the validated shape. The device-free check grew from 9 to 25 left-alone cases: `Width = UINT64_MAX` (with a failed and with a valid desktop answer), width 16385, zero height, zero slices, `MipLevels == 0` for both families, sample quality 1, zero samples, row-major and 64 KiB-swizzle layouts, 4 KiB and 4 MiB alignment, and a desktop failure for D32S8 and for 4-sample RGBA8. ``` startup_plane_size: PASS (13 answered, 25 left alone) ``` **Device entries and placed creation.** New `tests/startup_plane_size_device_check.cpp`, registered as `startup_plane_size_device_warp` and `_hardware` (skip code 77). For each description it takes the adapter's own desktop answer, applies the helper to get the expectation, and then: - calls slot 25 and slot 108 on the wrapper through its table and requires both to equal the expectation, and the slot 108 per-resource entry to describe it; - allocates memory of exactly the answered size at the answered alignment and creates the texture through slot 133, requiring `S_OK`, an object and no device removal; - for two descriptions outside the rule (single-sample RGBA8, D32 without stencil) and one invalid width, requires the wrapper's answer to equal desktop's. Because the expectation is derived from the adapter's own answer, the test holds on an adapter whose desktop size is already the smaller one; it prints which case applied. Result here, at this branch's head, with the branch's own `d3d12_xs.dll` built by clang-cl against the Windows SDK and run under Wine with vkd3d-proton on an NVIDIA RTX 4070 Ti SUPER (so a translation-layer result, not Windows, and `hardware` only; there is no WARP there): ``` d32s8 1024x512: desktop size 0x400000 alignment 0x10000; wrapper slot 25 size 0x280000 alignment 0x10000 (console size) d32s8 200x100 4 samples: desktop size 0x400000 alignment 0x400000; wrapper slot 25 size 0xa0000 alignment 0x10000 (console size) rgba8 256x256 4 samples: desktop size 0x400000 alignment 0x400000; wrapper slot 25 size 0x100000 alignment 0x10000 (console size) control rgba8 512x512: desktop size 0x100000 alignment 0x10000; wrapper slot 25 size 0x100000 alignment 0x10000 (desktop answer kept) control d32 1024x512: desktop size 0x200000 alignment 0x10000; wrapper slot 25 size 0x200000 alignment 0x10000 (desktop answer kept) invalid width: desktop size 0x100000000; wrapper size 0x100000000 startup_plane_size_device: PASS (3 of 3 descriptions answered with the console size on this adapter, 5 placed textures, out-of-rule answers unchanged) ``` Two limits I want to be plain about: - The invalid-width line shows vkd3d-proton answering a size where native D3D12 answers all ones, so "desktop failure kept" is only exercised by the device-free check here. On Windows the same line should print all ones on both sides. - Slot 133 creates a committed desktop texture that does not alias the address. So the device test shows the answered size and alignment are accepted by the creation path. It does not show that a console layout fits in that many bytes; that still rests on the nine reference sizes. I have not run `_warp` or anything on Windows; CI is the first run of both device tests there.
tedin7 commented 2026-11-24 09:04:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T08:29:06Z.

Review: COMMENTED


Retested PR #1290 at commit 1a2b32b78462ec7d89054cb559e65b71e1308058 (following previous review at b316ad12).

Verification

  • Linux:
    • git diff --check origin/main...HEAD: passed.
    • tests/docs_links_check.py: passed (16 Markdown files, 290 links).
    • tests/bidi_controls_check.py: passed (1096 tracked files).
  • Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP):
    • Debug (--preset dev): startup_plane_size_check, startup_plane_size_device_check, d3d12_xs_shim built cleanly; ctest -R '^(startup_plane_size|startup_plane_size_device_warp|startup_plane_size_packed_control)$' 3/3 passed (startup_plane_size 0.02s, startup_plane_size_packed_control 0.01s, startup_plane_size_device_warp 0.12s).
    • Release /O2 (--preset release): built cleanly; 3/3 passed (startup_plane_size 0.02s, startup_plane_size_packed_control 0.02s, startup_plane_size_device_warp 0.13s).

Fixes & Findings

All items from the previous review at b316ad12 are addressed:

  • console_plane_shape() in src/startup_stubs/console_plane_size.h now restricts to MipLevels == 1 (fixing MipLevels == 0), Width/Height within 1..D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION (preventing UINT64_MAX wrap), DepthOrArraySize within 1..D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION, SampleDesc.Count in {1, 2, 4, 8}, SampleDesc.Quality == 0, Layout == D3D12_TEXTURE_LAYOUT_UNKNOWN, and Alignment in {0, 0x10000}.
  • console_plane_size() preserves desktop ~0ull failures for desktop formats and only overrides ~0ull for console-only formats 118–120 after shape validation.
  • tests/startup_plane_size_device_check.cpp now exercises both device allocation-info slots (25 and 108), placed texture creation (slot 133) over memory of the answered size/alignment, and out-of-rule/invalid-width controls against the desktop device.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6035925108 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1290#pullrequestreview-6035925108). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T08:29:06Z. **Review:** COMMENTED --- Retested PR #1290 at commit `1a2b32b78462ec7d89054cb559e65b71e1308058` (following previous review at `b316ad12`). ### Verification - **Linux**: - `git diff --check origin/main...HEAD`: passed. - `tests/docs_links_check.py`: passed (16 Markdown files, 290 links). - `tests/bidi_controls_check.py`: passed (1096 tracked files). - **Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP)**: - **Debug (`--preset dev`)**: `startup_plane_size_check`, `startup_plane_size_device_check`, `d3d12_xs_shim` built cleanly; `ctest -R '^(startup_plane_size|startup_plane_size_device_warp|startup_plane_size_packed_control)$'` **3/3 passed** (`startup_plane_size` 0.02s, `startup_plane_size_packed_control` 0.01s, `startup_plane_size_device_warp` 0.12s). - **Release `/O2` (`--preset release`)**: built cleanly; **3/3 passed** (`startup_plane_size` 0.02s, `startup_plane_size_packed_control` 0.02s, `startup_plane_size_device_warp` 0.13s). ### Fixes & Findings All items from the previous review at `b316ad12` are addressed: - `console_plane_shape()` in `src/startup_stubs/console_plane_size.h` now restricts to `MipLevels == 1` (fixing `MipLevels == 0`), `Width`/`Height` within `1..D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION` (preventing `UINT64_MAX` wrap), `DepthOrArraySize` within `1..D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION`, `SampleDesc.Count` in `{1, 2, 4, 8}`, `SampleDesc.Quality == 0`, `Layout == D3D12_TEXTURE_LAYOUT_UNKNOWN`, and `Alignment` in `{0, 0x10000}`. - `console_plane_size()` preserves desktop `~0ull` failures for desktop formats and only overrides `~0ull` for console-only formats `118`–`120` after shape validation. - `tests/startup_plane_size_device_check.cpp` now exercises both device allocation-info slots (`25` and `108`), placed texture creation (`slot 133`) over memory of the answered size/alignment, and out-of-rule/invalid-width controls against the desktop device.
upstream-sync closed this pull request 2026-11-24 10:02:19 +00:00
R0Y00 commented 2026-11-24 10:02:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T09:24:36Z.

Review: APPROVED


Windows Release passed 5/5 on RTX 4060 Laptop and WARP, including the device slots 25/108/133, bounds and packed control, and the retained blend fixture. The result covers size answers and successful committed desktop texture creation; it does not establish console-layout aliasing.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6036639872 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1290#pullrequestreview-6036639872). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T09:24:36Z. **Review:** APPROVED --- Windows Release passed 5/5 on RTX 4060 Laptop and WARP, including the device slots 25/108/133, bounds and packed control, and the retained blend fixture. The result covers size answers and successful committed desktop texture creation; it does not establish console-layout aliasing.
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!1283
No description provided.