shader: lower RGB-only pixel texture samples #298

Merged
Vonsek merged 8 commits from upstream-pr/303 into main 2026-11-22 09:13:15 +00:00
Vonsek commented 2026-11-21 21:34:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:34:24Z.


Change

Support the entry-mask gfx1013 2D image_sample RGB form, dmask:0x7, in tools/pixel_aot.py. The masked sample fills exactly three vector registers. The fourth register stays available, including while the sample is outstanding. Existing sample-count and execution-mask checks still apply.

Verification

Tested 09812d3 on Windows 26200.9974 with WARP 10.0.26100.9818 and RTX 5080 driver 32.0.16.1692. The renderer reported the debug layer unavailable on both adapters.

cmake --preset dev
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error --output-on-failure -R '^(pixel_aot_(warp|hardware)|bc7_draw_(warp|hardware)|docs_links)$'
python -B tests/bidi_controls_check.py
git diff --check

All five CTests passed without capability skips. The bidi and whitespace checks passed.

python -B tests/pixel_aot_check.py binary "<LLVM 15.0.7 gfx1013 assembler wrapper>" "<LLVM 15.0.7 llvm-objcopy.exe>" "<LLVM 15.0.7 LLVM-C.dll>"

The source-built fixture fails on b53bfb0 at instruction 16 with an unsupported image_sample diagnostic. The LLVM round trip passes with this change. The normal tools/pixel_aot.py CLI also extracts the same 22-instruction synthetic record and emits identical HLSL. The Windows assembler wrapper invokes clang -cc1as -triple amdgcn--amdpal -target-cpu gfx1013 -filetype obj.

Capability-skip verification

At 3c4b1c0, the RGB fixture runs after the draw that propagates capability skips. Using a stub compiler that exits 0 and a stub renderer that exits 77, python -B tests/pixel_aot_check.py draw <stub-compiler> <stub-renderer> hardware now exits 77. CTest reports the case as skipped with SKIP_RETURN_CODE 77. The real WARP and hardware pixel tests and docs_links passed again.

Evidence and follow-up

The MIT-licensed test builds from the repository's handwritten texture-copy shader. It presets the register next to the RGB destination to 0.5 and exports that value as alpha. The draw matches the independent CPU reference bitwise for all 4,096 pixels and 16,384 color channels on both adapters. Expecting the texture's alpha of 1.0 instead yields the first mismatch at (0, 0). Controls reject a wrong destination width, a different data mask and an overwrite of a pending RGB result.

The isolated RGB behavior is separate from the partial VM waits in #176 and the affine coordinate work in #283. The surveyed multi-sample program still encounters an earlier whole-quad sample rejection. Reproduction steps

This contribution was AI-assisted.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

Upstream merge verification

Merged upstream through 6ee2406 at 3393ef8. The integrated fixture retains the RGB case and the merged scalar ALU, literal FMA and half conversion checks. LLVM 15 binary, bidi and whitespace checks passed. Reconfigured the dev preset and ran:

ctest --preset dev --no-tests=error --output-on-failure -R '^(pixel_aot_(warp|hardware)|bc7_draw_(warp|hardware)|docs_links|pso_readiness_check|sgd5_effect_candidates)$'

