startup: add 32-bit integer and float render-target variants for translated pixel stages #2148

Manually merged
github merged 2 commits from gh-pr/2148/head into gh-pr/2148/base 2026-11-27 00:00:26 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-25 01:43 UTC · original
tedin7:x2w-1999f-rtv-int-float-variants → main · +87 −15 · 8 files · 2 commits · merged 2026-11-25 07:45 UTC

Part of #1999

What this unblocks: translated pixel stages can now write R32G32B32A32, R32G32 and R32 integer targets and R32G32/R32 float targets (item F), not only R32 integer and RGBA32 float.

Changes:

  • tools/startup/gfx2hlsl.py: mrt_kind accepts UINT/SINT formats 3, 17, 42 and 4, 18, 43 (all channels 32 bits wide, so export words are the stored words). 8/16-bit integer formats stay refused (unverified UINT/SINT RTV format <n>).
  • tests/startup_stream_setup.*, startup_stream_draw.cpp, startup_stream_consumer.cpp: one stream_mrt_format table (typeless resource, bytes per pixel) replaces the R32-only special cases.
  • tests/startup_mrt_check.py (existing startup_mrt_{fxc,dxc}_{warp,hardware}): exact readback of every stored word for each new integer format (second UNORM target kept), exact float words with NaN payload and negative denormal for R32G32_FLOAT / R32_FLOAT, plus refusal controls for eight narrow integer formats (no manifest written) and the existing stale-signedness control.
  • tests/startup_gfx2hlsl_export_mask_check.py: signature and refusal checks without a device.
  • docs/startup-runtime.md updated.

Verification:

  • Linux: python3 -B tests/startup_gfx2hlsl_export_mask_check.py -> 0 failed; python3 -B tests/docs_links_check.py -> pass; python3 -B tests/startup_gfx2hlsl_refusals_check.py -> pass.
  • Win2025 WARP/hardware: NOT yet run. ctest --preset release --no-tests=error -R "^startup_mrt_" is still to be executed, and the C++ test changes are uncompiled. This stays Draft until it passes.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 01:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2148) `tedin7:x2w-1999f-rtv-int-float-variants` → `main` · +87 −15 · 8 files · 2 commits · merged 2026-11-25 07:45 UTC Part of #1999 What this unblocks: translated pixel stages can now write R32G32B32A32, R32G32 and R32 integer targets and R32G32/R32 float targets (item F), not only R32 integer and RGBA32 float. Changes: - `tools/startup/gfx2hlsl.py`: `mrt_kind` accepts UINT/SINT formats 3, 17, 42 and 4, 18, 43 (all channels 32 bits wide, so export words are the stored words). 8/16-bit integer formats stay refused (`unverified UINT/SINT RTV format <n>`). - `tests/startup_stream_setup.*`, `startup_stream_draw.cpp`, `startup_stream_consumer.cpp`: one `stream_mrt_format` table (typeless resource, bytes per pixel) replaces the R32-only special cases. - `tests/startup_mrt_check.py` (existing `startup_mrt_{fxc,dxc}_{warp,hardware}`): exact readback of every stored word for each new integer format (second UNORM target kept), exact float words with NaN payload and negative denormal for R32G32_FLOAT / R32_FLOAT, plus refusal controls for eight narrow integer formats (no manifest written) and the existing stale-signedness control. - `tests/startup_gfx2hlsl_export_mask_check.py`: signature and refusal checks without a device. - `docs/startup-runtime.md` updated. Verification: - Linux: `python3 -B tests/startup_gfx2hlsl_export_mask_check.py` -> 0 failed; `python3 -B tests/docs_links_check.py` -> pass; `python3 -B tests/startup_gfx2hlsl_refusals_check.py` -> pass. - Win2025 WARP/hardware: NOT yet run. `ctest --preset release --no-tests=error -R "^startup_mrt_"` is still to be executed, and the C++ test changes are uncompiled. This stays Draft until it passes. AI-assisted; commands listed were executed locally.
Accept R32G32B32A32, R32G32 and R32 UINT/SINT targets next to R32, cover R32G32_FLOAT and
R32_FLOAT, and keep 8/16-bit integer channels refused. Extends startup_mrt_* readback and the
export-mask translation check.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:00:25 +00:00
github manually merged commit c2cdbfea7e into gh-pr/2148/base 2026-11-27 00:00:26 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 02:33 UTC · original · edited 2026-11-25 02:37 UTC

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-25T02:37:52.708636Z a298821 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.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 02:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2148#issuecomment-7150874116) · edited 2026-11-25 02:37 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"a298821d63195e9a86e29e99ea8cfb241e9c9e6a","has_any_findings":false,"has_unresolved_findings":false,"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-25T02:37:52.708636Z">2026-11-25T02:37:52.708636Z</relative-time> | `a298821` | 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>
This discussion has been locked. Commenting is limited to contributors.
No description provided.