mesh: keep scalars written in a skipped range undefined (Part of #1998) #2144

Merged
tedin7 merged 6 commits from upstream-pr/2152 into main 2026-11-25 06:56:24 +00:00
tedin7 commented 2026-11-25 01:47:15 +00:00 (Migrated from github.com)

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


Part of #1998

Item G: a scalar written inside a skipped range and live after it.

What this unblocks: mesh programs whose wave 1 skips a scalar write (for example the saved allocation word) and later reads that register in scalar ALU code now translate, instead of stopping on an unwritten register.

What changed

  • tools/mesh_entry_aot.py: an SGPR that no executed instruction has written on a wave is tracked as undefined. A range skipped by s_cbranch_execz leaves its scalar writes undone, so the register keeps a stale hardware value that nothing visible may depend on.
    • Scalar ALU results derived from it stay undefined (s_cselect follows only the selected arm).
    • A vector operation with no live lane never reads it.
    • A compare on it leaves SCC undefined, so a branch on it is still refused.
  • Refused by name: an undefined scalar reaching a live lane, a branch predicate, exec, vcc, m0, a descriptor address, or a never-written register read.
  • tools/mesh_dynamic_aot.py inherits the change through its wave class (signature only).
  • tests/mesh_entry_check.py: new modes skipped (CPU) and draw-skipped (WARP draw plus negative controls), registered as mesh_entry_skipped_scalar_cpu and mesh_entry_skipped_scalar_draw_<adapter> in CMakeLists.txt. Docs in docs/experiments.md.

Tests

  • CPU: wave 1 leaves s7 undefined and wave 0 has 0x1003; six refusal controls (live read, live v_cndmask mask, branch, exec, m0, never-written register). The new CPU check fails on the previous tools (KeyError on the unwritten register) and passes now.
  • Draw: the program adds the value to the exported depth (0.5 + 0.25). The export trace is compared to the expected depth; an off-by-one depth word and the program without the add must both report a trace mismatch.

Verification:

Linux, all rc=0:

python3 -B tests/mesh_entry_check.py skipped
python3 -B tests/mesh_dynamic_aot_check.py
python3 -B tests/mesh_dynamic_geometry_check.py
python3 -B tests/mesh_amplification_refusal_check.py
python3 -B tests/docs_links_check.py
python3 -B tests/bidi_controls_check.py
python3 -B tests/<mesh_entry|mesh_dynamic_geometry|mesh_indexed|mesh_lit|mesh_multi|mesh_shadow|mesh_textured>_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so

Windows Server 2025 (Build 26100, MSVC 14.44.35207, D3D12 WARP) at 95677d11: ctest --preset dev and --preset release -R "^(mesh_entry_skipped_scalar_|mesh_entry_draw_|mesh_dynamic_aot_)" both 8/8 passed, including mesh_entry_skipped_scalar_draw_warp and mesh_entry_skipped_scalar_cpu.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6595248155 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T01:47:15Z. --- Part of #1998 Item G: a scalar written inside a skipped range and live after it. What this unblocks: mesh programs whose wave 1 skips a scalar write (for example the saved allocation word) and later reads that register in scalar ALU code now translate, instead of stopping on an unwritten register. ## What changed - `tools/mesh_entry_aot.py`: an SGPR that no executed instruction has written on a wave is tracked as undefined. A range skipped by `s_cbranch_execz` leaves its scalar writes undone, so the register keeps a stale hardware value that nothing visible may depend on. - Scalar ALU results derived from it stay undefined (`s_cselect` follows only the selected arm). - A vector operation with no live lane never reads it. - A compare on it leaves SCC undefined, so a branch on it is still refused. - Refused by name: an undefined scalar reaching a live lane, a branch predicate, `exec`, `vcc`, `m0`, a descriptor address, or a never-written register read. - `tools/mesh_dynamic_aot.py` inherits the change through its wave class (signature only). - `tests/mesh_entry_check.py`: new modes `skipped` (CPU) and `draw-skipped` (WARP draw plus negative controls), registered as `mesh_entry_skipped_scalar_cpu` and `mesh_entry_skipped_scalar_draw_<adapter>` in `CMakeLists.txt`. Docs in `docs/experiments.md`. ## Tests - CPU: wave 1 leaves s7 undefined and wave 0 has 0x1003; six refusal controls (live read, live `v_cndmask` mask, branch, `exec`, `m0`, never-written register). The new CPU check fails on the previous tools (KeyError on the unwritten register) and passes now. - Draw: the program adds the value to the exported depth (0.5 + 0.25). The export trace is compared to the expected depth; an off-by-one depth word and the program without the add must both report a trace mismatch. Verification: Linux, all rc=0: ```text python3 -B tests/mesh_entry_check.py skipped python3 -B tests/mesh_dynamic_aot_check.py python3 -B tests/mesh_dynamic_geometry_check.py python3 -B tests/mesh_amplification_refusal_check.py python3 -B tests/docs_links_check.py python3 -B tests/bidi_controls_check.py python3 -B tests/<mesh_entry|mesh_dynamic_geometry|mesh_indexed|mesh_lit|mesh_multi|mesh_shadow|mesh_textured>_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so ``` Windows Server 2025 (Build 26100, MSVC 14.44.35207, D3D12 WARP) at 95677d11: `ctest --preset dev` and `--preset release -R "^(mesh_entry_skipped_scalar_|mesh_entry_draw_|mesh_dynamic_aot_)"` both 8/8 passed, including `mesh_entry_skipped_scalar_draw_warp` and `mesh_entry_skipped_scalar_cpu`. AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-25 03:01:08 +00:00 (Migrated from github.com)

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

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e45866724

ℹ️ 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:6050963552 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#pullrequestreview-6050963552). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T02:38:14Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `4e45866724` <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-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:28:30Z.


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:38:17.262072Z 4e45866 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:7150770063 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#issuecomment-7150770063). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T02:28:30Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"4e458667240f0ac2097089a93965db97d0942b65","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-25T02:38:17.262072Z">2026-11-25T02:38:17.262072Z</relative-time> | `4e45866` | 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>
chatgpt-codex-connector[bot commented 2026-11-25 03:01:26 +00:00 (Migrated from github.com)

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

Code review location: tools/mesh_entry_aot.py; line 235

@@ -197,7 +224,15 @@ def scalar_op(self, op, args):
             self.put(d, old, True)
             self.scc = self.exec != 0
             return
-        vals = [self.scalar(t) for t in src]
+        vals = [self.scalar(t, True) for t in src]
+        if op in ("s_cselect_b32", "s_cselect_b64") and self.scc is not None:
+            # The arm that is not selected is never read.
+            vals = [vals[0] if self.scc else vals[-1]] * 2
+        if any(v is UNDEF for v in vals):
+            self.put(d, UNDEF, op.endswith("_b64"))
+            if not op.startswith(("s_mov", "s_cselect", "s_mul")):
+                self.scc = None
+            return

P1 Badge Reject unsupported scalar opcodes before propagating UNDEF

When an operand is UNDEF, this return bypasses the unsupported-opcode check below. This accepts instructions with implicit effects, such as s_xor_saveexec_b64 s[34:35], s[32:33], as if they only wrote the named SGPR destination. In the triangle fixture, skipping the initialization of s33 while setting s32 to 1 makes lower emit exactly the original HLSL and leave EXEC unchanged, even though the XOR necessarily clears lane 0. The explicit-destination guard in put cannot catch this implicit EXEC write. Validate the supported scalar opcode before propagating UNDEF so unsupported control-state changes are refused rather than silently mistranslated.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689627086 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#discussion_r4689627086). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T02:38:14Z. **Code review location:** `tools/mesh_entry_aot.py`; line 235 ~~~~diff @@ -197,7 +224,15 @@ def scalar_op(self, op, args): self.put(d, old, True) self.scc = self.exec != 0 return - vals = [self.scalar(t) for t in src] + vals = [self.scalar(t, True) for t in src] + if op in ("s_cselect_b32", "s_cselect_b64") and self.scc is not None: + # The arm that is not selected is never read. + vals = [vals[0] if self.scc else vals[-1]] * 2 + if any(v is UNDEF for v in vals): + self.put(d, UNDEF, op.endswith("_b64")) + if not op.startswith(("s_mov", "s_cselect", "s_mul")): + self.scc = None + return ~~~~ --- **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Reject unsupported scalar opcodes before propagating UNDEF** When an operand is `UNDEF`, this return bypasses the unsupported-opcode check below. This accepts instructions with implicit effects, such as `s_xor_saveexec_b64 s[34:35], s[32:33]`, as if they only wrote the named SGPR destination. In the triangle fixture, skipping the initialization of s33 while setting s32 to 1 makes `lower` emit exactly the original HLSL and leave EXEC unchanged, even though the XOR necessarily clears lane 0. The explicit-destination guard in `put` cannot catch this implicit EXEC write. Validate the supported scalar opcode before propagating UNDEF so unsupported control-state changes are refused rather than silently mistranslated. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot commented 2026-11-25 03:01:26 +00:00 (Migrated from github.com)

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

Code review location: tools/mesh_entry_aot.py; line 210

@@ -180,7 +204,10 @@ def scalar_op(self, op, args):
             self.load(op, args)
             return
         if op.startswith("s_cmp_"):
-            a, b = map(self.scalar, args)
+            a, b = (self.scalar(t, True) for t in args)
+            if a is UNDEF or b is UNDEF:
+                self.scc = None
+                return

P2 Badge Make the runtime equality override accept undefined operands

For dynamic mesh translation, this new comparison handling is bypassed: RuntimeWave.scalar_op still evaluates s_cmp_eq_u32 operands using map(super().scalar, args) with allow_undef=False. Writing s32 inside the existing wave-0-only allocation range, then adding s_add_u32 s33, s32, 1 and a dead s_cmp_eq_u32 s33, 0 before exit, makes dynamic translation fail on wave 1. The static translator accepts that program, and changing the comparison to s_cmp_gt_u32 also makes the dynamic translator accept it. Update the runtime equality override to perform undefined-aware reads so an unused comparison leaves SCC undefined instead of rejecting the shader.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689627096 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#discussion_r4689627096). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T02:38:14Z. **Code review location:** `tools/mesh_entry_aot.py`; line 210 ~~~~diff @@ -180,7 +204,10 @@ def scalar_op(self, op, args): self.load(op, args) return if op.startswith("s_cmp_"): - a, b = map(self.scalar, args) + a, b = (self.scalar(t, True) for t in args) + if a is UNDEF or b is UNDEF: + self.scc = None + return ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Make the runtime equality override accept undefined operands** For dynamic mesh translation, this new comparison handling is bypassed: `RuntimeWave.scalar_op` still evaluates `s_cmp_eq_u32` operands using `map(super().scalar, args)` with `allow_undef=False`. Writing s32 inside the existing wave-0-only allocation range, then adding `s_add_u32 s33, s32, 1` and a dead `s_cmp_eq_u32 s33, 0` before exit, makes dynamic translation fail on wave 1. The static translator accepts that program, and changing the comparison to `s_cmp_gt_u32` also makes the dynamic translator accept it. Update the runtime equality override to perform undefined-aware reads so an unused comparison leaves SCC undefined instead of rejecting the shader. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot commented 2026-11-25 03:01:26 +00:00 (Migrated from github.com)

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

Code review location: tools/mesh_dynamic_aot.py; line 57

@@ -53,8 +53,8 @@ def __getitem__(self, key):
 
 
 class RuntimeWave(Wave):
-    def scalar(self, token):
-        value = super().scalar(token)
+    def scalar(self, token, allow_undef=False):
+        value = super().scalar(token, allow_undef)

P2 Badge Skip runtime conditional-mask reads when EXEC is empty

For the dynamic mesh path, forwarding this parameter does not give v_cndmask the new no-live-lane behavior: RuntimeWave.vector_op calls self.scalar(predicate) before checking for live lanes. If a skipped write leaves the mask undefined on a wave whose EXEC is zero, translation still raises UNDEFINED_SCALAR, although no lane reads that mask and the base Wave.vector_op accepts the same program. This is reproducible by appending an EXEC clear, a skipped mask initialization and a masked-off v_cndmask_b32_e64 to the existing runtime fixture. Check for an empty execution mask before resolving the predicate.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689627106 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#discussion_r4689627106). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T02:38:14Z. **Code review location:** `tools/mesh_dynamic_aot.py`; line 57 ~~~~diff @@ -53,8 +53,8 @@ def __getitem__(self, key): class RuntimeWave(Wave): - def scalar(self, token): - value = super().scalar(token) + def scalar(self, token, allow_undef=False): + value = super().scalar(token, allow_undef) ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Skip runtime conditional-mask reads when EXEC is empty** For the dynamic mesh path, forwarding this parameter does not give `v_cndmask` the new no-live-lane behavior: `RuntimeWave.vector_op` calls `self.scalar(predicate)` before checking for live lanes. If a skipped write leaves the mask undefined on a wave whose EXEC is zero, translation still raises `UNDEFINED_SCALAR`, although no lane reads that mask and the base `Wave.vector_op` accepts the same program. This is reproducible by appending an EXEC clear, a skipped mask initialization and a masked-off `v_cndmask_b32_e64` to the existing runtime fixture. Check for an empty execution mask before resolving the predicate. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
tedin7 commented 2026-11-25 04:03:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:14:01Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051313423 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#pullrequestreview-6051313423). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:14:01Z. **Review:** COMMENTED --- _No description provided._
tedin7 commented 2026-11-25 04:03:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:14:03Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051313642 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#pullrequestreview-6051313642). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:14:03Z. **Review:** COMMENTED --- _No description provided._
tedin7 commented 2026-11-25 04:03:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:14:06Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051313891 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#pullrequestreview-6051313891). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:14:06Z. **Review:** COMMENTED --- _No description provided._
tedin7 commented 2026-11-25 04:04:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:14:01Z.

Code review location: tools/mesh_entry_aot.py; line 235

@@ -197,7 +224,15 @@ def scalar_op(self, op, args):
             self.put(d, old, True)
             self.scc = self.exec != 0
             return
-        vals = [self.scalar(t) for t in src]
+        vals = [self.scalar(t, True) for t in src]
+        if op in ("s_cselect_b32", "s_cselect_b64") and self.scc is not None:
+            # The arm that is not selected is never read.
+            vals = [vals[0] if self.scc else vals[-1]] * 2
+        if any(v is UNDEF for v in vals):
+            self.put(d, UNDEF, op.endswith("_b64"))
+            if not op.startswith(("s_mov", "s_cselect", "s_mul")):
+                self.scc = None
+            return

Fixed in fcb84186: unsupported scalar opcodes are now refused before an undefined operand is propagated (regression in mesh_entry_check skipped; also pso_readiness_check updated).

Verified locally: mesh_entry_check skipped, mesh_dynamic_aot_check, mesh_dynamic_geometry_check, docs_links_check on Linux; x2w_pipe win2025 2152 PASS dev + release (28/28 each). New tests fail before the fix.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689922024 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#discussion_r4689922024). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:14:01Z. **Code review location:** `tools/mesh_entry_aot.py`; line 235 ~~~~diff @@ -197,7 +224,15 @@ def scalar_op(self, op, args): self.put(d, old, True) self.scc = self.exec != 0 return - vals = [self.scalar(t) for t in src] + vals = [self.scalar(t, True) for t in src] + if op in ("s_cselect_b32", "s_cselect_b64") and self.scc is not None: + # The arm that is not selected is never read. + vals = [vals[0] if self.scc else vals[-1]] * 2 + if any(v is UNDEF for v in vals): + self.put(d, UNDEF, op.endswith("_b64")) + if not op.startswith(("s_mov", "s_cselect", "s_mul")): + self.scc = None + return ~~~~ --- Fixed in fcb84186: unsupported scalar opcodes are now refused before an undefined operand is propagated (regression in mesh_entry_check skipped; also pso_readiness_check updated). Verified locally: mesh_entry_check skipped, mesh_dynamic_aot_check, mesh_dynamic_geometry_check, docs_links_check on Linux; x2w_pipe win2025 2152 PASS dev + release (28/28 each). New tests fail before the fix. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 04:04:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:14:03Z.

Code review location: tools/mesh_entry_aot.py; line 210

@@ -180,7 +204,10 @@ def scalar_op(self, op, args):
             self.load(op, args)
             return
         if op.startswith("s_cmp_"):
-            a, b = map(self.scalar, args)
+            a, b = (self.scalar(t, True) for t in args)
+            if a is UNDEF or b is UNDEF:
+                self.scc = None
+                return

Fixed in fcb84186: the runtime equality override reads operands undefined-aware, so a dead compare leaves SCC undefined (regression in mesh_dynamic_aot_check).

Verified locally: mesh_entry_check skipped, mesh_dynamic_aot_check, mesh_dynamic_geometry_check, docs_links_check on Linux; x2w_pipe win2025 2152 PASS dev + release (28/28 each). New tests fail before the fix.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689922207 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#discussion_r4689922207). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:14:03Z. **Code review location:** `tools/mesh_entry_aot.py`; line 210 ~~~~diff @@ -180,7 +204,10 @@ def scalar_op(self, op, args): self.load(op, args) return if op.startswith("s_cmp_"): - a, b = map(self.scalar, args) + a, b = (self.scalar(t, True) for t in args) + if a is UNDEF or b is UNDEF: + self.scc = None + return ~~~~ --- Fixed in fcb84186: the runtime equality override reads operands undefined-aware, so a dead compare leaves SCC undefined (regression in mesh_dynamic_aot_check). Verified locally: mesh_entry_check skipped, mesh_dynamic_aot_check, mesh_dynamic_geometry_check, docs_links_check on Linux; x2w_pipe win2025 2152 PASS dev + release (28/28 each). New tests fail before the fix. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 04:04:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:14:06Z.

Code review location: tools/mesh_dynamic_aot.py; line 57

@@ -53,8 +53,8 @@ def __getitem__(self, key):
 
 
 class RuntimeWave(Wave):
-    def scalar(self, token):
-        value = super().scalar(token)
+    def scalar(self, token, allow_undef=False):
+        value = super().scalar(token, allow_undef)

Fixed in fcb84186: the runtime conditional-mask read is skipped when EXEC is empty (regression in mesh_dynamic_aot_check).

Verified locally: mesh_entry_check skipped, mesh_dynamic_aot_check, mesh_dynamic_geometry_check, docs_links_check on Linux; x2w_pipe win2025 2152 PASS dev + release (28/28 each). New tests fail before the fix.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4689922407 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#discussion_r4689922407). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:14:06Z. **Code review location:** `tools/mesh_dynamic_aot.py`; line 57 ~~~~diff @@ -53,8 +53,8 @@ def __getitem__(self, key): class RuntimeWave(Wave): - def scalar(self, token): - value = super().scalar(token) + def scalar(self, token, allow_undef=False): + value = super().scalar(token, allow_undef) ~~~~ --- Fixed in fcb84186: the runtime conditional-mask read is skipped when EXEC is empty (regression in mesh_dynamic_aot_check). Verified locally: mesh_entry_check skipped, mesh_dynamic_aot_check, mesh_dynamic_geometry_check, docs_links_check on Linux; x2w_pipe win2025 2152 PASS dev + release (28/28 each). New tests fail before the fix. AI-assisted; commands listed were executed locally.
legacy-code-archaeologist commented 2026-11-25 06:01:40 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T05:58:16Z.


Ran head 4b89c7e6. Windows 11 build 26100, debug layer unavailable. Adapters: WARP 10.0.26100.8972, NVIDIA Quadro M1000M 32.0.15.7371, Intel HD Graphics 530 31.0.101.2111, the hardware ones selected with XBOX2WINDOWS_ADAPTER.

Test WARP Quadro M1000M Intel HD 530
mesh_entry_skipped_scalar_cpu pass n/a n/a
mesh_entry_skipped_scalar_draw_{warp,hardware} pass skip (77), mesh_shader_tier=unsupported skip (77), mesh_shader_tier=unsupported

Neither older GPU has mesh shaders, so the hardware rows are capability skips, not results. Only WARP drew.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7154311938 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2152#issuecomment-7154311938). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-25T05:58:16Z. --- Ran head `4b89c7e6`. Windows 11 build 26100, debug layer unavailable. Adapters: WARP 10.0.26100.8972, NVIDIA Quadro M1000M 32.0.15.7371, Intel HD Graphics 530 31.0.101.2111, the hardware ones selected with `XBOX2WINDOWS_ADAPTER`. | Test | WARP | Quadro M1000M | Intel HD 530 | |---|---|---|---| | `mesh_entry_skipped_scalar_cpu` | pass | n/a | n/a | | `mesh_entry_skipped_scalar_draw_{warp,hardware}` | pass | skip (77), `mesh_shader_tier=unsupported` | skip (77), `mesh_shader_tier=unsupported` | Neither older GPU has mesh shaders, so the hardware rows are capability skips, not results. Only WARP drew. _AI-assisted._
upstream-sync closed this pull request 2026-11-25 07:00:56 +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!2144
No description provided.