All seven checks passed on the available adapters without skips. The newly merged half-conversion fixture introduced a separate no-adapter ordering regression on main. Its fix and simulated skip evidence are in #322.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6534667168 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T21:34:24Z. --- ## Change Support the entry-mask gfx1013 2D `image_sample` RGB form, `dmask:0x7`, in `tools/pixel_aot.py`. The masked sample fills exactly three vector registers. The fourth register stays available, including while the sample is outstanding. Existing sample-count and execution-mask checks still apply. ## Verification Tested `09812d3` on Windows 26200.9974 with WARP 10.0.26100.9818 and RTX 5080 driver 32.0.16.1692. The renderer reported the debug layer unavailable on both adapters. ```powershell cmake --preset dev cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error --output-on-failure -R '^(pixel_aot_(warp|hardware)|bc7_draw_(warp|hardware)|docs_links)$' python -B tests/bidi_controls_check.py git diff --check ``` All five CTests passed without capability skips. The bidi and whitespace checks passed. ```powershell python -B tests/pixel_aot_check.py binary "<LLVM 15.0.7 gfx1013 assembler wrapper>" "<LLVM 15.0.7 llvm-objcopy.exe>" "<LLVM 15.0.7 LLVM-C.dll>" ``` The source-built fixture fails on `b53bfb0` at instruction 16 with an unsupported `image_sample` diagnostic. The LLVM round trip passes with this change. The normal `tools/pixel_aot.py` CLI also extracts the same 22-instruction synthetic record and emits identical HLSL. The Windows assembler wrapper invokes `clang -cc1as -triple amdgcn--amdpal -target-cpu gfx1013 -filetype obj`. ### Capability-skip verification At `3c4b1c0`, the RGB fixture runs after the draw that propagates capability skips. Using a stub compiler that exits 0 and a stub renderer that exits 77, `python -B tests/pixel_aot_check.py draw <stub-compiler> <stub-renderer> hardware` now exits 77. CTest reports the case as skipped with `SKIP_RETURN_CODE 77`. The real WARP and hardware pixel tests and `docs_links` passed again. ## Evidence and follow-up The MIT-licensed test builds from the repository's handwritten texture-copy shader. It presets the register next to the RGB destination to 0.5 and exports that value as alpha. The draw matches the independent CPU reference bitwise for all 4,096 pixels and 16,384 color channels on both adapters. Expecting the texture's alpha of 1.0 instead yields the first mismatch at (0, 0). Controls reject a wrong destination width, a different data mask and an overwrite of a pending RGB result. The isolated RGB behavior is separate from the partial VM waits in #176 and the affine coordinate work in #283. The surveyed multi-sample program still encounters an earlier whole-quad sample rejection. [Reproduction steps](https://github.com/Vonsek/Xbox2Windows/blob/codex/pixel-rgb-sample/docs/experiments.md#offline-pixel-shader-recompilation) This contribution was AI-assisted. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. ### Upstream merge verification Merged upstream through `6ee2406` at `3393ef8`. The integrated fixture retains the RGB case and the merged scalar ALU, literal FMA and half conversion checks. LLVM 15 binary, bidi and whitespace checks passed. Reconfigured the dev preset and ran: ```powershell ctest --preset dev --no-tests=error --output-on-failure -R '^(pixel_aot_(warp|hardware)|bc7_draw_(warp|hardware)|docs_links|pso_readiness_check|sgd5_effect_candidates)$' ``` All seven checks passed on the available adapters without skips. The newly merged half-conversion fixture introduced a separate no-adapter ordering regression on main. Its fix and simulated skip evidence are in #322.
upstream-sync closed this pull request 2026-11-24 06:42:19 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 06:42:19 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:36:57Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09812d3c8d

ℹ️ 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:6008318867 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#pullrequestreview-6008318867). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T21:36:57Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `09812d3c8d` <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>
Vonsek commented 2026-11-24 06:42:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:39:23Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6008334903 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#pullrequestreview-6008334903). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T21:39:23Z. **Review:** COMMENTED --- _No description provided._
Vonsek commented 2026-11-24 06:48:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:41:45Z.


