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

Merged
tedin7 merged 2 commits from upstream-pr/2148 into main 2026-11-25 07:45:27 +00:00
tedin7 commented 2026-11-25 01:43:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T01:43:52Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6595204361 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2148). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:43:52Z. --- 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.
chatgpt-codex-connector[bot commented 2026-11-25 03:01:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T02:33:24Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7150874116 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2148#issuecomment-7150874116). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T02:33:24Z. --- <!-- 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>
upstream-sync closed this pull request 2026-11-25 08:04:47 +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!2140
No description provided.