shader: clear gfx2hlsl scalar min/max SCC on ties #3435

Open
nanyoudegege wants to merge 1 commit from upstream-pr/3435 into main
nanyoudegege commented 2026-11-29 08:14:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by nanyoudegege on 2026-11-29T08:14:51Z.


Refs #3434.

AMD's public RDNA 2 ISA reference, §12.1 (pp. 102–103, SOP2 opcodes 6–9), uses strict comparisons for the signed and unsigned scalar min/max instructions. Equal operands therefore leave the numerical min/max unchanged and clear SCC. The direct compute emitters already use strict comparisons. This patch changes only the gfx2hlsl SCC predicate, updates the Case S oracle and scalar-null test, and replaces the old negative control with one that restores the inclusive predicate.

Validation on Linux, based on 1a44cee5ee29ab7da2a4cd09eb5bc052020022ac:

  • python3 -B tests/startup_gfx2hlsl_compute_check.py and python3 -B tests/startup_gfx2hlsl_scalar_null_check.py: both fail with the updated tests on the old translator and pass with the patch. All 118 registered no-argument startup_gfx2hlsl Python checks passed (no skips); git diff --check was clean.
  • python3 -B tests/startup_gfx2hlsl_compute_check.py binary llvm-mc-15: the source-built fixture matched its stored bytes. Case S compiled with DXC (dxc -T cs_6_0 -E main -Fo case-s.dxil case-s.hlsl).
  • An independent software Vulkan replay of the same 4×4 fixture matched all 320 words with Mesa llvmpipe. The old behavior differed on the four equal-input groups; restoring the inclusive unsigned-min condition also failed on those four groups (first word expected 00000000, got 00000100). The checked-in CTest selectors for Windows are ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_compute_(warp|s-min-inclusive_warp)$' -V if those targets are configured; no Windows WARP, physical GPU, or native direct-backend dispatch was run in this cloud environment.