@codex review

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7069654378 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#issuecomment-7069654378). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T21:41:45Z. --- @codex review
chatgpt-codex-connector[bot commented 2026-11-24 06:48:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:44:21Z.


Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 3c4b1c02c6

ℹ️ 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:comment:7069685212 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#issuecomment-7069685212). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T21:44:21Z. --- <!-- codex-review-receipt:v1 --> Codex Review: Didn't find any major issues. You're on a roll. **Reviewed commit:** `3c4b1c02c6` <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>
R0Y00 commented 2026-11-24 06:48:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T21:58:28Z.


At 3c4b1c0 the merge conflicts are in README.md, tests/pixel_aot_check.py. Preserve RGB and RGBA sample controls alongside the existing single-mip tests. Please also update scanner recognition for dmask:0x7 so the PSO report can reach the lowerer.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7069849830 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#issuecomment-7069849830). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T21:58:28Z. --- At `3c4b1c0` the merge conflicts are in `README.md`, `tests/pixel_aot_check.py`. Preserve RGB and RGBA sample controls alongside the existing single-mip tests. Please also update scanner recognition for `dmask:0x7` so the PSO report can reach the lowerer.
Vonsek commented 2026-11-24 06:48:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T22:08:11Z.


@codex review

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7069964180 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#issuecomment-7069964180). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T22:08:11Z. --- @codex review
chatgpt-codex-connector[bot commented 2026-11-24 06:48:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T22:11:26Z.


Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 3393ef8dd3

ℹ️ 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:comment:7070002984 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#issuecomment-7070002984). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T22:11:26Z. --- <!-- codex-review-receipt:v1 --> Codex Review: Didn't find any major issues. Keep it up! **Reviewed commit:** `3393ef8dd3` <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>
chatgpt-codex-connector[bot commented 2026-11-24 06:48:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:34:36Z.


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-21T22:11:28.321904Z 3393ef8 Manual request
ℹ️ 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:7069570917 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#issuecomment-7069570917). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T21:34:36Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"3393ef8dd34f3e7931b4d93c72aa4f10cc4987da","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-21T22:11:28.321904Z">2026-11-21T22:11:28.321904Z</relative-time> | `3393ef8` | Manual request | <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>
R0Y00 commented 2026-11-24 06:48:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T02:56:22Z.


A test merge of 3393ef8 against main conflicts in README.md and tests/pixel_aot_check.py. Keep the RGB fixture in the LLVM list alongside affine_coordinates() and the MAD controls. Please refresh the branch and rerun the relevant fixture and Windows CI.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073226414 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#issuecomment-7073226414). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T02:56:22Z. --- A test merge of `3393ef8` against main conflicts in `README.md` and `tests/pixel_aot_check.py`. Keep the RGB fixture in the LLVM list alongside `affine_coordinates()` and the MAD controls. Please refresh the branch and rerun the relevant fixture and Windows CI.
chatgpt-codex-connector[bot commented 2026-11-24 06:50:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T21:36:58Z.

Code review location: tests/pixel_aot_check.py; line 851

@@ -820,7 +836,27 @@ def check_ceiling_draws(directory, compiler, renderer, backend):
         raise AssertionError("Replacing ceiling with floor escaped detection")
 
 
+def check_rgb_sample_draw(directory: Path, compiler: str, renderer: str, backend: str) -> None:
+    hlsl = directory / "rgb-sample.hlsl"
+    shader = directory / "rgb-sample.cso"
+    case = directory / "rgb-sample.case"
+    hlsl.write_text(translate(rgb_sample()), encoding="ascii")
+    subprocess.run([compiler, "-Gis", "-T", "ps_6_0", "-E", "main", "-Fo", shader, hlsl], check=True)
+    draw = [renderer, backend, "--check-pixel-case", shader, case]
+    for alpha in (0.5, 1.0):
+        colors = (struct.pack("<4f", half_rtz(red / 255), half_rtz(green / 255), half_rtz(128 / 255), alpha)
+                  for green in RAMP for red in RAMP)
+        case.write_bytes(bytes(256) + b"".join(colors))
+        if alpha == 0.5:
+            subprocess.run(draw, check=True)

P2 Badge Preserve capability skips in the new RGB draw

On a Windows host without a D3D12-capable hardware adapter, offscreen_check returns 77 (tests/offscreen_check.cpp:396–398). The new RGB check runs before the skip-aware draw in check_render(), so this check=True raises an uncaught CalledProcessError, changing the Python exit code from 77 to 1. Consequently, pixel_aot_hardware fails instead of skipping despite SKIP_RETURN_CODE 77 in CMakeLists.txt:902—the property CMake documents as “Return code to mark a test as skipped.” Propagate 77 to the script's exit status, or run this check after the initial skip-aware draw, preserving the distinction between skips and failures required by AGENTS.md.

AGENTS.md reference: AGENTS.md:L87-L89

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4655114984 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#discussion_r4655114984). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T21:36:58Z. **Code review location:** `tests/pixel_aot_check.py`; line 851 ~~~~diff @@ -820,7 +836,27 @@ def check_ceiling_draws(directory, compiler, renderer, backend): raise AssertionError("Replacing ceiling with floor escaped detection") +def check_rgb_sample_draw(directory: Path, compiler: str, renderer: str, backend: str) -> None: + hlsl = directory / "rgb-sample.hlsl" + shader = directory / "rgb-sample.cso" + case = directory / "rgb-sample.case" + hlsl.write_text(translate(rgb_sample()), encoding="ascii") + subprocess.run([compiler, "-Gis", "-T", "ps_6_0", "-E", "main", "-Fo", shader, hlsl], check=True) + draw = [renderer, backend, "--check-pixel-case", shader, case] + for alpha in (0.5, 1.0): + colors = (struct.pack("<4f", half_rtz(red / 255), half_rtz(green / 255), half_rtz(128 / 255), alpha) + for green in RAMP for red in RAMP) + case.write_bytes(bytes(256) + b"".join(colors)) + if alpha == 0.5: + subprocess.run(draw, check=True) ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Preserve capability skips in the new RGB draw** On a Windows host without a D3D12-capable hardware adapter, `offscreen_check` returns 77 (`tests/offscreen_check.cpp:396–398`). The new RGB check runs before the skip-aware draw in `check_render()`, so this `check=True` raises an uncaught `CalledProcessError`, changing the Python exit code from 77 to 1. Consequently, `pixel_aot_hardware` fails instead of skipping despite `SKIP_RETURN_CODE 77` in `CMakeLists.txt:902`—the property CMake documents as “Return code to mark a test as skipped.” Propagate 77 to the script's exit status, or run this check after the initial skip-aware draw, preserving the distinction between skips and failures required by `AGENTS.md`. AGENTS.md reference: [AGENTS.md:L87-L89](https://github.com/R0Y00/Xbox2Windows/blob/09812d3c8d8de31a31e7e23d7c50b0c81c2f06c7/AGENTS.md#L87-L89) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Vonsek commented 2026-11-24 06:50:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T21:39:23Z.

Code review location: tests/pixel_aot_check.py; line 851

@@ -820,7 +836,27 @@ def check_ceiling_draws(directory, compiler, renderer, backend):
         raise AssertionError("Replacing ceiling with floor escaped detection")
 
 
+def check_rgb_sample_draw(directory: Path, compiler: str, renderer: str, backend: str) -> None:
+    hlsl = directory / "rgb-sample.hlsl"
+    shader = directory / "rgb-sample.cso"
+    case = directory / "rgb-sample.case"
+    hlsl.write_text(translate(rgb_sample()), encoding="ascii")
+    subprocess.run([compiler, "-Gis", "-T", "ps_6_0", "-E", "main", "-Fo", shader, hlsl], check=True)
+    draw = [renderer, backend, "--check-pixel-case", shader, case]
+    for alpha in (0.5, 1.0):
+        colors = (struct.pack("<4f", half_rtz(red / 255), half_rtz(green / 255), half_rtz(128 / 255), alpha)
+                  for green in RAMP for red in RAMP)
+        case.write_bytes(bytes(256) + b"".join(colors))
+        if alpha == 0.5:
+            subprocess.run(draw, check=True)

Moved the RGB fixture after the existing capability-aware draws in 3c4b1c0. I reproduced the original failure by making the renderer return 77. The draw command now exits with 77 and reaches only the initial capability-aware draw. The real pixel CTests pass on WARP and RTX 5080.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4655122510 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/303#discussion_r4655122510). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T21:39:23Z. **Code review location:** `tests/pixel_aot_check.py`; line 851 ~~~~diff @@ -820,7 +836,27 @@ def check_ceiling_draws(directory, compiler, renderer, backend): raise AssertionError("Replacing ceiling with floor escaped detection") +def check_rgb_sample_draw(directory: Path, compiler: str, renderer: str, backend: str) -> None: + hlsl = directory / "rgb-sample.hlsl" + shader = directory / "rgb-sample.cso" + case = directory / "rgb-sample.case" + hlsl.write_text(translate(rgb_sample()), encoding="ascii") + subprocess.run([compiler, "-Gis", "-T", "ps_6_0", "-E", "main", "-Fo", shader, hlsl], check=True) + draw = [renderer, backend, "--check-pixel-case", shader, case] + for alpha in (0.5, 1.0): + colors = (struct.pack("<4f", half_rtz(red / 255), half_rtz(green / 255), half_rtz(128 / 255), alpha) + for green in RAMP for red in RAMP) + case.write_bytes(bytes(256) + b"".join(colors)) + if alpha == 0.5: + subprocess.run(draw, check=True) ~~~~ --- Moved the RGB fixture after the existing capability-aware draws in `3c4b1c0`. I reproduced the original failure by making the renderer return 77. The draw command now exits with 77 and reaches only the initial capability-aware draw. The real pixel CTests pass on WARP and RTX 5080.
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!298
No description provided.