shader: reject constant descriptors that overlap the primary texture #159

Merged
Vonsek merged 1 commit from upstream-pr/160 into main 2026-11-21 17:48:56 +00:00
Vonsek commented 2026-11-21 17:47:23 +00:00 (Migrated from github.com)

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


Change

Apply the constant descriptor overlap check to the first texture as well as the second. With the previous check, a shader could load a texture and a constant descriptor from offset zero in the same table and the translator would emit separate desktop bindings for both.

Verification

At c7725d0 on x64 Windows, the focused Python control first failed because offset 0 was accepted. After the change, offsets 0 and 28 are rejected, and the first adjacent aligned placement at byte 32 produces the same HLSL as the baseline at byte 64.

python -B -c "import sys;sys.path.insert(0,'tests');from pixel_aot_check import check_constant_descriptor_bounds;check_constant_descriptor_bounds()"
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$'

The Python control and both CTest cases passed, with no capability skips or pixel mismatches.

Evidence and follow-up

The regression varies the descriptor load in the repository's MIT-licensed, source-built curve shader. It checks byte ranges in the translator's declared binding contract. No game data is needed.

Checklist

  • One reviewable behavior.
  • Commands and results included.
  • Full overlap, partial overlap and adjacent descriptors covered.
  • Existing build and reproduction commands still apply.
  • No game files, dumps, distribution links or secrets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6532316954 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/160). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T17:47:23Z. --- ## Change Apply the constant descriptor overlap check to the first texture as well as the second. With the previous check, a shader could load a texture and a constant descriptor from offset zero in the same table and the translator would emit separate desktop bindings for both. ## Verification At c7725d0 on x64 Windows, the focused Python control first failed because offset 0 was accepted. After the change, offsets 0 and 28 are rejected, and the first adjacent aligned placement at byte 32 produces the same HLSL as the baseline at byte 64. ```powershell python -B -c "import sys;sys.path.insert(0,'tests');from pixel_aot_check import check_constant_descriptor_bounds;check_constant_descriptor_bounds()" cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$' ``` The Python control and both CTest cases passed, with no capability skips or pixel mismatches. ## Evidence and follow-up The regression varies the descriptor load in the repository's MIT-licensed, source-built curve shader. It checks byte ranges in the translator's declared binding contract. No game data is needed. ## Checklist - [x] One reviewable behavior. - [x] Commands and results included. - [x] Full overlap, partial overlap and adjacent descriptors covered. - [x] Existing build and reproduction commands still apply. - [x] No game files, dumps, distribution links or secrets. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:41:36 +00:00
saurabhkr1825-svg commented 2026-11-24 06:41:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by saurabhkr1825-svg on 2026-11-21T17:55:56Z.

Review: APPROVED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6007128428 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/160#pullrequestreview-6007128428). Originally posted by [saurabhkr1825-svg](https://github.com/saurabhkr1825-svg) on 2026-11-21T17:55:56Z. **Review:** APPROVED --- _No description provided._
chatgpt-codex-connector[bot commented 2026-11-24 06:47:43 +00:00 (Migrated from github.com)

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


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-21T17:50:09.346701Z c7725d0 PR opened
ℹ️ 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:7066748341 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/160#issuecomment-7066748341). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T17:47:35Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"c7725d0e68cf36d506bbb4874dcdd4926f124383","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-21T17:50:09.346701Z">2026-11-21T17:50:09.346701Z</relative-time> | `c7725d0` | PR opened | <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>
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!159
No description provided.