AI-assisted implementation and independent review. Only the repository's source-built fixtures were used.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5548926032 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435). Originally posted by [nanyoudegege](https://github.com/nanyoudegege) on 2026-11-29T08:14:51Z. --- Refs #3434. [AMD's public RDNA 2 ISA reference](https://www.amd.com/content/dam/amd/en/documents/radeon-tech-docs/instruction-set-architectures/rdna2-shader-instruction-set-architecture.pdf), §12.1 (pp. 102–103, SOP2 opcodes 6–9), uses strict comparisons for the signed and unsigned scalar min/max instructions. Equal operands therefore leave the numerical min/max unchanged and clear SCC. The direct compute emitters already use strict comparisons. This patch changes only the gfx2hlsl SCC predicate, updates the Case S oracle and scalar-null test, and replaces the old negative control with one that restores the inclusive predicate. Validation on Linux, based on `1a44cee5ee29ab7da2a4cd09eb5bc052020022ac`: - `python3 -B tests/startup_gfx2hlsl_compute_check.py` and `python3 -B tests/startup_gfx2hlsl_scalar_null_check.py`: both fail with the updated tests on the old translator and pass with the patch. All 118 registered no-argument startup_gfx2hlsl Python checks passed (no skips); `git diff --check` was clean. - `python3 -B tests/startup_gfx2hlsl_compute_check.py binary llvm-mc-15`: the source-built fixture matched its stored bytes. Case S compiled with DXC (`dxc -T cs_6_0 -E main -Fo case-s.dxil case-s.hlsl`). - An independent software Vulkan replay of the same 4×4 fixture matched all 320 words with Mesa llvmpipe. The old behavior differed on the four equal-input groups; restoring the inclusive unsigned-min condition also failed on those four groups (first word expected `00000000`, got `00000100`). The checked-in CTest selectors for Windows are `ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_compute_(warp|s-min-inclusive_warp)$' -V` if those targets are configured; no Windows WARP, physical GPU, or native direct-backend dispatch was run in this cloud environment. AI-assisted implementation and independent review. Only the repository's source-built fixtures were used.
chatgpt-codex-connector[bot] commented 2026-11-29 08:15:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-29T08:15:06Z.


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-29T08:18:52.330856Z 710fb44 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:7252983269 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435#issuecomment-7252983269). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-29T08:15:06Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"710fb44d6b1ffe9b1a39bb6b87858fcf956e069c","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-29T08:18:52.330856Z">2026-11-29T08:18:52.330856Z</relative-time> | `710fb44` | 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>
chatgpt-codex-connector[bot] commented 2026-11-29 08:18:50 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-29T08:18:50Z.

Code review location: tools/startup/gfx2hlsl.py; line 11495

@@ -11492,7 +11492,7 @@ def add_sub_min_max_scc(base, a, b, result):
     if base == 's_sub_i32':
         return '(((((%s) ^ (%s)) & ((%s) ^ (%s))) >> 31) != 0)' % (a, b, a, result)
     cast = 'int' if base.endswith('_i32') else ''
-    return '(%s(%s) %s %s(%s))' % (cast, a, '<=' if base.startswith('s_min') else '>=', cast, b)
+    return '(%s(%s) %s %s(%s))' % (cast, a, '<' if base.startswith('s_min') else '>', cast, b)

P2 Badge Invalidate cached translations for the new SCC semantics

When upgrading while retaining a populated X2W_SHADER_CACHE on the gfx2hlsl path, completed shaders continue using the inclusive predicate. pipeline_key() and compute_key() still use revision 29, matching the unchanged runtime constants in src/startup_stubs/d3d12_draw.inl, and pending_keys() skips existing manifest/bytecode pairs without checking translator changes. The bundled Case S produces different HLSL but retains its previous cache key, so affected cached shaders still set SCC on ties until the cache is manually cleared. Advance the affected cache revisions on both translator and runtime sides, or otherwise invalidate completed translations, alongside this semantic change.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4730618447 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435#discussion_r4730618447). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-29T08:18:50Z. **Code review location:** `tools/startup/gfx2hlsl.py`; line 11495 ~~~~diff @@ -11492,7 +11492,7 @@ def add_sub_min_max_scc(base, a, b, result): if base == 's_sub_i32': return '(((((%s) ^ (%s)) & ((%s) ^ (%s))) >> 31) != 0)' % (a, b, a, result) cast = 'int' if base.endswith('_i32') else '' - return '(%s(%s) %s %s(%s))' % (cast, a, '<=' if base.startswith('s_min') else '>=', cast, b) + return '(%s(%s) %s %s(%s))' % (cast, a, '<' if base.startswith('s_min') else '>', cast, b) ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Invalidate cached translations for the new SCC semantics** When upgrading while retaining a populated `X2W_SHADER_CACHE` on the gfx2hlsl path, completed shaders continue using the inclusive predicate. `pipeline_key()` and `compute_key()` still use revision 29, matching the unchanged runtime constants in `src/startup_stubs/d3d12_draw.inl`, and `pending_keys()` skips existing manifest/bytecode pairs without checking translator changes. The bundled Case S produces different HLSL but retains its previous cache key, so affected cached shaders still set SCC on ties until the cache is manually cleared. Advance the affected cache revisions on both translator and runtime sides, or otherwise invalidate completed translations, alongside this semantic change. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot] commented 2026-11-29 08:18:50 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-29T08:18:50Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 710fb44d6b

ℹ️ 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:6102055155 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435#pullrequestreview-6102055155). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-29T08:18:50Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `710fb44d6b` <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>
nanyoudegege commented 2026-11-29 08:27:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by nanyoudegege on 2026-11-29T08:27:01Z.

Code review location: tools/startup/gfx2hlsl.py; line 11495

@@ -11492,7 +11492,7 @@ def add_sub_min_max_scc(base, a, b, result):
     if base == 's_sub_i32':
         return '(((((%s) ^ (%s)) & ((%s) ^ (%s))) >> 31) != 0)' % (a, b, a, result)
     cast = 'int' if base.endswith('_i32') else ''
-    return '(%s(%s) %s %s(%s))' % (cast, a, '<=' if base.startswith('s_min') else '>=', cast, b)
+    return '(%s(%s) %s %s(%s))' % (cast, a, '<' if base.startswith('s_min') else '>', cast, b)

Confirmed on Linux with source-built inputs: the same warm cache caused gfx2hlsl.py --pending to skip Case S compute, a graphics pair, and a slot-57 mesh+pixel pair. Cold translation produced different DXIL for all three. The slot-57 pixel path shares this SCC lowering but has its own key; that key also names captured .mesh57-state / .s57 inputs, so a blanket bump needs a capture-compatibility plan. #3382 also uses 30/30cs for a different translation change. I’m leaving the review open rather than reusing those seeds. Would you prefer to stage the SCC invalidation after #3382 with a coordinated revision and slot-57 compatibility plan?

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4730641235 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435#discussion_r4730641235). Originally posted by [nanyoudegege](https://github.com/nanyoudegege) on 2026-11-29T08:27:01Z. **Code review location:** `tools/startup/gfx2hlsl.py`; line 11495 ~~~~diff @@ -11492,7 +11492,7 @@ def add_sub_min_max_scc(base, a, b, result): if base == 's_sub_i32': return '(((((%s) ^ (%s)) & ((%s) ^ (%s))) >> 31) != 0)' % (a, b, a, result) cast = 'int' if base.endswith('_i32') else '' - return '(%s(%s) %s %s(%s))' % (cast, a, '<=' if base.startswith('s_min') else '>=', cast, b) + return '(%s(%s) %s %s(%s))' % (cast, a, '<' if base.startswith('s_min') else '>', cast, b) ~~~~ --- Confirmed on Linux with source-built inputs: the same warm cache caused `gfx2hlsl.py --pending` to skip Case S compute, a graphics pair, and a slot-57 mesh+pixel pair. Cold translation produced different DXIL for all three. The slot-57 pixel path shares this SCC lowering but has its own key; that key also names captured `.mesh57-state` / `.s57` inputs, so a blanket bump needs a capture-compatibility plan. #3382 also uses `30`/`30cs` for a different translation change. I’m leaving the review open rather than reusing those seeds. Would you prefer to stage the SCC invalidation after #3382 with a coordinated revision and slot-57 compatibility plan?
Leyukaka commented 2026-11-29 08:27:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T08:27:44Z.

Review: CHANGES_REQUESTED


Reviewed 710fb44d by reading the diff; nothing built or run. It merges cleanly into main d58a9f63.

The only translator change is tools/startup/gfx2hlsl.py:11495, <=/>= to </>. With it gfx2hlsl gives the same SCC as the direct path for all four ops when S0 == S1 (SCC clear): src/gfx1013_direct_compute.inl:4007 at this head, cmp(sign + (... == "min" ? "lt" : "gt"), a, b), and src/gfx1013_compute_native.cpp:1329, scc=lhs < rhs / lhs > rhs (unsigned forms). The description cites an ISA reference (§12.1, SOP2 opcodes 6-9) for the strict rule and states that no WARP, hardware or direct-backend dispatch was run. The Case S oracle, the s-min-inclusive control (pinned at word 0, bit 8), check_scc_modelled and the four null strings in startup_gfx2hlsl_scalar_null_check.py follow the strict rule; no assertion of the inclusive rule is left.

Changes requested:

  • Cache revision: src/startup_stubs/d3d12_draw.inl:419-420 and gfx2hlsl.py:12966,12976 still use x2w-startup-shader-29 / 29cs, so translations already in the cache keep setting SCC on ties. #2778, which introduced the inclusive rule, advanced the revision (26 -> 27) on both sides. This change needs the same bump (src/shader_compute_request.cpp:180,191 and the tests and docs that pin 29 carry the string too).

Not covered:

  • No test compares the two paths, as #3434 suggested. Case S compares gfx2hlsl with a Python reference; the general s_min/s_max block of gfx1013-direct-cs still has no SCC test with S0 == S1.
  • The pr test preset filter does not match startup_gfx2hlsl_compute_warp or startup_gfx2hlsl_compute_s-min-inclusive_warp, so CI did not run the Case S dispatch or the new control.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6102081337 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435#pullrequestreview-6102081337). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T08:27:44Z. **Review:** CHANGES_REQUESTED --- Reviewed 710fb44d by reading the diff; nothing built or run. It merges cleanly into main d58a9f63. The only translator change is `tools/startup/gfx2hlsl.py:11495`, `<=`/`>=` to `<`/`>`. With it gfx2hlsl gives the same SCC as the direct path for all four ops when S0 == S1 (SCC clear): `src/gfx1013_direct_compute.inl:4007` at this head, `cmp(sign + (... == "min" ? "lt" : "gt"), a, b)`, and `src/gfx1013_compute_native.cpp:1329`, `scc=lhs < rhs` / `lhs > rhs` (unsigned forms). The description cites an ISA reference (§12.1, SOP2 opcodes 6-9) for the strict rule and states that no WARP, hardware or direct-backend dispatch was run. The Case S oracle, the `s-min-inclusive` control (pinned at word 0, bit 8), `check_scc_modelled` and the four `null` strings in `startup_gfx2hlsl_scalar_null_check.py` follow the strict rule; no assertion of the inclusive rule is left. Changes requested: - Cache revision: `src/startup_stubs/d3d12_draw.inl:419-420` and `gfx2hlsl.py:12966,12976` still use `x2w-startup-shader-29` / `29cs`, so translations already in the cache keep setting SCC on ties. #2778, which introduced the inclusive rule, advanced the revision (26 -> 27) on both sides. This change needs the same bump (`src/shader_compute_request.cpp:180,191` and the tests and docs that pin 29 carry the string too). Not covered: - No test compares the two paths, as #3434 suggested. Case S compares gfx2hlsl with a Python reference; the general `s_min`/`s_max` block of `gfx1013-direct-cs` still has no SCC test with S0 == S1. - The `pr` test preset filter does not match `startup_gfx2hlsl_compute_warp` or `startup_gfx2hlsl_compute_s-min-inclusive_warp`, so CI did not run the Case S dispatch or the new control.
Leyukaka commented 2026-11-29 08:44:48 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T08:44:48Z.


Either order works, as long as the revision is chosen at merge time. #3382 (open, 025f16dd) moves only x2w-startup-shader-29/29cs to 30/30cs (at its head: d3d12_draw.inl:393-394, shader_compute_request.cpp:180/191, gfx2hlsl.py:12973/12983, tools/patch_manifest.py:24) and leaves x2w-startup-mesh-57-3 unchanged; this PR changes no revision string, and git merge-tree of the two heads is clean. Two identical 29 -> 30 edits would also merge without a conflict, and a cache filled between the two merges would then stay valid across the second change, so whichever PR merges second needs one more step (31/31cs here if #3382 lands first).
The slot-57 key does not depend on that order. At main 1cd07194, x2w-startup-mesh-57-3 seeds the request key and the variant that names req_<variant>.s57 and <variant>.mesh57-state (native_mesh57.inl:247-251, mesh57_pixel_entry.py:28-31); compile_dxil --rekey and shader_cache_rekey.py rekey the .m57/.ps57/.root requests but not those two files, so a bump of that key leaves existing archives and profiles under names that no longer match.
Nothing in src/ loads the .ms57.cso/.ps57.cso translation outputs (gfx2hlsl.py:13424: "No runtime path loads these names yet"), so translations cached under the unchanged mesh-57 key are not used at run time.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7253304853 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435#issuecomment-7253304853). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T08:44:48Z. --- Either order works, as long as the revision is chosen at merge time. #3382 (open, 025f16dd) moves only `x2w-startup-shader-29`/`29cs` to `30`/`30cs` (at its head: d3d12_draw.inl:393-394, shader_compute_request.cpp:180/191, gfx2hlsl.py:12973/12983, tools/patch_manifest.py:24) and leaves `x2w-startup-mesh-57-3` unchanged; this PR changes no revision string, and `git merge-tree` of the two heads is clean. Two identical 29 -> 30 edits would also merge without a conflict, and a cache filled between the two merges would then stay valid across the second change, so whichever PR merges second needs one more step (31/31cs here if #3382 lands first). The slot-57 key does not depend on that order. At main 1cd07194, `x2w-startup-mesh-57-3` seeds the request key and the variant that names `req_<variant>.s57` and `<variant>.mesh57-state` (native_mesh57.inl:247-251, mesh57_pixel_entry.py:28-31); `compile_dxil --rekey` and `shader_cache_rekey.py` rekey the `.m57`/`.ps57`/`.root` requests but not those two files, so a bump of that key leaves existing archives and profiles under names that no longer match. Nothing in `src/` loads the `.ms57.cso`/`.ps57.cso` translation outputs (gfx2hlsl.py:13424: "No runtime path loads these names yet"), so translations cached under the unchanged mesh-57 key are not used at run time.
JohnConnorNPC commented 2026-11-29 12:55:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T12:55:29Z.


Review of 710fb44d against main 77d1ba4d. Verdict: hold for Leyukaka's open change request (the cache revision bump). I found nothing else.

MUST

  1. The requested revision bump isn't on this head: git grep -n 'x2w-startup-shader-29' origin/main -- src tools still lists d3d12_draw.inl:420 and gfx2hlsl.py:12970, and this PR changes neither line. Leyukaka's comment above covers the ordering with #3382.

What I checked and ran:

  • Semantics. Strict compares match the ISA (SCC is set only when S0 is the chosen operand, so ties clear it) and the direct compute path. The change brings gfx2hlsl in line.
  • On the merge (git merge-tree --write-tree origin/main 710fb44d → tree a36bd61e): tests/startup_gfx2hlsl_compute_check.py rc=0 and tests/startup_gfx2hlsl_scalar_null_check.py rc=0.
  • Negative control. The same tree with main's tools/startup/gfx2hlsl.py makes both checks fail. The compute check fails at AssertionError: ('s_min_u32 s23, s7, 4', ... in check_scc_modelled, so the updated tests do pin the strict rule.
  • Default launcher path. With X2W_NATIVE_SHADERS_ONLY=1, set since #3449, gfx2hlsl compute manifests aren't loaded (load_compute_translation: if (native_shaders_only()) { ... return nullptr; }). So this fix reaches -Translate runs only, and the native path already uses strict compares.

Linux, Python 3.13, no WARP or GPU run.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7256160786 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435#issuecomment-7256160786). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-29T12:55:29Z. --- Review of `710fb44d` against main `77d1ba4d`. **Verdict: hold for Leyukaka's open change request (the cache revision bump).** I found nothing else. **MUST** 1. The requested revision bump isn't on this head: `git grep -n 'x2w-startup-shader-29' origin/main -- src tools` still lists `d3d12_draw.inl:420` and `gfx2hlsl.py:12970`, and this PR changes neither line. Leyukaka's comment above covers the ordering with #3382. What I checked and ran: - **Semantics.** Strict compares match the ISA (SCC is set only when S0 is the chosen operand, so ties clear it) and the direct compute path. The change brings gfx2hlsl in line. - **On the merge** (`git merge-tree --write-tree origin/main 710fb44d` → tree `a36bd61e`): `tests/startup_gfx2hlsl_compute_check.py` rc=0 and `tests/startup_gfx2hlsl_scalar_null_check.py` rc=0. - **Negative control.** The same tree with main's `tools/startup/gfx2hlsl.py` makes both checks fail. The compute check fails at `AssertionError: ('s_min_u32 s23, s7, 4', ...` in `check_scc_modelled`, so the updated tests do pin the strict rule. - **Default launcher path.** With `X2W_NATIVE_SHADERS_ONLY=1`, set since #3449, gfx2hlsl compute manifests aren't loaded (`load_compute_translation`: `if (native_shaders_only()) { ... return nullptr; }`). So this fix reaches `-Translate` runs only, and the native path already uses strict compares. Linux, Python 3.13, no WARP or GPU run. AI-assisted.
Leyukaka commented 2026-12-02 18:40:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T18:40:03Z.


Thank you for this fix, @nanyoudegege. To get it past the open revision request, I carried your commit unchanged into #3881 and added the cache revision bump on top; if you would rather continue here, say so and I will close mine.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7354963981 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3435#issuecomment-7354963981). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-02T18:40:03Z. --- Thank you for this fix, @nanyoudegege. To get it past the open revision request, I carried your commit unchanged into #3881 and added the cache revision bump on top; if you would rather continue here, say so and I will close mine.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3435:upstream-pr/3435'
git switch 'upstream-pr/3435'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3435'
git switch 'upstream-pr/3435'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3435'
git switch 'upstream-pr/3435'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3435'
git switch 'main'
git merge --squash 'upstream-pr/3435'
git switch 'main'
git merge --ff-only 'upstream-pr/3435'
git switch 'main'
git merge 'upstream-pr/3435'
git push origin 'main'
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!3435
No description provided.