startup_stubs: add MSAA G-buffer/HDR and D24_UNORM_S8_UINT console plane sizing #1430

Merged
tedin7 merged 3 commits from upstream-pr/1437 into main 2026-11-24 12:03:33 +00:00
tedin7 commented 2026-11-24 11:30:42 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:30:42Z.


Summary

  • Extend colour_texel_bytes in src/startup_stubs/console_plane_size.h to cover R32G32B32A32 (16 B/texel), R16G16 (4 B/texel), R32 (4 B/texel), R16 (2 B/texel), and R8/A8 (1 B/texel) for MSAA 64 KiB tile sizing and alignment.
  • Extend console_plane_size to handle the R24G8/D24_UNORM_S8_UINT family (formats 44-47) using the 4-byte depth plane + 1-byte stencil plane 64 KiB tile contract, keeping desktop answers when the console size and alignment are not smaller or when desktop failed.
  • Update and expand tests/startup_plane_size_check.cpp with positive cases for all added colour/depth-stencil families, max-dimension non-overflow coverage, and negative controls.

Verification

  • Compiled tests/startup_plane_size_check.cpp with x86_64-w64-mingw32-g++ -std=c++17 -Wall -Wextra -Werror -Isrc and ran Linux unit + --mutate packed negative control (24 answered, 29 left alone).
  • Ran git diff --check, tests/docs_links_check.py, tests/bidi_controls_check.py, and x2w_pipe.py preflight (VERDICT: OK).
  • Windows Server 2025 CTest verification pending.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6580785053 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1437). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T11:30:42Z. --- ## Summary - Extend `colour_texel_bytes` in `src/startup_stubs/console_plane_size.h` to cover `R32G32B32A32` (16 B/texel), `R16G16` (4 B/texel), `R32` (4 B/texel), `R16` (2 B/texel), and `R8`/`A8` (1 B/texel) for MSAA 64 KiB tile sizing and alignment. - Extend `console_plane_size` to handle the `R24G8`/`D24_UNORM_S8_UINT` family (formats 44-47) using the 4-byte depth plane + 1-byte stencil plane 64 KiB tile contract, keeping desktop answers when the console size and alignment are not smaller or when desktop failed. - Update and expand `tests/startup_plane_size_check.cpp` with positive cases for all added colour/depth-stencil families, max-dimension non-overflow coverage, and negative controls. ## Verification - Compiled `tests/startup_plane_size_check.cpp` with `x86_64-w64-mingw32-g++ -std=c++17 -Wall -Wextra -Werror -Isrc` and ran Linux unit + `--mutate packed` negative control (`24 answered, 29 left alone`). - Ran `git diff --check`, `tests/docs_links_check.py`, `tests/bidi_controls_check.py`, and `x2w_pipe.py preflight` (`VERDICT: OK`). - Windows Server 2025 CTest verification pending. AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-24 12:03:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:38:52Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a687955898

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6038516652 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1437#pullrequestreview-6038516652). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T11:38:52Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `a687955898` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
tedin7 commented 2026-11-24 12:03:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:45:53Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6038606427 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1437#pullrequestreview-6038606427). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T11:45:53Z. **Review:** COMMENTED --- _No description provided._
tedin7 commented 2026-11-24 12:03:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:34:32Z.


Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit a6879558982737bf75e9459e4b99b5afe93297b0:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target startup_plane_size_check startup_plane_size_device_check d3d12_xs_shim -- -j 6): 24.92s (configure 1.72s)
    • Test (ctest --preset dev -R '^(startup_plane_size|startup_plane_size_packed_control|startup_plane_size_device_warp)$' --parallel 4 --no-tests=error --output-on-failure): 3/3 passed (0.15s: startup_plane_size 0.02s, startup_plane_size_packed_control 0.01s, startup_plane_size_device_warp 0.07s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target startup_plane_size_check startup_plane_size_device_check d3d12_xs_shim -- -j 6): 36.33s (configure 1.63s)
    • Test (ctest --preset release -R '^(startup_plane_size|startup_plane_size_packed_control|startup_plane_size_device_warp)$' --parallel 4 --no-tests=error --output-on-failure): 3/3 passed (0.14s: startup_plane_size 0.01s, startup_plane_size_packed_control 0.01s, startup_plane_size_device_warp 0.07s)
  • sccache: 0/6 hits; wall 70.6s
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130272911 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1437#issuecomment-7130272911). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T11:34:32Z. --- Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `a6879558982737bf75e9459e4b99b5afe93297b0`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target startup_plane_size_check startup_plane_size_device_check d3d12_xs_shim -- -j 6`): `24.92s` (configure `1.72s`) - Test (`ctest --preset dev -R '^(startup_plane_size|startup_plane_size_packed_control|startup_plane_size_device_warp)$' --parallel 4 --no-tests=error --output-on-failure`): **3/3 passed** (`0.15s`: `startup_plane_size` `0.02s`, `startup_plane_size_packed_control` `0.01s`, `startup_plane_size_device_warp` `0.07s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target startup_plane_size_check startup_plane_size_device_check d3d12_xs_shim -- -j 6`): `36.33s` (configure `1.63s`) - Test (`ctest --preset release -R '^(startup_plane_size|startup_plane_size_packed_control|startup_plane_size_device_warp)$' --parallel 4 --no-tests=error --output-on-failure`): **3/3 passed** (`0.14s`: `startup_plane_size` `0.01s`, `startup_plane_size_packed_control` `0.01s`, `startup_plane_size_device_warp` `0.07s`) - `sccache`: 0/6 hits; wall `70.6s`
chatgpt-codex-connector[bot commented 2026-11-24 12:03:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:34:46Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T11:38:54.274568Z a687955 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130277881 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1437#issuecomment-7130277881). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T11:34:46Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"a6879558982737bf75e9459e4b99b5afe93297b0","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T11:38:54.274568Z">2026-11-24T11:38:54.274568Z</relative-time> | `a687955` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
chatgpt-codex-connector[bot commented 2026-11-24 12:03:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:38:52Z.

Code review location: src/startup_stubs/console_plane_size.h; line 75

@@ -67,13 +72,14 @@ inline bool console_plane_size(const D3D12_RESOURCE_DESC& desc, D3D12_RESOURCE_A
     using namespace plane_detail;
     if (!console_plane_shape(desc)) return false;
     const unsigned format = static_cast<unsigned>(desc.Format);
-    const bool d32s8 = format >= 19 && format <= 22, d16s8 = format >= 118 && format <= 120;
+    const bool d32s8 = format >= 19 && format <= 22, d24s8 = format >= 44 && format <= 47;

P1 Badge Document the newly answered allocation formats

This expands the observable behavior of both device allocation-info entries to R24G8 and additional MSAA colour families, but neither the relevant README row nor docs/experiments.md is updated. AGENTS.md explicitly requires a documentation update when a public capability changes. Add the new coverage and reproduction command, distinguishing the device-independent fixture results from the Windows device verification that the commit message says is still pending, so contributors can identify what is supported and what was actually validated.

AGENTS.md reference: AGENTS.md:L190-L191

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4679427547 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1437#discussion_r4679427547). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T11:38:52Z. **Code review location:** `src/startup_stubs/console_plane_size.h`; line 75 ~~~~diff @@ -67,13 +72,14 @@ inline bool console_plane_size(const D3D12_RESOURCE_DESC& desc, D3D12_RESOURCE_A using namespace plane_detail; if (!console_plane_shape(desc)) return false; const unsigned format = static_cast<unsigned>(desc.Format); - const bool d32s8 = format >= 19 && format <= 22, d16s8 = format >= 118 && format <= 120; + const bool d32s8 = format >= 19 && format <= 22, d24s8 = format >= 44 && format <= 47; ~~~~ --- **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Document the newly answered allocation formats** This expands the observable behavior of both device allocation-info entries to R24G8 and additional MSAA colour families, but neither the relevant README row nor `docs/experiments.md` is updated. `AGENTS.md` explicitly requires a documentation update when a public capability changes. Add the new coverage and reproduction command, distinguishing the device-independent fixture results from the Windows device verification that the commit message says is still pending, so contributors can identify what is supported and what was actually validated. AGENTS.md reference: [AGENTS.md:L190-L191](https://github.com/R0Y00/Xbox2Windows/blob/a6879558982737bf75e9459e4b99b5afe93297b0/AGENTS.md#L190-L191) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
tedin7 commented 2026-11-24 12:03:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:45:53Z.

Code review location: src/startup_stubs/console_plane_size.h; line 75

@@ -67,13 +72,14 @@ inline bool console_plane_size(const D3D12_RESOURCE_DESC& desc, D3D12_RESOURCE_A
     using namespace plane_detail;
     if (!console_plane_shape(desc)) return false;
     const unsigned format = static_cast<unsigned>(desc.Format);
-    const bool d32s8 = format >= 19 && format <= 22, d16s8 = format >= 118 && format <= 120;
+    const bool d32s8 = format >= 19 && format <= 22, d24s8 = format >= 44 && format <= 47;

Fixed in eba22f70 and 5a71e682: docs/startup-runtime.md ("Allocation sizes for depth with stencil and multisampled textures") now lists the covered formats including R24G8 and the added MSAA colour families, and separates the device-independent fixture result (startup_plane_size) from the Windows device check (startup_plane_size_device_, passed on Windows Server 2025 WARP/hardware, Debug and Release), with the reproduction commands.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4679503432 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1437#discussion_r4679503432). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T11:45:53Z. **Code review location:** `src/startup_stubs/console_plane_size.h`; line 75 ~~~~diff @@ -67,13 +72,14 @@ inline bool console_plane_size(const D3D12_RESOURCE_DESC& desc, D3D12_RESOURCE_A using namespace plane_detail; if (!console_plane_shape(desc)) return false; const unsigned format = static_cast<unsigned>(desc.Format); - const bool d32s8 = format >= 19 && format <= 22, d16s8 = format >= 118 && format <= 120; + const bool d32s8 = format >= 19 && format <= 22, d24s8 = format >= 44 && format <= 47; ~~~~ --- Fixed in eba22f70 and 5a71e682: `docs/startup-runtime.md` ("Allocation sizes for depth with stencil and multisampled textures") now lists the covered formats including R24G8 and the added MSAA colour families, and separates the device-independent fixture result (`startup_plane_size`) from the Windows device check (`startup_plane_size_device_`, passed on Windows Server 2025 WARP/hardware, Debug and Release), with the reproduction commands.
upstream-sync closed this pull request 2026-11-24 13:00:26 +00:00
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!1430
No description provided.