tracking: fixed mesh pipelines (device slot 57) requested at run time, 0 of 298 translated; checklist of claimable items #2405

Open
opened 2026-11-25 15:47:58 +00:00 by NiiRoZz · 78 comments
NiiRoZz commented 2026-11-25 15:47:58 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T15:47:58Z.


Refs #1760, #1998, #1759, #2253.

Summary

A run of the startup runtime on a console title requested 298 distinct fixed mesh pipelines through the slot 57 request path added in #2253. None is translated: inspect_mesh57_request in tools/startup/gfx2hlsl.py validates a request and then always ends with slot 57 mesh code emission is unavailable. In the same 600 s run the shim refused 2,708 indirect DispatchMesh commands. This is the geometry that is missing from the picture.

This issue lists what a slot 57 mesh translation has to handle, measured on that set, as separate items one person can take. Counts only; the programs, the logs and the title stay local.

How the counts were taken

  • Run: main at 910a2653, Release, Windows 11 build 26300, NVIDIA GeForce RTX 5090, debug layer off, 600 s.
  • Decode: decode(strip_header(...)) from tools/startup/gfx2hlsl.py at 7092683a over the 298 .m57 / .ps57 request files (the slot 57 functions are unchanged between the two revisions).
  • The reasons the watcher stores today (276 group-memory write, 18 pixel stage, 4 v_interp_p2_f16) are only the order of the pre-checks in inspect_mesh57_request. They are not first refusals of a lowerer: removing any of them still translates 0 of 298.

Shape of the 298 mesh programs

Property Programs
wave64 (64-bit exec operations) 298
exactly 3 ds_write_b32, 3 ds_read_b32, 5 s_barrier, one s_sendmsg (GS_ALLOC_REQ) 298
v_readfirstlane_b32, v_mbcnt_lo/hi_u32_b32, v_cmpx_* 298
pos0 and the primitive export 298
at least one parameter export (highest seen: param12) 210
buffer_load_format_x 250
backward branch (loop) 23
v_writelane_b32 / v_readlane_b32 16
second position export pos1 10
flat-scratch prologue (s_setreg_imm32_b32) 0

Size: 223 to 7,296 instructions, median 536. 115 distinct opcode sets.

Paired pixel stage: 202 decode and classify as a pixel stage, 74 requests have no pixel stage (depth only), 18 export only to the null target and are refused by the role check, 4 stop in decode at v_interp_p2_f16 with op_sel.

Items (pick one, say so in a comment)

Translator

# Item Programs Notes
T1 Mesh code emission for a slot 57 request: first slice for the one shared group-memory shape above, everything else refused 298 Source-built fixture with that shape, ms_6_5 output, read-back against a CPU model, negative controls. Decide first whether the engine is tools/mesh_dynamic_aot.py (#1913, #2241) or new code in gfx2hlsl.py.
T2 First-refusal profile of raw slot 57 requests through the bounded lowerers 298 mesh_entry_aot / mesh_dynamic_aot take a container with PSV0 limits; a slot 57 request is raw code plus a root signature. Needs an adapter, then counts by #1998 row.
T3 Formatted buffer loads in the mesh stage 250 Needs the view format from the descriptor at run time, as #2138 did for draws.
T4 Parameter exports up to param12 and their pairing with the pixel stage inputs 210 The pixel path of gfx2hlsl.py exists; the mesh linkage does not.
T5 Depth-only pairs: no pixel stage (74) and a pixel stage that exports only to the null target (18) 92 The 18 are refused today by the role check in inspect_mesh57_request.
T6 Loops 23 #1998 item I.
T7 v_writelane_b32 / v_readlane_b32 16 #1998 item B covers the spill idiom in the bounded lowerers (#2127).
T8 pos1 (clip and cull distances) 10 #1998 item F, taken by roansystemlabs. Not claimable here.
T9 v_interp_p2_f16 with op_sel in the paired pixel stage 4

Runtime

# Item Notes
R1 Load a translated slot 57 pair, create the desktop mesh pipeline and forward the indirect DispatchMesh #2253 leaves these commands unforwarded "while mesh code emission and resource binding are pending". Only mesh86_cache.inl loads a .ms.cso today. Please ask on #1759 before taking.
R2 Resource binding for translated indirect draws In progress in #2232, #2236, #2262, #2259. Not claimable here.

What a contribution needs

Same as #1998: a source-built or hand-assembled program with the construct, read-back with a negative control, the LLVM / Mesa reference for each instruction lowered, and a precise refusal for what is not covered. No bytes from retail software.

Not measured

  • Which #1998 row first stops each program in the bounded lowerers (item T2).
  • Whether the three group-memory writes carry the same values in all 298 programs; only the instruction counts were compared.
  • Anything after the 600 s mark of the run.

Checklist

  • The task can be reproduced with public or source-built inputs.
  • I did not include game files, dumps, distribution links or credentials.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6608293152 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T15:47:58Z. --- Refs #1760, #1998, #1759, #2253. ### Summary A run of the startup runtime on a console title requested 298 distinct fixed mesh pipelines through the slot 57 request path added in #2253. None is translated: `inspect_mesh57_request` in `tools/startup/gfx2hlsl.py` validates a request and then always ends with `slot 57 mesh code emission is unavailable`. In the same 600 s run the shim refused 2,708 indirect `DispatchMesh` commands. This is the geometry that is missing from the picture. This issue lists what a slot 57 mesh translation has to handle, measured on that set, as separate items one person can take. Counts only; the programs, the logs and the title stay local. ### How the counts were taken - Run: `main` at `910a2653`, Release, Windows 11 build 26300, NVIDIA GeForce RTX 5090, debug layer off, 600 s. - Decode: `decode(strip_header(...))` from `tools/startup/gfx2hlsl.py` at `7092683a` over the 298 `.m57` / `.ps57` request files (the slot 57 functions are unchanged between the two revisions). - The reasons the watcher stores today (276 group-memory write, 18 pixel stage, 4 `v_interp_p2_f16`) are only the order of the pre-checks in `inspect_mesh57_request`. They are not first refusals of a lowerer: removing any of them still translates 0 of 298. ### Shape of the 298 mesh programs | Property | Programs | |---|---:| | wave64 (64-bit exec operations) | 298 | | exactly 3 `ds_write_b32`, 3 `ds_read_b32`, 5 `s_barrier`, one `s_sendmsg` (GS_ALLOC_REQ) | 298 | | `v_readfirstlane_b32`, `v_mbcnt_lo/hi_u32_b32`, `v_cmpx_*` | 298 | | `pos0` and the primitive export | 298 | | at least one parameter export (highest seen: `param12`) | 210 | | `buffer_load_format_x` | 250 | | backward branch (loop) | 23 | | `v_writelane_b32` / `v_readlane_b32` | 16 | | second position export `pos1` | 10 | | flat-scratch prologue (`s_setreg_imm32_b32`) | 0 | Size: 223 to 7,296 instructions, median 536. 115 distinct opcode sets. Paired pixel stage: 202 decode and classify as a pixel stage, 74 requests have no pixel stage (depth only), 18 export only to the null target and are refused by the role check, 4 stop in decode at `v_interp_p2_f16` with `op_sel`. ### Items (pick one, say so in a comment) **Translator** | # | Item | Programs | Notes | |---|---|---:|---| | T1 | Mesh code emission for a slot 57 request: first slice for the one shared group-memory shape above, everything else refused | 298 | Source-built fixture with that shape, ms_6_5 output, read-back against a CPU model, negative controls. Decide first whether the engine is `tools/mesh_dynamic_aot.py` (#1913, #2241) or new code in `gfx2hlsl.py`. | | T2 | First-refusal profile of raw slot 57 requests through the bounded lowerers | 298 | `mesh_entry_aot` / `mesh_dynamic_aot` take a container with PSV0 limits; a slot 57 request is raw code plus a root signature. Needs an adapter, then counts by #1998 row. | | T3 | Formatted buffer loads in the mesh stage | 250 | Needs the view format from the descriptor at run time, as #2138 did for draws. | | T4 | Parameter exports up to `param12` and their pairing with the pixel stage inputs | 210 | The pixel path of `gfx2hlsl.py` exists; the mesh linkage does not. | | T5 | Depth-only pairs: no pixel stage (74) and a pixel stage that exports only to the null target (18) | 92 | The 18 are refused today by the role check in `inspect_mesh57_request`. | | T6 | Loops | 23 | #1998 item I. | | T7 | `v_writelane_b32` / `v_readlane_b32` | 16 | #1998 item B covers the spill idiom in the bounded lowerers (#2127). | | T8 | `pos1` (clip and cull distances) | 10 | #1998 item F, taken by roansystemlabs. Not claimable here. | | T9 | `v_interp_p2_f16` with `op_sel` in the paired pixel stage | 4 | | **Runtime** | # | Item | Notes | |---|---|---| | R1 | Load a translated slot 57 pair, create the desktop mesh pipeline and forward the indirect `DispatchMesh` | #2253 leaves these commands unforwarded "while mesh code emission and resource binding are pending". Only `mesh86_cache.inl` loads a `.ms.cso` today. Please ask on #1759 before taking. | | R2 | Resource binding for translated indirect draws | In progress in #2232, #2236, #2262, #2259. Not claimable here. | ### What a contribution needs Same as #1998: a source-built or hand-assembled program with the construct, read-back with a negative control, the LLVM / Mesa reference for each instruction lowered, and a precise refusal for what is not covered. No bytes from retail software. ### Not measured - Which #1998 row first stops each program in the bounded lowerers (item T2). - Whether the three group-memory writes carry the same values in all 298 programs; only the instruction counts were compared. - Anything after the 600 s mark of the run. ### Checklist - [x] The task can be reproduced with public or source-built inputs. - [x] I did not include game files, dumps, distribution links or credentials.
NiiRoZz commented 2026-11-25 16:05:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T15:48:39Z.


I'll take T2 and then the first slice of T1.

Plan:

  • T2: an adapter that gives the bounded lowerers a raw slot 57 request (code plus root signature, limits supplied explicitly instead of PSV0), then first-refusal counts for the 298 programs by #1998 row. Counts only.
  • T1, first slice: check whether the three group-memory writes and reads have the same role in all 298 programs, then one source-built fixture with that shape, lowered to an ms_6_5 shader, with read-back against a CPU model on WARP and one hardware adapter and negative controls. Everything outside the shape stays refused.

I will post the T2 counts here before opening a PR for T1. The other rows are free.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167333497 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7167333497). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T15:48:39Z. --- I'll take T2 and then the first slice of T1. Plan: - T2: an adapter that gives the bounded lowerers a raw slot 57 request (code plus root signature, limits supplied explicitly instead of PSV0), then first-refusal counts for the 298 programs by #1998 row. Counts only. - T1, first slice: check whether the three group-memory writes and reads have the same role in all 298 programs, then one source-built fixture with that shape, lowered to an ms_6_5 shader, with read-back against a CPU model on WARP and one hardware adapter and negative controls. Everything outside the shape stays refused. I will post the T2 counts here before opening a PR for T1. The other rows are free.
NiiRoZz commented 2026-11-25 17:01:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T16:05:42Z.


I'll also take T5 (the 18 pixel stages that export only to the null target) and T9 (v_interp_p2_f16 with op_sel), as two separate PRs.

  • T5: accept a pixel stage whose only export is the null target as a depth-only pixel stage in the slot 57 role check, with a source-built fixture and a control that a stage with any other non-colour export stays refused.
  • T9: lower the op_sel form that writes the high half of the destination (the Mesa ACO v_interp_p2_hi_f16 reading already noted in check_encoding), with a fixture against a CPU reference; other op_sel bits stay refused.

Neither translates a mesh pipeline on its own; they remove pre-checks ahead of T1.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167588552 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7167588552). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T16:05:42Z. --- I'll also take T5 (the 18 pixel stages that export only to the null target) and T9 (`v_interp_p2_f16` with `op_sel`), as two separate PRs. - T5: accept a pixel stage whose only export is the null target as a depth-only pixel stage in the slot 57 role check, with a source-built fixture and a control that a stage with any other non-colour export stays refused. - T9: lower the `op_sel` form that writes the high half of the destination (the Mesa ACO `v_interp_p2_hi_f16` reading already noted in `check_encoding`), with a fixture against a CPU reference; other `op_sel` bits stay refused. Neither translates a mesh pipeline on its own; they remove pre-checks ahead of T1.
R0D4X commented 2026-11-25 17:01:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-11-25T16:10:36Z.


looking into this

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167660137 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7167660137). Originally posted by [R0D4X](https://github.com/R0D4X) on 2026-11-25T16:10:36Z. --- looking into this
NiiRoZz commented 2026-11-25 17:01:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T16:12:40Z.


T2 result, at 7092683a. Counts only.

Adapter: request header stripped, each instruction printed by LLVM 15 llvm-mc (gfx1013, wave64), branch offsets spelled signed with mesh_loop_census.signed_branches, then mesh_entry_aot.lower(decoded, [0]*128, (256, 256)) and mesh_dynamic_aot.enumerate_variants(decoded, 128, (256, 256)). The limits replace the PSV0 bounds and are the largest the lowerers accept. The adapter is a local script and is not in a PR.

298 of 298 programs disassemble. 23 hold at least one encoding LLVM 15 does not print; none of those is reached as a first refusal. Both lowerers give the same first refusal for every program.

Reading First refusal Programs
As decoded Unsupported scalar instruction s_waitcnt_depctr 298
What-if: s_waitcnt_depctr as s_nop LDS store not waited before the barrier 298
What-if: s_waitcnt_depctr as s_waitcnt lgkmcnt(0) s_bitcmp0_b32 unsupported 129
s_clause unsupported 120
Unknown descriptor table or offset 31
parse crash: int() on the operand src_scc (s_cmp_lg_u32, s_cmp_eq_u32) 15
Scalar pair requires concrete words (s_mov_b64) 3

So no first refusal is a #1998 row A to I, and 0 of 298 lower. I assigned rows by reading these messages against the row definitions; s_bitcmp0_b32 and the s_mov_b64 pair refusal are unsupported forms that may sit in front of a row A or C construct, which I did not examine. With s_clause also read as a no-op the split becomes 129 s_bitcmp0_b32, 87 a read of an entry SGPR the fixed profile (s3, s17, s20, s21) does not define, 64 unknown descriptor table or offset, 15 the src_scc crash, 3 concrete words. 78 of the 87 print the row G message, but the register is an entry argument, not an undefined scalar, so I did not count them as G.

The what-if rows are assumptions about the model, not lowerings; in particular reading s_waitcnt_depctr as the wait for the LDS store is unverified (compute_store_aot takes it as a no-op, pixel_aot refuses it as a wait). Not measured: anything after the first refusal, more than two waves, any entry state other than the lowerers' fixed profile, the s_sendmsg spelling (never reached), and no lowerer output was compiled or run.

The src_scc case surfaces as a ValueError from int() rather than a stated refusal. The open #1821 handles that operand in gfx2hlsl.py, not in these two lowerers.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167689491 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7167689491). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T16:12:40Z. --- T2 result, at 7092683a. Counts only. Adapter: request header stripped, each instruction printed by LLVM 15 `llvm-mc` (gfx1013, wave64), branch offsets spelled signed with `mesh_loop_census.signed_branches`, then `mesh_entry_aot.lower(decoded, [0]*128, (256, 256))` and `mesh_dynamic_aot.enumerate_variants(decoded, 128, (256, 256))`. The limits replace the PSV0 bounds and are the largest the lowerers accept. The adapter is a local script and is not in a PR. 298 of 298 programs disassemble. 23 hold at least one encoding LLVM 15 does not print; none of those is reached as a first refusal. Both lowerers give the same first refusal for every program. | Reading | First refusal | Programs | |---|---|---:| | As decoded | `Unsupported scalar instruction s_waitcnt_depctr` | 298 | | What-if: `s_waitcnt_depctr` as `s_nop` | `LDS store not waited before the barrier` | 298 | | What-if: `s_waitcnt_depctr` as `s_waitcnt lgkmcnt(0)` | `s_bitcmp0_b32` unsupported | 129 | | | `s_clause` unsupported | 120 | | | `Unknown descriptor table or offset` | 31 | | | parse crash: `int()` on the operand `src_scc` (`s_cmp_lg_u32`, `s_cmp_eq_u32`) | 15 | | | `Scalar pair requires concrete words` (`s_mov_b64`) | 3 | So no first refusal is a #1998 row A to I, and 0 of 298 lower. I assigned rows by reading these messages against the row definitions; `s_bitcmp0_b32` and the `s_mov_b64` pair refusal are unsupported forms that may sit in front of a row A or C construct, which I did not examine. With `s_clause` also read as a no-op the split becomes 129 `s_bitcmp0_b32`, 87 a read of an entry SGPR the fixed profile (s3, s17, s20, s21) does not define, 64 unknown descriptor table or offset, 15 the `src_scc` crash, 3 concrete words. 78 of the 87 print the row G message, but the register is an entry argument, not an undefined scalar, so I did not count them as G. The what-if rows are assumptions about the model, not lowerings; in particular reading `s_waitcnt_depctr` as the wait for the LDS store is unverified (`compute_store_aot` takes it as a no-op, `pixel_aot` refuses it as a wait). Not measured: anything after the first refusal, more than two waves, any entry state other than the lowerers' fixed profile, the `s_sendmsg` spelling (never reached), and no lowerer output was compiled or run. The `src_scc` case surfaces as a `ValueError` from `int()` rather than a stated refusal. The open #1821 handles that operand in `gfx2hlsl.py`, not in these two lowerers.
R0D4X commented 2026-11-25 17:01:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-11-25T16:27:33Z.


Claiming item T4 (parameter exports up to param12 and pairing with the pixel stage inputs); opened PR #2427 (https://github.com/R0Y00/Xbox2Windows/pull/2427) with source-built static/dynamic ms_6_5 + MeshPixelStage ps_6_0 fixtures verified on WARP and RTX 5080.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7168014510 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7168014510). Originally posted by [R0D4X](https://github.com/R0D4X) on 2026-11-25T16:27:33Z. --- Claiming item **T4** (parameter exports up to `param12` and pairing with the pixel stage inputs); opened PR #2427 (https://github.com/R0Y00/Xbox2Windows/pull/2427) with source-built static/dynamic `ms_6_5` + `MeshPixelStage` `ps_6_0` fixtures verified on WARP and RTX 5080.
R0D4X commented 2026-11-25 17:01:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-11-25T16:51:43Z.


Claiming the s_bitcmp0_b32 / s_bitcmp1_b32 (and s_bitcmp0_b64 / s_bitcmp1_b64) scalar bit-compare family in the bounded mesh lowerers (tools/mesh_entry_aot.py and tools/mesh_dynamic_aot.py) surfaced by the T2 census (129 of 298 programs). Scope: concrete 32/64-bit operands (including exec/vcc and wrapped bit indices), constant-buffer Dyn 32-bit bit tests feeding descriptor joins (s_cbranch_scc0/s_cbranch_scc1), and strict refusals for unwritten SGPRs, width mismatches, unproven RuntimeWords, and descriptor words. Verification: dedicated CPU + SOPC decode + WARP/hardware D3D12 draw fixture (tests/mesh_bitcmp_check.py) with negative controls and LLVM 15 binary round-trip wired in CI.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7168643182 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7168643182). Originally posted by [R0D4X](https://github.com/R0D4X) on 2026-11-25T16:51:43Z. --- Claiming the `s_bitcmp0_b32` / `s_bitcmp1_b32` (and `s_bitcmp0_b64` / `s_bitcmp1_b64`) scalar bit-compare family in the bounded mesh lowerers (`tools/mesh_entry_aot.py` and `tools/mesh_dynamic_aot.py`) surfaced by the T2 census (129 of 298 programs). Scope: concrete 32/64-bit operands (including `exec`/`vcc` and wrapped bit indices), constant-buffer `Dyn` 32-bit bit tests feeding descriptor joins (`s_cbranch_scc0`/`s_cbranch_scc1`), and strict refusals for unwritten SGPRs, width mismatches, unproven `RuntimeWord`s, and descriptor words. Verification: dedicated CPU + SOPC decode + WARP/hardware D3D12 draw fixture (`tests/mesh_bitcmp_check.py`) with negative controls and LLVM 15 binary round-trip wired in CI.
RavenCurseBurg commented 2026-11-25 17:02:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T16:21:01Z.


I took the concrete src_scc operand reported by T2 in the two bounded mesh lowerers. The fix and source-built regression are in #2434.

LLVM 15 assembled both wave64 comparisons. The static and runtime lowerers returned the integer parsing error on both pre-fix inputs. On the fix, the two comparisons × two lowerers × triangle/quad produced 16 matching 1,024-pixel draws on RTX 4060 and WARP. Changing one equality immediate made 496 pixels differ on each adapter. The UHD 770 reported no mesh shader tier. The private inputs from the T2 census were not part of this check.

AI-assisted with Codex + GPT-6.2 Astra (xhigh).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167822837 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7167822837). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T16:21:01Z. --- I took the concrete `src_scc` operand reported by T2 in the two bounded mesh lowerers. The fix and source-built regression are in [#2434](https://github.com/R0Y00/Xbox2Windows/pull/2434). LLVM 15 assembled both wave64 comparisons. The static and runtime lowerers returned the integer parsing error on both pre-fix inputs. On the fix, the two comparisons × two lowerers × triangle/quad produced 16 matching 1,024-pixel draws on RTX 4060 and WARP. Changing one equality immediate made 496 pixels differ on each adapter. The UHD 770 reported no mesh shader tier. The private inputs from the T2 census were not part of this check. AI-assisted with Codex + GPT-6.2 Astra (xhigh).
R0D4X commented 2026-11-25 17:02:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-11-25T16:59:56Z.


PR up for s_bitcmp0_b32 / s_bitcmp1_b32 / s_bitcmp0_b64 / s_bitcmp1_b64 in the bounded mesh lowerers: #2444 (https://github.com/R0Y00/Xbox2Windows/pull/2444, commit a60be126, verified on mesh_bitcmp_cpu and mesh_bitcmp_draw_{warp,hardware} with WARP and RTX 5080 D3D12 debug layer enabled).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7168847641 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7168847641). Originally posted by [R0D4X](https://github.com/R0D4X) on 2026-11-25T16:59:56Z. --- PR up for `s_bitcmp0_b32` / `s_bitcmp1_b32` / `s_bitcmp0_b64` / `s_bitcmp1_b64` in the bounded mesh lowerers: #2444 (https://github.com/R0Y00/Xbox2Windows/pull/2444, commit `a60be126`, verified on `mesh_bitcmp_cpu` and `mesh_bitcmp_draw_{warp,hardware}` with WARP and RTX 5080 D3D12 debug layer enabled).
Leyukaka commented 2026-11-25 20:04:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T19:28:36Z.


I'll take the other half of T5: slot 57 pairs with no pixel stage. They are refused in translate_mesh57 since #2447 (slot 57 mesh without a pixel stage is not covered). In a local first-refusal census of captured start-up requests at main 6d2d3be, this is the first refusal for 108 requests (a different capture than the issue's 74; counts only).

Scope:

  • emit and compile the mesh stage alone: no <key>.ps57.hlsl / .ps57.cso output, with a new manifest line (<key>.ms57.txt) stating there is no pixel stage;
  • pending_keys treats a published no-pixel result as done without .ps57.cso;
  • the mesh stage's parameter exports, if any, are not linked to anything;
  • a source-built fixture, plus controls showing that a pair with a pixel stage is unchanged and that the depth-only (null-export) pixel stage stays refused.

@NiiRoZz, your T5 slice (the role check for the 18 null-export pixel stages) merged as #2421. Emission for that form is still refused in translate_mesh57, and I am not touching it. If you are already doing both depth-only forms at emission, say so and I'll drop this.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172349679 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7172349679). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-25T19:28:36Z. --- I'll take the other half of T5: slot 57 pairs with **no pixel stage**. They are refused in `translate_mesh57` since #2447 (`slot 57 mesh without a pixel stage is not covered`). In a local first-refusal census of captured start-up requests at main `6d2d3be`, this is the first refusal for 108 requests (a different capture than the issue's 74; counts only). Scope: - emit and compile the mesh stage alone: no `<key>.ps57.hlsl` / `.ps57.cso` output, with a new manifest line (`<key>.ms57.txt`) stating there is no pixel stage; - `pending_keys` treats a published no-pixel result as done without `.ps57.cso`; - the mesh stage's parameter exports, if any, are not linked to anything; - a source-built fixture, plus controls showing that a pair with a pixel stage is unchanged and that the depth-only (null-export) pixel stage stays refused. @NiiRoZz, your T5 slice (the role check for the 18 null-export pixel stages) merged as #2421. Emission for that form is still refused in `translate_mesh57`, and I am not touching it. If you are already doing both depth-only forms at emission, say so and I'll drop this. AI-assisted.
Leyukaka commented 2026-11-25 20:04:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T20:01:57Z.


I'll take forward branches outside the two group-memory exchanges in translate_mesh57. #2447 lists branches and loops outside the exchanges as not covered and as the next refusal for most requests (slot 57 mesh: a branch outside the group-memory exchanges is not covered). In a local first-refusal census of captured start-up requests at main 396e7e2, it is the first refusal for 279 slot 57 requests (counts only).

Scope:

  • Forward branches only, in the code before the first exchange and after the second, emitted through the translator's existing block structure. The mesh_skeleton checks that assume straight-line code are redone per path, or the program is refused.
  • Loops (backward branches, T6 / #1998 item I) stay refused.
  • So does any branch into or out of an exchange, and s_cselect_b64 on a wave mask.
  • Exports under a branch keep the exec guard and mesh_vertex handling of the straight-line case.
  • A source-built fixture with a taken and a not-taken arm, checked by a WARP/hardware draw, plus negative controls: a loop, a branch into an exchange, and an export under a lane-varying branch where the guard cannot be proven.

If someone already has this in progress, say so and I'll step back and review.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7173092035 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7173092035). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-25T20:01:57Z. --- I'll take forward branches outside the two group-memory exchanges in `translate_mesh57`. #2447 lists branches and loops outside the exchanges as not covered and as the next refusal for most requests (`slot 57 mesh: a branch outside the group-memory exchanges is not covered`). In a local first-refusal census of captured start-up requests at main `396e7e2`, it is the first refusal for 279 slot 57 requests (counts only). Scope: - Forward branches only, in the code before the first exchange and after the second, emitted through the translator's existing block structure. The `mesh_skeleton` checks that assume straight-line code are redone per path, or the program is refused. - Loops (backward branches, T6 / #1998 item I) stay refused. - So does any branch into or out of an exchange, and `s_cselect_b64` on a wave mask. - Exports under a branch keep the exec guard and `mesh_vertex` handling of the straight-line case. - A source-built fixture with a taken and a not-taken arm, checked by a WARP/hardware draw, plus negative controls: a loop, a branch into an exchange, and an export under a lane-varying branch where the guard cannot be proven. If someone already has this in progress, say so and I'll step back and review. AI-assisted.
R0Y00 commented 2026-11-25 21:01:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T20:23:03Z.


#2520 landed at 5a219a3c. T5’s no-pixel half now publishes the mesh shader alone and keeps a truncated mesh artifact pending. On the final head, nine source-built Windows Release checks passed, including the compiled mesh-only case and #2522’s paired publisher-to-desktop draw on WARP and RTX 4060 Laptop. The null-export pixel half remains separate. R1 still needs the same guest list to load and forward the translated pair, and Leyukaka’s forward-branch claim remains separate from both.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7173589115 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7173589115). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T20:23:03Z. --- #2520 landed at `5a219a3c`. T5’s no-pixel half now publishes the mesh shader alone and keeps a truncated mesh artifact pending. On the final head, nine source-built Windows Release checks passed, including the compiled mesh-only case and #2522’s paired publisher-to-desktop draw on WARP and RTX 4060 Laptop. The null-export pixel half remains separate. R1 still needs the same guest list to load and forward the translated pair, and Leyukaka’s forward-branch claim remains separate from both.
Leyukaka commented 2026-11-25 21:01:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T20:33:27Z.


Extending my forward-branch claim (#2548) to one of the next refusals it exposes: s_cbranch_vccz/s_cbranch_vccnz on a VCC that is provably wave-uniform. In a local census of captured start-up requests (counts only), with #2548 applied, 77 slot 57 requests stop at a VCC branch on a wave-wide condition (76 s_cbranch_vccz, 1 s_cbranch_vccnz). In every sample I checked, VCC comes from a v_cmp_*_e64 whose sources are an SGPR and a constant.

Scope: accept the branch only when VCC was last written by a compare whose operands are proven wave-uniform, with no other write to VCC before the branch, and EXEC at the branch is the full mask (no narrowed or saved mask in effect). Then VCC is either all ones or all zeros, so vccz/vccnz equals the per-lane test. A narrowed EXEC, a lane-varying operand, or any later write to VCC stays refused. A fixture with taken and not-taken arms, drawn on WARP and hardware, and negative controls: a VGPR operand, a narrowed EXEC at the branch, and a VCC write between the compare and the branch.

The 162 requests refused for a third group-memory exchange between the two modelled ones are not part of this.

If someone is already on this, say so and I'll step back.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7173848103 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7173848103). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-25T20:33:27Z. --- Extending my forward-branch claim (#2548) to one of the next refusals it exposes: `s_cbranch_vccz`/`s_cbranch_vccnz` on a VCC that is provably wave-uniform. In a local census of captured start-up requests (counts only), with #2548 applied, 77 slot 57 requests stop at a VCC branch on a wave-wide condition (76 `s_cbranch_vccz`, 1 `s_cbranch_vccnz`). In every sample I checked, VCC comes from a `v_cmp_*_e64` whose sources are an SGPR and a constant. Scope: accept the branch only when VCC was last written by a compare whose operands are proven wave-uniform, with no other write to VCC before the branch, and EXEC at the branch is the full mask (no narrowed or saved mask in effect). Then VCC is either all ones or all zeros, so `vccz`/`vccnz` equals the per-lane test. A narrowed EXEC, a lane-varying operand, or any later write to VCC stays refused. A fixture with taken and not-taken arms, drawn on WARP and hardware, and negative controls: a VGPR operand, a narrowed EXEC at the branch, and a VCC write between the compare and the branch. The 162 requests refused for a third group-memory exchange between the two modelled ones are not part of this. If someone is already on this, say so and I'll step back. AI-assisted.
R0Y00 commented 2026-11-25 22:02:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T21:04:14Z.


The bounded forward-branch slice of #2548 is on main (9bef64ee). At the exact head I ran five Release checks with ctest --preset release --no-tests=error -j 1 -R '^startup_mesh57_skeleton($|_(draw|exchange)_)' -V; WARP and RTX 4060 Laptop passed the branch draws and published-pair exchange. The source fixtures still refuse branches into or across the exchange and skip paths with wave-wide effects. R1 still needs the same guest-list loader/indirect/readback comparison. The private census in #2548 found zero additional complete translations, so this lands the bounded branch semantics only.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7174570431 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7174570431). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T21:04:14Z. --- The bounded forward-branch slice of #2548 is on main (`9bef64ee`). At the exact head I ran five Release checks with `ctest --preset release --no-tests=error -j 1 -R '^startup_mesh57_skeleton($|_(draw|exchange)_)' -V`; WARP and RTX 4060 Laptop passed the branch draws and published-pair exchange. The source fixtures still refuse branches into or across the exchange and skip paths with wave-wide effects. R1 still needs the same guest-list loader/indirect/readback comparison. The private census in #2548 found zero additional complete translations, so this lands the bounded branch semantics only.
RavenCurseBurg commented 2026-11-25 22:02:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T21:24:39Z.


I will take a source-built readback for T3's single-component buffer_load_format_x on the accepted group-memory mesh shape. At main 6c7a59a2, inserting the assembled instruction in the existing slot 57 fixture already reaches the common format lowerer and publishes udsrc 3 descword3 0 for srv 0 buf table 1 0.

I'll exercise the emitted mesh/pixel pair in the existing mesh renderer, vary the descriptor format and component selection on the same buffer bytes, and compare the image with the CPU rasterizer, including a wrong-format control. This covers the offline translation and draw fixture; R1 owns wiring a captured guest pipeline into the runtime.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7175038871 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7175038871). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T21:24:39Z. --- I will take a source-built readback for T3's single-component `buffer_load_format_x` on the accepted group-memory mesh shape. At main `6c7a59a2`, inserting the assembled instruction in the existing slot 57 fixture already reaches the common format lowerer and publishes `udsrc 3 descword3 0` for `srv 0 buf table 1 0`. I'll exercise the emitted mesh/pixel pair in the existing mesh renderer, vary the descriptor format and component selection on the same buffer bytes, and compare the image with the CPU rasterizer, including a wrong-format control. This covers the offline translation and draw fixture; R1 owns wiring a captured guest pipeline into the runtime.
Leyukaka commented 2026-11-25 22:02:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T21:55:41Z.


Claiming the next slot 57 refusal after #2548/#2566: a count exchange entered under a narrowed EXEC.

On a local capture (counts and instruction shape only, measured at main with #2548 applied, before #2566), the 235 slot 57 requests refused with a branch enters or crosses a group-memory exchange all end the region before the count exchange the same way: s_mov_b64 (s_mov_b64 exec, -1 in the program I inspected), then v_cmpx_gt_u32_e32 (194) or v_cmpx_lt_u32_e32 (41), then s_cbranch_execz to the first s_barrier of the count exchange, over a block that runs on the remaining lanes. In that program the barrier is reached with that narrowed EXEC on both paths, and a branch whose target is the first instruction of an exchange is refused by the lo <= dest < hi check in mesh_skeleton.

Plan: accept exactly that shape, with the conditions it needs proven (the v_cmpx operands, what the count exchange does with lanes outside EXEC), and keep every other branch onto an exchange refused. PR with refusal controls and a draw to follow.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7175717543 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7175717543). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-25T21:55:41Z. --- Claiming the next slot 57 refusal after #2548/#2566: a count exchange entered under a narrowed EXEC. On a local capture (counts and instruction shape only, measured at main with #2548 applied, before #2566), the 235 slot 57 requests refused with `a branch enters or crosses a group-memory exchange` all end the region before the count exchange the same way: `s_mov_b64` (`s_mov_b64 exec, -1` in the program I inspected), then `v_cmpx_gt_u32_e32` (194) or `v_cmpx_lt_u32_e32` (41), then `s_cbranch_execz` to the first `s_barrier` of the count exchange, over a block that runs on the remaining lanes. In that program the barrier is reached with that narrowed EXEC on both paths, and a branch whose target is the first instruction of an exchange is refused by the `lo <= dest < hi` check in `mesh_skeleton`. Plan: accept exactly that shape, with the conditions it needs proven (the `v_cmpx` operands, what the count exchange does with lanes outside EXEC), and keep every other branch onto an exchange refused. PR with refusal controls and a draw to follow. AI-assisted.
R0Y00 commented 2026-11-25 23:02:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T22:13:22Z.


The source-built T3 formatted-load readback landed in #2576 (168f2477). I rebuilt ee748000 and ran ctest --preset release --no-tests=error -R '^startup_mesh57_formatted_load_' -V on WARP and RTX 4060 Laptop. Both passed, with zero skips. The two intended descriptors matched the CPU image and both wrong-descriptor controls differed at 259 pixels on WARP. This covers the offline slot 57 translation and draw fixture; the existing R1 guest-list check and narrowed-EXEC exchange work remain separate.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7176090446 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7176090446). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T22:13:22Z. --- The source-built T3 formatted-load readback landed in #2576 (`168f2477`). I rebuilt `ee748000` and ran `ctest --preset release --no-tests=error -R '^startup_mesh57_formatted_load_' -V` on WARP and RTX 4060 Laptop. Both passed, with zero skips. The two intended descriptors matched the CPU image and both wrong-descriptor controls differed at 259 pixels on WARP. This covers the offline slot 57 translation and draw fixture; the existing R1 guest-list check and narrowed-EXEC exchange work remain separate.
Leyukaka commented 2026-11-25 23:02:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T22:19:23Z.


Update on my claim above (count exchange entered under a narrowed EXEC), measured on the same local capture at main fc97ade. Counts and instruction shape only, inputs private.

Accepting that entry shape alone translates none of the 279 slot 57 requests. With it, the 279 split as before: 10 stop earlier at a loop outside the group-memory exchanges is not covered, and of the 269 with the measured entry shape, 227 stop at s_cbranch_execz skips code with effects outside active lanes, on an earlier s_cbranch_execz block in the same region. That block holds scalar instructions whose results are read after its join (checked on the disassembly; the mesh check itself refuses them whether or not the result is live): s_lshl_b32/s_lshl_b64 in 190 requests and s_load_dword* in 37. The other 42 still stop at a branch enters or crosses a group-memory exchange; I have not looked at why.

The guest runs those scalar instructions once per wave whenever any lane is active, while the per-lane model skips them for a lane outside EXEC. That lane's copy of the SGPR can then differ from the wave's when it is read after EXEC widens again. Covering it needs wave-level handling of that scalar work, for example evaluating it whenever any lane of the guest wave is active (the guest skips it only when the whole wave has EXEC = 0), not just a wider entry check. The compute path refuses the same case (execz_refusals: definition of ..., live where the block joins), and its one exception, a zeroed mask set from exec_lo, does not cover a shift or a load.

So I am not opening the entry-shape PR on its own, since it has no effect on these programs. I am releasing this claim. The local branch has the entry check with refusal controls and a draw test, and I can push it if someone takes the scalar part.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7176218125 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7176218125). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-25T22:19:23Z. --- Update on my claim above (count exchange entered under a narrowed EXEC), measured on the same local capture at main `fc97ade`. Counts and instruction shape only, inputs private. Accepting that entry shape alone translates none of the 279 slot 57 requests. With it, the 279 split as before: 10 stop earlier at `a loop outside the group-memory exchanges is not covered`, and of the 269 with the measured entry shape, 227 stop at `s_cbranch_execz skips code with effects outside active lanes`, on an earlier `s_cbranch_execz` block in the same region. That block holds scalar instructions whose results are read after its join (checked on the disassembly; the mesh check itself refuses them whether or not the result is live): `s_lshl_b32`/`s_lshl_b64` in 190 requests and `s_load_dword*` in 37. The other 42 still stop at `a branch enters or crosses a group-memory exchange`; I have not looked at why. The guest runs those scalar instructions once per wave whenever any lane is active, while the per-lane model skips them for a lane outside EXEC. That lane's copy of the SGPR can then differ from the wave's when it is read after EXEC widens again. Covering it needs wave-level handling of that scalar work, for example evaluating it whenever any lane of the guest wave is active (the guest skips it only when the whole wave has EXEC = 0), not just a wider entry check. The compute path refuses the same case (`execz_refusals`: `definition of ..., live where the block joins`), and its one exception, a zeroed mask set from `exec_lo`, does not cover a shift or a load. So I am not opening the entry-shape PR on its own, since it has no effect on these programs. I am releasing this claim. The local branch has the entry check with refusal controls and a draw test, and I can push it if someone takes the scalar part. AI-assisted.
R0Y00 commented 2026-11-25 23:02:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T22:23:28Z.


Thanks for measuring the next refusal and releasing the claim. The 227 live-scalar cases and the 42 remaining exchange refusals give us two separate follow-ups. The first is available to claim here: use the existing source-built slot 57 mesh draw to prove one scalar shift whose result is consumed after EXEC widens. Compare a partially active guest wave with an all-empty one; preserve the prior scalar value on the all-empty path and verify one wave result after reconvergence in the partial case. A per-lane skip mutant should change pixels. Start with the shift only; keep scalar memory loads and unproved convergence rejected. Run ctest --preset release --no-tests=error -R '^startup_mesh57_skeleton' -V, then include the new fixture's exact CTest name, adapter and skip status. Please coordinate here before reusing Leyukaka’s entry-check branch. The entry check alone changed none of the 279 measured requests.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7176303054 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7176303054). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T22:23:28Z. --- Thanks for measuring the next refusal and releasing the claim. The 227 live-scalar cases and the 42 remaining exchange refusals give us two separate follow-ups. The first is available to claim here: use the existing source-built slot 57 mesh draw to prove one scalar shift whose result is consumed after EXEC widens. Compare a partially active guest wave with an all-empty one; preserve the prior scalar value on the all-empty path and verify one wave result after reconvergence in the partial case. A per-lane skip mutant should change pixels. Start with the shift only; keep scalar memory loads and unproved convergence rejected. Run `ctest --preset release --no-tests=error -R '^startup_mesh57_skeleton' -V`, then include the new fixture's exact CTest name, adapter and skip status. Please coordinate here before reusing Leyukaka’s entry-check branch. The entry check alone changed none of the 279 measured requests.
RavenCurseBurg commented 2026-11-25 23:02:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T22:28:57Z.


I’ll take the source-built slot 57 scalar shift from the maintainer’s follow-up. I’ll start with one 32-bit left shift and a single forward EXEC-zero branch. I’ll check the value read after EXEC widens for both a partially active wave and an empty wave, then run the same inputs with the per-lane skip mutation. I’ll report the actual readback differences, adapter and skips alongside the existing skeleton CTests.

I’ll build the fixture on main. @Leyukaka, your census identifies which instruction to isolate; the exchange-entry change can stay independent for this slice.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7176415962 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7176415962). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T22:28:57Z. --- I’ll take the source-built slot 57 scalar shift from [the maintainer’s follow-up](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7176303054). I’ll start with one 32-bit left shift and a single forward EXEC-zero branch. I’ll check the value read after EXEC widens for both a partially active wave and an empty wave, then run the same inputs with the per-lane skip mutation. I’ll report the actual readback differences, adapter and skips alongside the existing skeleton CTests. I’ll build the fixture on main. @Leyukaka, your census identifies which instruction to isolate; the exchange-entry change can stay independent for this slice.
roansystemlabs commented 2026-11-25 23:02:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-25T23:01:40Z.


I'd like to take the remaining half of T5 in translate_mesh57: emitting a slot 57 pair whose pixel stage exports only to the null target. The role check landed in #2421 and the no-pixel half in #2520; the null-export pixel half is still refused at emission. @NiiRoZz, if this was part of your T5 plan and you have started it, I'll step back and review instead.

Scope:

  • Publish the pair as a depth-only pass: the mesh stage plus a pixel stage with no colour output (or no pixel stage, reusing the #2520 path), with a manifest line that states which, so pending_keys treats it as done.
  • Everything else stays refused by name: a pixel stage with any other non-colour export, a colour export next to the null target, and the shapes #2447 already refuses.
  • A source-built gfx1013 program in the style of tests/startup_mesh57_skeleton.s, drawn with depth only and checked against the CPU rasterizer's depth.

Evidence: WARP and an RTX 3070 with the debug layer on, ctest --preset release --no-tests=error -j 1 -R '^startup_mesh57_skeleton' -V plus the new fixture's exact CTest name, adapter and skip status. Negative controls: a colour write added next to the null export, a dropped depth write and a mismatched pair must each fail.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177061705 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177061705). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-25T23:01:40Z. --- I'd like to take the remaining half of T5 in `translate_mesh57`: emitting a slot 57 pair whose pixel stage exports only to the null target. The role check landed in #2421 and the no-pixel half in #2520; the null-export pixel half is still refused at emission. @NiiRoZz, if this was part of your T5 plan and you have started it, I'll step back and review instead. Scope: - Publish the pair as a depth-only pass: the mesh stage plus a pixel stage with no colour output (or no pixel stage, reusing the #2520 path), with a manifest line that states which, so `pending_keys` treats it as done. - Everything else stays refused by name: a pixel stage with any other non-colour export, a colour export next to the null target, and the shapes #2447 already refuses. - A source-built gfx1013 program in the style of `tests/startup_mesh57_skeleton.s`, drawn with depth only and checked against the CPU rasterizer's depth. Evidence: WARP and an RTX 3070 with the debug layer on, `ctest --preset release --no-tests=error -j 1 -R '^startup_mesh57_skeleton' -V` plus the new fixture's exact CTest name, adapter and skip status. Negative controls: a colour write added next to the null export, a dropped depth write and a mismatched pair must each fail. AI-assisted.
R0Y00 commented 2026-11-26 00:01:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T23:12:20Z.


The slot 57 null-only pixel slice fits T5. Keep the pixel stage when it can discard, even if it has no color outputs; reusing the no-pixel path would lose that effect. Please coordinate the shared null-export behavior with the existing #2026 and confirm there is no competing T5 branch with NiiRoZz. For the source-built depth comparison, use distinguishable covered and discarded pixels with depth initialized to a sentinel, and make removing discard fail. Keep the mismatched-pair and mixed color/null refusals for this narrow profile. The valid pair should be recognized as complete by the existing manifest reader.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177263475 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177263475). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T23:12:20Z. --- The slot 57 null-only pixel slice fits T5. Keep the pixel stage when it can discard, even if it has no color outputs; reusing the no-pixel path would lose that effect. Please coordinate the shared null-export behavior with the existing #2026 and confirm there is no competing T5 branch with NiiRoZz. For the source-built depth comparison, use distinguishable covered and discarded pixels with depth initialized to a sentinel, and make removing discard fail. Keep the mismatched-pair and mixed color/null refusals for this narrow profile. The valid pair should be recognized as complete by the existing manifest reader.
NiiRoZz commented 2026-11-26 00:01:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by NiiRoZz on 2026-11-25T23:15:46Z.


@roansystemlabs yes, this was part of my T5 plan and I had it started: the translator half is now up as https://github.com/R0Y00/Xbox2Windows/pull/2606.

It removes the refusal and sends the pair through the existing pair path (pixel stage kept, no SV_Target, empty targets line, the vm discard preserved), with a source-built pure-Python check. It does not include the depth-only draw with read-back you proposed; if you want to build that fixture on top of it, it is yours, and a review of the PR is welcome either way.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177329533 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177329533). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-25T23:15:46Z. --- @roansystemlabs yes, this was part of my T5 plan and I had it started: the translator half is now up as https://github.com/R0Y00/Xbox2Windows/pull/2606. It removes the refusal and sends the pair through the existing pair path (pixel stage kept, no `SV_Target`, empty `targets` line, the `vm` discard preserved), with a source-built pure-Python check. It does not include the depth-only draw with read-back you proposed; if you want to build that fixture on top of it, it is yours, and a review of the PR is welcome either way. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
roansystemlabs commented 2026-11-26 00:01:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-25T23:17:44Z.


@NiiRoZz thanks, #2606 is yours, I'm stepping back from the translator half. I'll take the source-built depth-only draw on top of it, following the shape above: depth initialised to a sentinel, covered and discarded pixels told apart, a control where removing the discard fails, and the mismatched-pair and mixed colour/null refusals exercised. I'll run it against the #2606 head and post what it finds as a review there.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177372091 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177372091). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-25T23:17:44Z. --- @NiiRoZz thanks, #2606 is yours, I'm stepping back from the translator half. I'll take the source-built depth-only draw on top of it, following the shape above: depth initialised to a sentinel, covered and discarded pixels told apart, a control where removing the discard fails, and the mismatched-pair and mixed colour/null refusals exercised. I'll run it against the #2606 head and post what it finds as a review there. AI-assisted.
SimSalabimse commented 2026-11-26 00:01:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-25T23:21:37Z.


Claiming T6 tonight-slice: source-built mesh57 loop refusal fixture (+ mutant) only.

Scope: gfx1013 program in the style of tests/startup_mesh57_skeleton.s with one deliberate back-edge outside the two modelled group-memory exchanges; focused check that tip refuses it by the existing named reason (slot 57 mesh: a loop outside the group-memory exchanges is not covered); mutant without the back-edge must not stop on that loop refusal. Stubbed comparator that ignores the refusal string must fail the test.

No R1, no loop lowering in this first PR (optional constant-trip lowering only as a follow-up if the fixture is green).

PR: https://github.com/R0Y00/Xbox2Windows/pull/2622 (host-only / Linux pe-env for the pure-Python arm; no hardware draw in this slice).

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177453208 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177453208). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-25T23:21:37Z. --- Claiming **T6** tonight-slice: source-built mesh57 **loop refusal fixture** (+ mutant) only. Scope: gfx1013 program in the style of `tests/startup_mesh57_skeleton.s` with one deliberate back-edge outside the two modelled group-memory exchanges; focused check that tip refuses it by the existing named reason (`slot 57 mesh: a loop outside the group-memory exchanges is not covered`); mutant without the back-edge must not stop on that loop refusal. Stubbed comparator that ignores the refusal string must fail the test. No R1, no loop lowering in this first PR (optional constant-trip lowering only as a follow-up if the fixture is green). PR: https://github.com/R0Y00/Xbox2Windows/pull/2622 (host-only / Linux pe-env for the pure-Python arm; no hardware draw in this slice). AI-assisted.
SimSalabimse commented 2026-11-26 00:01:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-25T23:32:08Z.


Claiming T6 lowering follow-up: accept one constant-trip back-edge outside the two modelled group-memory exchanges in translate_mesh57.

Scope:

  • Reuse / extend the #2622 source-built loop program so the constant-trip shape translates and draws (WARP + mesh-capable GPU, CPU rasterizer oracle); the #2622 mutant without the back-edge stays a control.
  • Keep refused by name: data-dependent trip counts, barrier-/exchange-crossing back-edges, loops that need unproven exec carries.
  • No R1, no T5/T7, no compute Dispatch in this PR.

Stacking on tip main once #2622 merges, or temporarily on the #2622 head (SimSalabimse:cursor/mesh57-t6-loop-refusal-61fa, 5366e34d) until then.

Tip SHA at claim: 66026a39 (fork main); adapter: agent host (Linux pe-env for host checks; Windows WARP/hw for draw when available).

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177696411 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177696411). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-25T23:32:08Z. --- Claiming **T6 lowering** follow-up: accept **one** constant-trip back-edge outside the two modelled group-memory exchanges in `translate_mesh57`. Scope: - Reuse / extend the #2622 source-built loop program so the constant-trip shape translates and draws (WARP + mesh-capable GPU, CPU rasterizer oracle); the #2622 mutant without the back-edge stays a control. - Keep refused by name: data-dependent trip counts, barrier-/exchange-crossing back-edges, loops that need unproven exec carries. - No R1, no T5/T7, no compute Dispatch in this PR. Stacking on tip `main` once #2622 merges, or temporarily on the #2622 head (`SimSalabimse:cursor/mesh57-t6-loop-refusal-61fa`, `5366e34d`) until then. Tip SHA at claim: `66026a39` (fork `main`); adapter: agent host (Linux pe-env for host checks; Windows WARP/hw for draw when available). AI-assisted.
Leyukaka commented 2026-11-26 00:01:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T23:38:26Z.


Claiming a small tooling gap found while re-running start-up translations: tools/startup/shader_cache_rekey.py (the tool from #2401) re-keys graphics, RTV and slot 67 compute requests, but only counts slot 57 mesh requests ("own key strings"). mesh57_key hashes the request files under a versioned prefix (x2w-startup-mesh-57-2), so after a revision that changes that prefix a kept cache loses every slot 57 mesh request: the runtime asks for the new keys, and a file under its old name is refused by --pending as slot 57 mesh request key mismatch.

Plan: recompute the key with mesh57_key and copy the .m57, .ps57 and .root files under the new name, with the rules the tool already applies to the other kinds (read everything first, nothing written on a missing or unreadable part, temporary name then rename, an existing target left alone), plus controls in startup_shader_cache_rekey_check.py. Slot 86 (mesh86_cache.py, its own key and a .stream86 part) stays as it is. #2592 also edits this tool for the pixel input masks; I will keep this change apart from that part.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177845265 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177845265). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-25T23:38:26Z. --- Claiming a small tooling gap found while re-running start-up translations: `tools/startup/shader_cache_rekey.py` (the tool from #2401) re-keys graphics, RTV and slot 67 compute requests, but only counts slot 57 mesh requests ("own key strings"). `mesh57_key` hashes the request files under a versioned prefix (`x2w-startup-mesh-57-2`), so after a revision that changes that prefix a kept cache loses every slot 57 mesh request: the runtime asks for the new keys, and a file under its old name is refused by `--pending` as `slot 57 mesh request key mismatch`. Plan: recompute the key with `mesh57_key` and copy the `.m57`, `.ps57` and `.root` files under the new name, with the rules the tool already applies to the other kinds (read everything first, nothing written on a missing or unreadable part, temporary name then rename, an existing target left alone), plus controls in `startup_shader_cache_rekey_check.py`. Slot 86 (`mesh86_cache.py`, its own key and a `.stream86` part) stays as it is. #2592 also edits this tool for the pixel input masks; I will keep this change apart from that part. AI-assisted.
SimSalabimse commented 2026-11-26 00:01:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-25T23:38:43Z.


T6 lowering PR: https://github.com/R0Y00/Xbox2Windows/pull/2630 (SimSalabimse:cursor/mesh57-t6-loop-lowering-f5d7, e8adb6b7).

Constant-trip unroll in translate_mesh57; unsupported loops still refuse by the existing named reason. Supersedes the host-only #2622 fixture expectations in this PR (translate + draw + negative refusals).

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177851729 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177851729). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-25T23:38:43Z. --- **T6 lowering** PR: https://github.com/R0Y00/Xbox2Windows/pull/2630 (`SimSalabimse:cursor/mesh57-t6-loop-lowering-f5d7`, `e8adb6b7`). Constant-trip unroll in `translate_mesh57`; unsupported loops still refuse by the existing named reason. Supersedes the host-only #2622 fixture expectations in this PR (translate + draw + negative refusals). AI-assisted.
roansystemlabs commented 2026-11-26 00:01:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-25T23:43:04Z.


I'd like to take the third group-memory exchange in translate_mesh57: the requests refused with slot 57 mesh: ds_* outside the group-memory exchanges because they hold one more exchange between the two that #2447 models (the 162 Leyukaka left out of the VCC claim above). @NiiRoZz, if this is part of your T1 plan, and @Leyukaka, if you have started it, say so and I'll step back and review.

Scope, first slice:

  • Accept exactly one more exchange of the #2447 form (one writer lane, wait, barrier, read back) between the existing two, with literal addresses, one writer per store, and mesh_skeleton proving the order.
  • Everything else stays refused by name: a branch into or across any exchange, a second writer, a read before the barrier, an exchange under a narrowed EXEC, a fourth exchange.
  • A source-built gfx1013 wave64 program in the style of tests/startup_mesh57_skeleton.s with three exchanges, drawn with offscreen_check --mesh-indexed and compared with the CPU rasterizer.

Evidence: WARP and an RTX 3070 with the debug layer on, ctest --preset release --no-tests=error -j 1 -R '^startup_mesh57_skeleton' -V, plus the new test's exact name, adapter and skip status. Negative controls: the read moved before the barrier, a swapped address and a dropped store must each fail. @Leyukaka, if you can share the instruction shape of that third exchange from your census (shape and counts only), I'll build the fixture on it.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7177951004 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7177951004). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-25T23:43:04Z. --- I'd like to take the third group-memory exchange in `translate_mesh57`: the requests refused with `slot 57 mesh: ds_* outside the group-memory exchanges` because they hold one more exchange between the two that #2447 models (the 162 Leyukaka left out of the VCC claim above). @NiiRoZz, if this is part of your T1 plan, and @Leyukaka, if you have started it, say so and I'll step back and review. Scope, first slice: - Accept exactly one more exchange of the #2447 form (one writer lane, wait, barrier, read back) between the existing two, with literal addresses, one writer per store, and `mesh_skeleton` proving the order. - Everything else stays refused by name: a branch into or across any exchange, a second writer, a read before the barrier, an exchange under a narrowed EXEC, a fourth exchange. - A source-built gfx1013 wave64 program in the style of `tests/startup_mesh57_skeleton.s` with three exchanges, drawn with `offscreen_check --mesh-indexed` and compared with the CPU rasterizer. Evidence: WARP and an RTX 3070 with the debug layer on, `ctest --preset release --no-tests=error -j 1 -R '^startup_mesh57_skeleton' -V`, plus the new test's exact name, adapter and skip status. Negative controls: the read moved before the barrier, a swapped address and a dropped store must each fail. @Leyukaka, if you can share the instruction shape of that third exchange from your census (shape and counts only), I'll build the fixture on it. AI-assisted.
Leyukaka commented 2026-11-26 00:01:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-25T23:46:35Z.


@roansystemlabs I have not started it, and I have to correct the premise. The "162 requests refused for a third group-memory exchange" line in my VCC claim above was wrong; I corrected it in the #2566 description, but that earlier comment still carries the wrong wording. In the program I inspected there are exactly 3 ds_write_b32, 3 ds_read_b32 and 5 s_barrier, which is the two exchanges #2447 already models and no third one. Over all the requests counted below, every program had 5 s_barrier. My census (counts and instruction shape only) has no request refused with ds_* outside the group-memory exchanges.

What stopped them instead:

  • With #2548 applied, before #2566 (7175717543): the 235 requests refused as a branch enters or crosses a group-memory exchange all ended the region before the count exchange the same way: s_mov_b64 (exec, -1 in the program I inspected), then v_cmpx_gt_u32_e32 (194) or v_cmpx_lt_u32_e32 (41) of an SGPR against a VGPR, then s_cbranch_execz to the count exchange's first s_barrier.
  • At main fc97ade (7176218125), 279 slot 57 requests: 10 stop at the loop refusal, and 269 have that entry shape. Accepting the entry alone, 227 of the 269 then stop at an earlier s_cbranch_execz block whose scalar results are read after its join (s_lshl_b32/s_lshl_b64 in 190, s_load_dword* in 37). The other 42 still stop at enters or crosses, and I have not looked at why.

#2601 has since accepted a first scalar-shift slice of that second refusal; I have not re-measured on main after it. So a third-exchange fixture would not match these programs as far as I can tell; the 42 are the only place something else could hide.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178033946 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7178033946). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-25T23:46:35Z. --- @roansystemlabs I have not started it, and I have to correct the premise. The "162 requests refused for a third group-memory exchange" line in my VCC claim above was wrong; I corrected it in the #2566 description, but that earlier comment still carries the wrong wording. In the program I inspected there are exactly 3 `ds_write_b32`, 3 `ds_read_b32` and 5 `s_barrier`, which is the two exchanges #2447 already models and no third one. Over all the requests counted below, every program had 5 `s_barrier`. My census (counts and instruction shape only) has no request refused with `ds_* outside the group-memory exchanges`. What stopped them instead: - With #2548 applied, before #2566 (7175717543): the 235 requests refused as `a branch enters or crosses a group-memory exchange` all ended the region before the count exchange the same way: `s_mov_b64` (`exec, -1` in the program I inspected), then `v_cmpx_gt_u32_e32` (194) or `v_cmpx_lt_u32_e32` (41) of an SGPR against a VGPR, then `s_cbranch_execz` to the count exchange's first `s_barrier`. - At main `fc97ade` (7176218125), 279 slot 57 requests: 10 stop at the loop refusal, and 269 have that entry shape. Accepting the entry alone, 227 of the 269 then stop at an earlier `s_cbranch_execz` block whose scalar results are read after its join (`s_lshl_b32`/`s_lshl_b64` in 190, `s_load_dword*` in 37). The other 42 still stop at `enters or crosses`, and I have not looked at why. #2601 has since accepted a first scalar-shift slice of that second refusal; I have not re-measured on main after it. So a third-exchange fixture would not match these programs as far as I can tell; the 42 are the only place something else could hide. AI-assisted.
roansystemlabs commented 2026-11-26 00:01:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-25T23:48:27Z.


@Leyukaka thanks for checking and correcting it. The issue body agrees: all 298 programs hold exactly 3 ds_write_b32, 3 ds_read_b32 and 5 s_barrier, which is what the two exchanges #2447 models already use, so a third exchange of that form would match none of them. I'm withdrawing this claim; no branch was pushed and nothing else changes.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178078413 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7178078413). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-25T23:48:27Z. --- @Leyukaka thanks for checking and correcting it. The issue body agrees: all 298 programs hold exactly 3 `ds_write_b32`, 3 `ds_read_b32` and 5 `s_barrier`, which is what the two exchanges #2447 models already use, so a third exchange of that form would match none of them. I'm withdrawing this claim; no branch was pushed and nothing else changes. AI-assisted.
SimSalabimse commented 2026-11-26 00:01:14 +00:00 (Migrated from github.com)
Author
Contributor

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


Claiming T7: constant-lane v_writelane_b32 / v_readlane_b32 spill idiom in translate_mesh57.

Scope:

  • Source-built gfx1013 mesh (+ pixel) using the constant-lane spill/reload pattern (selected lane; optional saved EXEC high word if that matches #2127’s discriminator).
  • Accept only the constant-lane spill idiom in the slot-57 request path; refuse ordinary VGPR use of the same ops, unwritten slots, and mixed non-spill forms by name.
  • WARP + hardware draw vs CPU rasterizer; mutant that zeroes a spilled word (or removes a write) must change pixels / fail the oracle.
  • Reuse / mirror #2127 / mesh_entry_aot LANE_SPILL_OPS rules; do not re-litigate the bounded lowerers.

Tip SHA at claim: 66026a39 (fork main). Adapter: agent host (Linux pe-env for host checks; Windows WARP/hw for draw when available).

No R1, no #2603, no #2492/#2470, no more T6 loop shapes in this PR.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178160520 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7178160520). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-25T23:52:43Z. --- Claiming **T7**: constant-lane `v_writelane_b32` / `v_readlane_b32` spill idiom in `translate_mesh57`. Scope: - Source-built gfx1013 mesh (+ pixel) using the constant-lane spill/reload pattern (selected lane; optional saved EXEC high word if that matches #2127’s discriminator). - Accept only the constant-lane spill idiom in the slot-57 request path; refuse ordinary VGPR use of the same ops, unwritten slots, and mixed non-spill forms by name. - WARP + hardware draw vs CPU rasterizer; mutant that zeroes a spilled word (or removes a write) must change pixels / fail the oracle. - Reuse / mirror #2127 / `mesh_entry_aot` `LANE_SPILL_OPS` rules; do not re-litigate the bounded lowerers. Tip SHA at claim: `66026a39` (fork `main`). Adapter: agent host (Linux pe-env for host checks; Windows WARP/hw for draw when available). No R1, no #2603, no #2492/#2470, no more T6 loop shapes in this PR. AI-assisted.
SimSalabimse commented 2026-11-26 00:01:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-25T23:58:43Z.


T7 PR opened upstream: https://github.com/R0Y00/Xbox2Windows/pull/2637 (SimSalabimse:cursor/mesh57-t7-lane-spill-17da). Ignoring the accidental fork-only PR.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178262816 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7178262816). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-25T23:58:43Z. --- T7 PR opened upstream: https://github.com/R0Y00/Xbox2Windows/pull/2637 (`SimSalabimse:cursor/mesh57-t7-lane-spill-17da`). Ignoring the accidental fork-only PR.
Leyukaka commented 2026-11-26 01:02:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T00:12:03Z.


Coordinating here, as asked, before reusing my entry-check branch: I am taking back the item I released in 7176218125 (the count exchange entered under a narrowed EXEC). What is new against the released version: the skipped block may also hold scalar ALU whose results are dead at the exchange, and the compare must use the v_mbcnt thread index (as #2601 does). A PR follows.

Measured on a local capture at main 8ecaa8e (counts and instruction shape only), over all 497 slot 57 requests in that cache (my earlier 279 were a subset re-keyed for an older revision): 426 stop at a branch enters or crosses a group-memory exchange. With the change, 324 of them get past the entry and stop at the next refusal, an earlier s_cbranch_execz block whose scalar results are read after its join (the #2601 kind). The other 102 still stop at the entry, all with a different compare shape. No slot 57 request translates fully yet.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178504846 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7178504846). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-26T00:12:03Z. --- Coordinating here, as asked, before reusing my entry-check branch: I am taking back the item I released in 7176218125 (the count exchange entered under a narrowed EXEC). What is new against the released version: the skipped block may also hold scalar ALU whose results are dead at the exchange, and the compare must use the `v_mbcnt` thread index (as #2601 does). A PR follows. Measured on a local capture at main `8ecaa8e` (counts and instruction shape only), over all 497 slot 57 requests in that cache (my earlier 279 were a subset re-keyed for an older revision): 426 stop at `a branch enters or crosses a group-memory exchange`. With the change, 324 of them get past the entry and stop at the next refusal, an earlier `s_cbranch_execz` block whose scalar results are read after its join (the #2601 kind). The other 102 still stop at the entry, all with a different compare shape. No slot 57 request translates fully yet. AI-assisted.
Leyukaka commented 2026-11-26 01:02:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T00:20:04Z.


Update to my note above: #2643 now has a second commit that drops the thread-index requirement for the entry compare. The skipped block leaves nothing live that a dropped lane could see, so any v_cmpx_gt_u32_e32 / v_cmpx_lt_u32_e32 whose VGPR operands are defined for every lane works. The 102 I listed as "a different compare shape" all used v_cmpx_lt_u32_e32 vA, vB of two defined VGPRs. On the same capture at main 8ecaa8e (counts only), all 426 now get past the entry and stop at the next refusal, an s_cbranch_execz block before the count exchange whose scalar results, including scalar loads, are read after its join. No slot 57 request translates fully yet.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178646527 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7178646527). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-26T00:20:04Z. --- Update to my note above: #2643 now has a second commit that drops the thread-index requirement for the entry compare. The skipped block leaves nothing live that a dropped lane could see, so any `v_cmpx_gt_u32_e32` / `v_cmpx_lt_u32_e32` whose VGPR operands are defined for every lane works. The 102 I listed as "a different compare shape" all used `v_cmpx_lt_u32_e32 vA, vB` of two defined VGPRs. On the same capture at main `8ecaa8e` (counts only), all 426 now get past the entry and stop at the next refusal, an `s_cbranch_execz` block before the count exchange whose scalar results, including scalar loads, are read after its join. No slot 57 request translates fully yet. AI-assisted.
Leyukaka commented 2026-11-26 01:02:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T00:35:44Z.


With #2643 in, all 426 of the slot 57 requests that stopped at the count-exchange entry on my local capture (counts and instruction shape only) now stop at the same next refusal. I would like to check the scope before starting, since 7176303054 kept scalar memory loads rejected for the first slice.

The shape:

  • Before the count exchange, and before the #2643 entry compare, a separate compare narrows EXEC after s_mov_b64 exec, -1, and an s_cbranch_execz skips a block. There are two other branches between them, but no EXEC write and no branch target, so EXEC at the s_cbranch_execz is exactly the compare's result.
  • In 324 that compare is v_cmpx_gt_u32_e32 s<n>, v<t>, with v<t> the v_mbcnt thread index. In the other 102 it is v_cmpx_lt_u32_e32 v<t>, v<m>, with v<m> written by a v_mul_lo_u32.
  • The block's results are read after its join. It holds scalar ALU (s_or, s_and, s_mov, s_cselect, s_lshl, s_max, s_pack_ll) and scalar loads, about 985 s_buffer_load_dword* and 389 s_load_dword* over the 426.

The guest runs that block once per wave whenever any lane is active; the one-lane model skips it per lane. #2601 covers one post-count s_lshl_b32 behind v_cmp_gt_u32_e32 of a literal against the thread index plus s_and_saveexec_b64. This block differs in position (before the count exchange), compare form (v_cmpx), bound (an SGPR, not a literal), contents (many instructions, loads included), and the two branches between the compare and the s_cbranch_execz. For the 324 the active lanes are then a prefix of the wave. I have not checked that v<m> is wave-uniform for the other 102; a wave-level condition would apply there only if it is, and the rest would stay refused.

Would you accept scalar loads there under such a wave-level condition, with evidence in the style of #2601: refusal controls, a draw where a wave with only some lanes active and a wave with none both match the CPU model, and a per-lane-skip mutant that must change pixels? If you would rather go in smaller steps, which sub-slice would you want first, for example the 324 with the SGPR bound and s_buffer_load_dword* only?

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178918860 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7178918860). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-26T00:35:44Z. --- With #2643 in, all 426 of the slot 57 requests that stopped at the count-exchange entry on my local capture (counts and instruction shape only) now stop at the same next refusal. I would like to check the scope before starting, since [7176303054](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7176303054) kept scalar memory loads rejected for the first slice. The shape: - Before the count exchange, and before the #2643 entry compare, a separate compare narrows EXEC after `s_mov_b64 exec, -1`, and an `s_cbranch_execz` skips a block. There are two other branches between them, but no EXEC write and no branch target, so EXEC at the `s_cbranch_execz` is exactly the compare's result. - In 324 that compare is `v_cmpx_gt_u32_e32 s<n>, v<t>`, with `v<t>` the `v_mbcnt` thread index. In the other 102 it is `v_cmpx_lt_u32_e32 v<t>, v<m>`, with `v<m>` written by a `v_mul_lo_u32`. - The block's results are read after its join. It holds scalar ALU (`s_or`, `s_and`, `s_mov`, `s_cselect`, `s_lshl`, `s_max`, `s_pack_ll`) and scalar loads, about 985 `s_buffer_load_dword*` and 389 `s_load_dword*` over the 426. The guest runs that block once per wave whenever any lane is active; the one-lane model skips it per lane. #2601 covers one post-count `s_lshl_b32` behind `v_cmp_gt_u32_e32` of a literal against the thread index plus `s_and_saveexec_b64`. This block differs in position (before the count exchange), compare form (`v_cmpx`), bound (an SGPR, not a literal), contents (many instructions, loads included), and the two branches between the compare and the `s_cbranch_execz`. For the 324 the active lanes are then a prefix of the wave. I have not checked that `v<m>` is wave-uniform for the other 102; a wave-level condition would apply there only if it is, and the rest would stay refused. Would you accept scalar loads there under such a wave-level condition, with evidence in the style of #2601: refusal controls, a draw where a wave with only some lanes active and a wave with none both match the CPU model, and a per-lane-skip mutant that must change pixels? If you would rather go in smaller steps, which sub-slice would you want first, for example the 324 with the SGPR bound and `s_buffer_load_dword*` only? AI-assisted.
R0Y00 commented 2026-11-26 01:02:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T00:35:46Z.


Count-exchange entry #2643 is on main at f4f89946. The source-built mesh fixture passed on WARP and RTX 4060 Laptop. The reported 426 rows advanced to a later refusal on one capture; that count does not add any complete translations. The next claimable slice is one scalar load in a pre-exchange s_cbranch_execz block whose result is live after the join. First supply a source-built fixture that distinguishes zero EXEC (keep the previous scalar) from nonzero EXEC (use the loaded word). Include a mixed mask, a wrong old/new selection mutant, and an out-of-range load that must stay unissued on an empty wave. Use the existing mesh57 fixture and python -B tests/startup_mesh57_skeleton_check.py draw <dxc> <offscreen_check> <warp|hardware>. Keep unproven wave visibility refused. This follows #2643 and complements #2601’s scalar shifts; keep the existing T5–T7 claims in place.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7178919461 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7178919461). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T00:35:46Z. --- Count-exchange entry #2643 is on `main` at `f4f89946`. The source-built mesh fixture passed on WARP and RTX 4060 Laptop. The reported 426 rows advanced to a later refusal on one capture; that count does not add any complete translations. The next claimable slice is one scalar load in a pre-exchange `s_cbranch_execz` block whose result is live after the join. First supply a source-built fixture that distinguishes zero EXEC (keep the previous scalar) from nonzero EXEC (use the loaded word). Include a mixed mask, a wrong old/new selection mutant, and an out-of-range load that must stay unissued on an empty wave. Use the existing mesh57 fixture and `python -B tests/startup_mesh57_skeleton_check.py draw <dxc> <offscreen_check> <warp|hardware>`. Keep unproven wave visibility refused. This follows #2643 and complements #2601’s scalar shifts; keep the existing T5–T7 claims in place.
Leyukaka commented 2026-11-26 01:02:13 +00:00 (Migrated from github.com)
Author
Contributor

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


Claiming the slice above: one scalar load in a pre-exchange s_cbranch_execz block whose result is live after the join, following #2643 and alongside #2601's scalar shifts. T5–T7 claims stay as they are.

Plan:

  • Accept exactly one s_buffer_load_dword in such a block; s_load_dword and wider loads stay refused in this PR. EXEC there must come from a compare whose wave-level outcome is proven: a v_cmpx_gt_u32_e32 of an SGPR bound against the v_mbcnt thread index (#2601 proves the same prefix for a literal limit), so "this wave has an active lane" is (tid & ~63u) < bound. The load is issued and its word used for the whole wave only when that holds; otherwise every lane keeps the previous scalar value. Anything whose wave visibility is not proven stays refused.
  • Source-built fixture first, on the existing mesh57 fixture, checked with python -B tests/startup_mesh57_skeleton_check.py draw <dxc> <offscreen_check> <warp|hardware>: a wave with zero EXEC keeps the previous scalar; a wave with nonzero EXEC, here a mixed mask, uses the loaded word in every lane; a mutant that swaps the old and new selection must change pixels; and an out-of-range load stays unissued on an empty wave.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179066314 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7179066314). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-26T00:44:27Z. --- Claiming the slice above: one scalar load in a pre-exchange `s_cbranch_execz` block whose result is live after the join, following #2643 and alongside #2601's scalar shifts. T5–T7 claims stay as they are. Plan: - Accept exactly one `s_buffer_load_dword` in such a block; `s_load_dword` and wider loads stay refused in this PR. EXEC there must come from a compare whose wave-level outcome is proven: a `v_cmpx_gt_u32_e32` of an SGPR bound against the `v_mbcnt` thread index (#2601 proves the same prefix for a literal limit), so "this wave has an active lane" is `(tid & ~63u) < bound`. The load is issued and its word used for the whole wave only when that holds; otherwise every lane keeps the previous scalar value. Anything whose wave visibility is not proven stays refused. - Source-built fixture first, on the existing mesh57 fixture, checked with `python -B tests/startup_mesh57_skeleton_check.py draw <dxc> <offscreen_check> <warp|hardware>`: a wave with zero EXEC keeps the previous scalar; a wave with nonzero EXEC, here a mixed mask, uses the loaded word in every lane; a mutant that swaps the old and new selection must change pixels; and an out-of-range load stays unissued on an empty wave. AI-assisted.
R0Y00 commented 2026-11-26 02:05:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T01:20:57Z.


#2660 is on main at f4c6998a. I independently ran its source-built mesh draw with DXC on WARP and RTX 4060 Laptop. The results cover the mixed wave using the loaded scalar and the empty wave keeping its old value. The author’s capture check still has zero additional slot-57 translations. The 426 candidates that now get this far have several scalar loads and scalar ALU in the block. For the next slice, a counts-only breakdown by load count and by whether the scalar ALU updates a later load’s operand would tell us which block to model next. Please add it here under the existing claim if you already have the data.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179684447 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7179684447). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T01:20:57Z. --- #2660 is on main at `f4c6998a`. I independently ran its source-built mesh draw with DXC on WARP and RTX 4060 Laptop. The results cover the mixed wave using the loaded scalar and the empty wave keeping its old value. The author’s capture check still has zero additional slot-57 translations. The 426 candidates that now get this far have several scalar loads and scalar ALU in the block. For the next slice, a counts-only breakdown by load count and by whether the scalar ALU updates a later load’s operand would tell us which block to model next. Please add it here under the existing claim if you already have the data.
Leyukaka commented 2026-11-26 02:05:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-26T01:55:00Z.


The breakdown requested above, under the existing claim. It covers the 426 slot 57 requests that stop at s_cbranch_execz skips code with effects outside active lanes, on a local capture at main 7287979, counts only.

The refused block is read at the raise, from mesh_skeleton's source/target:

  • 144 are refused on the #2660 one-load path (gfx2hlsl.py:1580) and 282 in the per-lane skip check (:1594).
  • All 426 blocks start between the group-index exchange and the count exchange (a_end <= source < count_at, checked with a second probe at the same raise), and in none does a branch from outside land inside the block.

Scalar loads per block (s_load_dword* and s_buffer_load_dword*):

loads blocks
5–16 212
17–64 192
>64 22

None has fewer than 5. Over the 426 blocks there are 6309 s_buffer_load_dword* and 3784 s_load_dword*; these whole-block totals supersede the rough figures in my 00:35Z comment.

Does the scalar ALU update a later load's operand? For each load, I looked at what last wrote its base and offset registers inside the block. A plain s_mov_b32/s_mov_b64 is counted as a copy, not an update.

blocks
some load operand is updated by scalar ALU (other than a copy) 260
every load operand is an immediate, a value from before the block, an s_mov copy, or an earlier load's result 166

Of the 166, 157 have 5–16 loads and 9 have 17–64. Of the 260, 55 have 5–16, 183 have 17–64 and 22 have more than 64.

Per load:

operand immediate from before the block s_mov copy in block earlier load in block scalar ALU update in block
s_buffer_load base – 566 2151 3592 0
s_buffer_load offset 4420 0 0 0 1889
s_load base – 3074 671 0 39
s_load offset 3631 0 0 0 153

By last writer, no s_buffer_load base and 39 s_load bases are written by scalar ALU other than a copy; the other ALU-written operands are offsets (1889 + 153). The ALU writers of those operands are s_add_u32 549, s_lshl_b32 520, s_mulk_i32 313, s_mul_i32 271, s_lshl2_add_u32 191, s_addk_i32 123, s_and_b32 75, s_and_b64 39.

Limits: the last writer is taken in program order, ignoring branches inside the block. The source of an s_mov is not traced, so a copy of an ALU result (or of an immediate) counts as a copy, and 166 is an upper bound for blocks with no ALU update. SGPRs written by v_* instructions are not tracked.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7180276223 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7180276223). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-26T01:55:00Z. --- The breakdown requested above, under the existing claim. It covers the 426 slot 57 requests that stop at `s_cbranch_execz skips code with effects outside active lanes`, on a local capture at main `7287979`, counts only. The refused block is read at the raise, from `mesh_skeleton`'s `source`/`target`: - 144 are refused on the #2660 one-load path (`gfx2hlsl.py:1580`) and 282 in the per-lane skip check (`:1594`). - All 426 blocks start between the group-index exchange and the count exchange (`a_end <= source < count_at`, checked with a second probe at the same raise), and in none does a branch from outside land inside the block. **Scalar loads per block** (`s_load_dword*` and `s_buffer_load_dword*`): | loads | blocks | |---|---:| | 5–16 | 212 | | 17–64 | 192 | | >64 | 22 | None has fewer than 5. Over the 426 blocks there are 6309 `s_buffer_load_dword*` and 3784 `s_load_dword*`; these whole-block totals supersede the rough figures in my 00:35Z comment. **Does the scalar ALU update a later load's operand?** For each load, I looked at what last wrote its base and offset registers inside the block. A plain `s_mov_b32`/`s_mov_b64` is counted as a copy, not an update. | | blocks | |---|---:| | some load operand is updated by scalar ALU (other than a copy) | 260 | | every load operand is an immediate, a value from before the block, an `s_mov` copy, or an earlier load's result | 166 | Of the 166, 157 have 5–16 loads and 9 have 17–64. Of the 260, 55 have 5–16, 183 have 17–64 and 22 have more than 64. Per load: | operand | immediate | from before the block | `s_mov` copy in block | earlier load in block | scalar ALU update in block | |---|---:|---:|---:|---:|---:| | `s_buffer_load` base | – | 566 | 2151 | 3592 | 0 | | `s_buffer_load` offset | 4420 | 0 | 0 | 0 | 1889 | | `s_load` base | – | 3074 | 671 | 0 | 39 | | `s_load` offset | 3631 | 0 | 0 | 0 | 153 | By last writer, no `s_buffer_load` base and 39 `s_load` bases are written by scalar ALU other than a copy; the other ALU-written operands are offsets (1889 + 153). The ALU writers of those operands are `s_add_u32` 549, `s_lshl_b32` 520, `s_mulk_i32` 313, `s_mul_i32` 271, `s_lshl2_add_u32` 191, `s_addk_i32` 123, `s_and_b32` 75, `s_and_b64` 39. Limits: the last writer is taken in program order, ignoring branches inside the block. The source of an `s_mov` is not traced, so a copy of an ALU result (or of an immediate) counts as a copy, and 166 is an upper bound for blocks with no ALU update. SGPRs written by `v_*` instructions are not tracked. AI-assisted.
R0Y00 commented 2026-11-26 03:03:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T02:08:47Z.


The null-only half of T5 is on main in #2606 (d26cbc54). On that translator and the #2680 fixture, WARP and RTX 4060 Laptop matched all 1,024 D32 pixels and kept color cleared. Dropping the discard changes 134 depth values, including pixels that should retain the sentinel. The six mixed-export forms still refuse before publication. The fixture is following separately in #2680. This verifies the source-built depth-only pair. The capture-level slot-57 coverage remains open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7180505833 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7180505833). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T02:08:47Z. --- The null-only half of T5 is on main in #2606 (`d26cbc54`). On that translator and the #2680 fixture, WARP and RTX 4060 Laptop matched all 1,024 D32 pixels and kept color cleared. Dropping the discard changes 134 depth values, including pixels that should retain the sentinel. The six mixed-export forms still refuse before publication. The fixture is following separately in #2680. This verifies the source-built depth-only pair. The capture-level slot-57 coverage remains open.
R0Y00 commented 2026-11-26 03:03:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T02:48:08Z.


T6 is on main in #2630 (7c6cf907). On the reviewed Windows head both WARP and RTX 4060 Laptop matched the source-built constant-trip draw, and the once-through shader failed the target image comparison. The control-flow tests also refuse reversed subtraction, data-dependent trip counts and loops that change EXEC. The tracker remains open for capture coverage and the remaining slot 57 work.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181131565 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7181131565). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T02:48:08Z. --- T6 is on main in #2630 (7c6cf907). On the reviewed Windows head both WARP and RTX 4060 Laptop matched the source-built constant-trip draw, and the once-through shader failed the target image comparison. The control-flow tests also refuse reversed subtraction, data-dependent trip counts and loops that change EXEC. The tracker remains open for capture coverage and the remaining slot 57 work.
R0Y00 commented 2026-11-26 03:03:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T03:02:52Z.


T7 landed in #2637 (ed53c1fe). WARP and RTX 4060 Laptop both passed the source-built constant-lane mesh spill draw. The mutant that zeros the spilled value compiled and differed at 259 pixels on each adapter. The same integrated tree also passed T6 and the existing pixel branch/join proof. The mesh slice still refuses raw EXEC operands and VGPRs used by the group exchange.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181347832 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7181347832). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T03:02:52Z. --- T7 landed in #2637 (ed53c1fe). WARP and RTX 4060 Laptop both passed the source-built constant-lane mesh spill draw. The mutant that zeros the spilled value compiled and differed at 259 pixels on each adapter. The same integrated tree also passed T6 and the existing pixel branch/join proof. The mesh slice still refuses raw EXEC operands and VGPRs used by the group exchange.
JB2WIN commented 2026-11-26 09:04:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-26T08:31:51Z.


CLAIM (slot 57, follow-up to #2660) | @JB2WIN

Scope, as two small PRs:

  1. Pre-exchange wave block with several scalar loads. An s_cbranch_execz block between the group-index and count exchanges that is straight-line code and holds several s_buffer_load_dword* / s_load_dword* plus scalar ALU. EXEC comes from v_cmpx_gt_u32_e32 s<bound>, v<thread> after a full EXEC reset, with no EXEC write between them and no branch entering that range from outside. The lowering reuses the #2660 wave_any predicate and runs every scalar instruction of the block for the whole wave. Vector writes stay lane-predicated. Scalars read after the join must be wave-uniform and defined before the block. VCC and SCC written in the block must be dead at the join.
  2. Dead scalar ALU in a skipped block. Scalar ALU inside an s_cbranch_execz block whose results no path reads past the join. The case seen is the post-count primitive-export block, which jumps to s_endpgm.

Local census on a local capture (main 96a7b4fb, counts only): 407 slot 57 requests stop at s_cbranch_execz skips code with effects outside active lanes.

  • With both changes, 91 pass both checks and stop at the next refusal, v_readfirstlane_b32 outside the group-index read is not covered. That is a first-lane read of a formatted buffer load. I am not claiming it.
  • So far this produces no new complete translations.
  • The other 316 have branches inside the block (s_cbranch_scc0 / s_branch), src_scc, or the v_cmpx_lt_u32 v, v compare form. Those are not in scope.

@Leyukaka your 01:55Z breakdown covers this set. If you have already started on multi-load blocks, say so and I will drop item 1.

Tests planned (source-built only), in tests/startup_mesh57_skeleton_check.py:

  • a block with two s_buffer_load_dword (the second offset from an s_add_u32), a scalar table read and a dead v_cmp VCC;
  • a mixed wave, an empty wave and an out-of-range address on the empty wave;
  • a mutant that skips per lane;
  • WARP and an RTX 3080.

Four #2660 refusal controls would become accepted cases with their own draw checks: ordinary SMEM, wider SMEM, a second live scalar write and a dead scalar result. The other controls stay.

AI-assisted (Claude Code); no capture files, request identifiers or program bytes are posted here.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7186705717 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7186705717). Originally posted by [JB2WIN](https://github.com/JB2WIN) on 2026-11-26T08:31:51Z. --- CLAIM (slot 57, follow-up to #2660) | @JB2WIN Scope, as two small PRs: 1. **Pre-exchange wave block with several scalar loads.** An `s_cbranch_execz` block between the group-index and count exchanges that is straight-line code and holds several `s_buffer_load_dword*` / `s_load_dword*` plus scalar ALU. EXEC comes from `v_cmpx_gt_u32_e32 s<bound>, v<thread>` after a full EXEC reset, with no EXEC write between them and no branch entering that range from outside. The lowering reuses the #2660 `wave_any` predicate and runs every scalar instruction of the block for the whole wave. Vector writes stay lane-predicated. Scalars read after the join must be wave-uniform and defined before the block. VCC and SCC written in the block must be dead at the join. 2. **Dead scalar ALU in a skipped block.** Scalar ALU inside an `s_cbranch_execz` block whose results no path reads past the join. The case seen is the post-count primitive-export block, which jumps to `s_endpgm`. Local census on a local capture (main `96a7b4fb`, counts only): 407 slot 57 requests stop at `s_cbranch_execz skips code with effects outside active lanes`. - With both changes, 91 pass both checks and stop at the next refusal, `v_readfirstlane_b32 outside the group-index read is not covered`. That is a first-lane read of a formatted buffer load. I am not claiming it. - So far this produces no new complete translations. - The other 316 have branches inside the block (`s_cbranch_scc0` / `s_branch`), `src_scc`, or the `v_cmpx_lt_u32 v, v` compare form. Those are not in scope. @Leyukaka your 01:55Z breakdown covers this set. If you have already started on multi-load blocks, say so and I will drop item 1. Tests planned (source-built only), in `tests/startup_mesh57_skeleton_check.py`: - a block with two `s_buffer_load_dword` (the second offset from an `s_add_u32`), a scalar table read and a dead `v_cmp` VCC; - a mixed wave, an empty wave and an out-of-range address on the empty wave; - a mutant that skips per lane; - WARP and an RTX 3080. Four #2660 refusal controls would become accepted cases with their own draw checks: ordinary SMEM, wider SMEM, a second live scalar write and a dead scalar result. The other controls stay. AI-assisted (Claude Code); no capture files, request identifiers or program bytes are posted here.
mumba17 commented 2026-11-26 12:04:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-26T11:28:49Z.


Claiming a small slot 57 pixel-stage item: the early exit of a kill in the role check of translate_mesh57.

In my local capture (RTX 3090, main 700522ef; counts only), 97 slot 57 requests stop at slot 57 pixel stage mixes the null export with another export. All 95 distinct pixel programs are colour stages (mrt0 up to mrt2..mrt5) whose only null export is the early exit that LLVM SILateBranchLowering / Mesa ACO place after the main s_endpgm: exp null off, off, off, off done vm then s_endpgm. 89 enter it only by s_cbranch_execz. The other 6 also enter by s_cbranch_scc0 directly after s_cselect exec, exec, 0 (the demote form), so EXEC is zero on every entry.

Scope: accept only that block. Everything else stays refused with the existing message. Source-built fixtures for both forms, CPU checks with ten near-miss controls, and a WARP/hardware draw against a CPU rasteriser with a negative control.

This removes a pre-check only. With it, all 97 move on to the mesh-stage refusals already claimed here (s_cbranch_execz blocks 71, group-index exchange shape 15, loops 11), so it adds no complete translation by itself. Lowered on their own through MeshPixelStage, the 95 pixel programs raise no exit-related refusal; their next pixel-side gaps are s_load with a register offset through the resource heap (47) and v_fma_mix_f32 reading the upper half of a v_interp_p2_f16 result (39).

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7190781329 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7190781329). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-26T11:28:49Z. --- Claiming a small slot 57 pixel-stage item: **the early exit of a kill** in the role check of `translate_mesh57`. In my local capture (RTX 3090, main 700522ef; counts only), 97 slot 57 requests stop at `slot 57 pixel stage mixes the null export with another export`. All 95 distinct pixel programs are colour stages (mrt0 up to mrt2..mrt5) whose only null export is the early exit that LLVM `SILateBranchLowering` / Mesa ACO place after the main `s_endpgm`: `exp null off, off, off, off done vm` then `s_endpgm`. 89 enter it only by `s_cbranch_execz`. The other 6 also enter by `s_cbranch_scc0` directly after `s_cselect exec, exec, 0` (the demote form), so EXEC is zero on every entry. Scope: accept only that block. Everything else stays refused with the existing message. Source-built fixtures for both forms, CPU checks with ten near-miss controls, and a WARP/hardware draw against a CPU rasteriser with a negative control. This removes a pre-check only. With it, all 97 move on to the mesh-stage refusals already claimed here (`s_cbranch_execz` blocks 71, group-index exchange shape 15, loops 11), so it adds no complete translation by itself. Lowered on their own through `MeshPixelStage`, the 95 pixel programs raise no exit-related refusal; their next pixel-side gaps are `s_load` with a register offset through the resource heap (47) and `v_fma_mix_f32` reading the upper half of a `v_interp_p2_f16` result (39). AI-assisted (Claude Code).
JB2WIN commented 2026-11-26 13:03:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-26T12:25:31Z.


Releasing my claim from 7186705717. #2783 and #2785 are merged. Translation is moving to the native C++ frontend (#870), so I am not taking further Python slices here. Anything left from that claim is free.

These notes come from a local capture (counts and instruction shapes only). They may save time for the C++ mesh path:

  • Mesh user SGPRs start at s16. Over 558 captured slot 57 mesh programs, no entry read falls in s8-s15. The reads of s16..s24 match the root layout placed from s16: tables, a root descriptor pair, root constants, then the resource and sampler heap bases. Programs with one table fewer shift by one register.
  • The s_bitcmp0_b32 sN, 28 on s20/s21 tests a packed root-constant field. It is not a hardware system value.
  • Resource-heap records are indexed as (rootconst & 0x3ff) << 5. They are loaded with s_load_dwordx4 from the 32-bit heap base with a zero high word.
  • Output counts. The vertex and primitive counts are set as s_cselect_b32 C, 0, B, where B is the bound of the preceding v_cmpx_gt_u32 B, thread + s_cbranch_execz block. Every exporting thread therefore ran that block, and the VGPRs it wrote are defined for the exports.

AI-assisted (Claude Code); no capture files, request identifiers or program bytes are posted here.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7191983903 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7191983903). Originally posted by [JB2WIN](https://github.com/JB2WIN) on 2026-11-26T12:25:31Z. --- Releasing my claim from [7186705717](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7186705717). #2783 and #2785 are merged. Translation is moving to the native C++ frontend (#870), so I am not taking further Python slices here. Anything left from that claim is free. These notes come from a local capture (counts and instruction shapes only). They may save time for the C++ mesh path: - **Mesh user SGPRs start at s16.** Over 558 captured slot 57 mesh programs, no entry read falls in s8-s15. The reads of s16..s24 match the root layout placed from s16: tables, a root descriptor pair, root constants, then the resource and sampler heap bases. Programs with one table fewer shift by one register. - **The `s_bitcmp0_b32 sN, 28` on s20/s21 tests a packed root-constant field.** It is not a hardware system value. - **Resource-heap records are indexed as `(rootconst & 0x3ff) << 5`.** They are loaded with `s_load_dwordx4` from the 32-bit heap base with a zero high word. - **Output counts.** The vertex and primitive counts are set as `s_cselect_b32 C, 0, B`, where B is the bound of the preceding `v_cmpx_gt_u32 B, thread` + `s_cbranch_execz` block. Every exporting thread therefore ran that block, and the VGPRs it wrote are defined for the exports. AI-assisted (Claude Code); no capture files, request identifiers or program bytes are posted here.
tedin7 commented 2026-11-27 21:35:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:35:01Z.


Coordination for slot 57 mesh work, before we open anything else here.

I read #3091 and #3094 (native mesh interfaces and fixed mesh pipelines) against what is open and merged. These pieces look covered by #3091 in the C++ frontend, so I will NOT open Python PRs for them:

  • entry user data from the root layout (user SGPRs from s16)
  • group index (v5 >> 7 as the group id) and the linear DispatchMesh count
  • s_load from the resource heap with a masked root-constant offset

If any of these is wrong on #3091, I will report it there as a source-built fixture instead of a competing PR.

These look free and I would like to take them, one small PR each, with a source-built fixture, a negative control and a precise refusal for the rest:

  1. Wave-load s_cbranch_execz blocks after #2660 / #2783 / #2785: an inner s_cbranch_execz / s_cbranch_vccz inside the block, an SCC produced by a mask op, and a scalar load whose address is not wave-uniform.
  2. Per-lane definedness: a VGPR written in a pre-exchange block and read after the exchange (the "not defined for every lane" refusal).
  3. The count exchange when the group-index instruction is absent.
  4. pos1 export target and export order per thread (#1998 item F is merged for the bounded lowerers only; #3091 refuses pos1).

Left to others: typed heap views other than R32_UINT (#2576, #3091) and the runtime side (#1759 R1 fixture, #3094).

Question for @R0Y00: should items 1 to 4 go into tools/startup/gfx2hlsl.py, or only into the native C++ frontend on main (#870, 2026-11-27 11:07 note)? I will follow your answer and start with item 1 in whichever path you pick.

Tooling: #3198 (draft) ranks the first shader refusals by how many draws and dispatches they block, so each claim above can be ordered by what it unblocks.

Commands executed locally: gh issue view, gh pr view, gh api (read only), and a read of the #3091 mesh source diff.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7228574536 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7228574536). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-27T21:35:01Z. --- Coordination for slot 57 mesh work, before we open anything else here. I read #3091 and #3094 (native mesh interfaces and fixed mesh pipelines) against what is open and merged. These pieces look covered by #3091 in the C++ frontend, so I will NOT open Python PRs for them: - entry user data from the root layout (user SGPRs from s16) - group index (`v5 >> 7` as the group id) and the linear `DispatchMesh` count - `s_load` from the resource heap with a masked root-constant offset If any of these is wrong on #3091, I will report it there as a source-built fixture instead of a competing PR. These look free and I would like to take them, one small PR each, with a source-built fixture, a negative control and a precise refusal for the rest: 1. Wave-load `s_cbranch_execz` blocks after #2660 / #2783 / #2785: an inner `s_cbranch_execz` / `s_cbranch_vccz` inside the block, an SCC produced by a mask op, and a scalar load whose address is not wave-uniform. 2. Per-lane definedness: a VGPR written in a pre-exchange block and read after the exchange (the "not defined for every lane" refusal). 3. The count exchange when the group-index instruction is absent. 4. `pos1` export target and export order per thread (#1998 item F is merged for the bounded lowerers only; #3091 refuses `pos1`). Left to others: typed heap views other than R32_UINT (#2576, #3091) and the runtime side (#1759 R1 fixture, #3094). Question for @R0Y00: should items 1 to 4 go into `tools/startup/gfx2hlsl.py`, or only into the native C++ frontend on `main` (#870, 2026-11-27 11:07 note)? I will follow your answer and start with item 1 in whichever path you pick. Tooling: #3198 (draft) ranks the first shader refusals by how many draws and dispatches they block, so each claim above can be ordered by what it unblocks. Commands executed locally: `gh issue view`, `gh pr view`, `gh api` (read only), and a read of the #3091 mesh source diff. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-27 23:03:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T23:03:17Z.


Update on my claim above: I'm pausing the four mesh items I took (inner execz/vccz and SCC-of-mask blocks, per-lane definedness after the exchanges, the count exchange without the group-index instruction, and pos1 / export order). We're putting our time on replay fidelity first, so treat them as free: anyone can take them.

What we did get done on our fork, in case it saves someone time: the wave-load block shapes (inner execz/vccz branch, SCC of an exec mask op, a VCC-aliased descriptor read as a mask) have source-built fixtures and lowerings there; happy to share or port them if someone picks those items up in either path.

Still open from before: Python gfx2hlsl.py or only the native C++ frontend for new mesh slices?

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7229833383 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7229833383). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-27T23:03:17Z. --- Update on my claim above: I'm pausing the four mesh items I took (inner execz/vccz and SCC-of-mask blocks, per-lane definedness after the exchanges, the count exchange without the group-index instruction, and pos1 / export order). We're putting our time on replay fidelity first, so treat them as free: anyone can take them. What we did get done on our fork, in case it saves someone time: the wave-load block shapes (inner execz/vccz branch, SCC of an exec mask op, a VCC-aliased descriptor read as a mask) have source-built fixtures and lowerings there; happy to share or port them if someone picks those items up in either path. Still open from before: Python `gfx2hlsl.py` or only the native C++ frontend for new mesh slices? AI-assisted; commands listed were executed locally.
Leyukaka commented 2026-11-28 15:56:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T15:56:33Z.


@R0Y00 slot 57 requests cannot be ranked offline on the native path the way compute is in #3224:

  • compile_dxil --refusals reads only .a / .rtv and .c67 markers (tools/startup/compile_dxil.cpp:545-548), so a directory of slot 57 requests reports 0 examined.
  • gfx1013-raw-ms needs a .mslayout sidecar (at least mesh1 threads vertices primitives topology group_stride wave, compile_dxil.cpp:183-189), and gfx1013-raw-mesh-ps a reviewed .pslayout. Published requests carry neither.
  • The layout values exist only in the reviewed .mesh57-state record (src/startup_stubs/native_mesh57.inl:245-309, mesh57_profile.h:64-70). The runtime does not derive them when it publishes .m57.

Is there a derivation from the fixed descriptor and state blocks that you would accept in a tool that writes .mslayout for captured requests, so --refusals / --requests could cover gfx1013-raw-ms? If those values must stay hand-reviewed, I won't open it.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7241853997 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7241853997). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T15:56:33Z. --- @R0Y00 slot 57 requests cannot be ranked offline on the native path the way compute is in #3224: - `compile_dxil --refusals` reads only `.a` / `.rtv` and `.c67` markers (`tools/startup/compile_dxil.cpp:545-548`), so a directory of slot 57 requests reports 0 examined. - `gfx1013-raw-ms` needs a `.mslayout` sidecar (at least `mesh1 threads vertices primitives topology group_stride wave`, `compile_dxil.cpp:183-189`), and `gfx1013-raw-mesh-ps` a reviewed `.pslayout`. Published requests carry neither. - The layout values exist only in the reviewed `.mesh57-state` record (`src/startup_stubs/native_mesh57.inl:245-309`, `mesh57_profile.h:64-70`). The runtime does not derive them when it publishes `.m57`. Is there a derivation from the fixed descriptor and state blocks that you would accept in a tool that writes `.mslayout` for captured requests, so `--refusals` / `--requests` could cover `gfx1013-raw-ms`? If those values must stay hand-reviewed, I won't open it.
Leyukaka commented 2026-11-28 23:56:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T23:56:37Z.


Taking, on the native C++ frontend (src/gfx1013_direct_mesh.inl) rather than gfx2hlsl.py, parts of the items tedin7 released on 11-27 23:03: from item 1, the VCC branch on a wave-uniform compare; item 3, as named refusals for exchange shapes the frontend does not match. Item 2: I take a control only, after (d). The rest of item 1 (inner execz, SCC of a mask op, scalar load with a non-wave-uniform address) and item 4 (pos1, export order) stay free. Plan, one small PR each, in this order:

a. compile_dxil --refusals counts req_<key>.m57 requests (a .mslayout sidecar if present, otherwise one fixed reason).
b. Mesh entry root inputs from the creation root signature, for .mslayout, offline only. This is narrower than my 11-28 15:56 question: root inputs only, read from .root with the walk read_raw_graphics (src/gfx1013_compute_native.cpp) already uses for VS/PS; thread count, topology, stride and wave stay caller-supplied. With (a) it ranks the requests by C++ refusal.
c. Named refusals for unmatched exchange shapes, instead of unsupported mesh instruction or EXEC state: <op>.
d. VCC branch on a wave-uniform compare (v_cmp_* into VCC followed by s_cbranch_vccz/vccnz, refused today at mesh VCC branch lacks a proven guest whole-wave mask).

On main 0614f68c, the shader cache of a start-up run of about 6 minutes (carried over from earlier runs) holds 543 slot 57 requests, all with a gfx2hlsl.py .fail; the run refused 1,923,473 indirect DispatchMesh commands (graphics-pipeline bucket).

Overlap: draft #3413 (SimSalabimse) derives Mesh57 state at run time for one allocation shape and touches native_mesh57.inl and docs/experiments/native-fixed-mesh57.md; (b) stays offline and does not touch them. #3409, #3063 and #3415 also edit compile_dxil.cpp, in other lines of compile_one and in read_captured_views; my #3403 only in the watch functions. No open PR touches gfx1013_direct_mesh.inl.

@tedin7 if your fork fixtures for the inner execz/vccz and SCC-of-mask shapes are source-built, I can port them as controls and credit you.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7247765625 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7247765625). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T23:56:37Z. --- Taking, on the native C++ frontend (`src/gfx1013_direct_mesh.inl`) rather than `gfx2hlsl.py`, parts of the items tedin7 released on 11-27 23:03: from item 1, the VCC branch on a wave-uniform compare; item 3, as named refusals for exchange shapes the frontend does not match. Item 2: I take a control only, after (d). The rest of item 1 (inner execz, SCC of a mask op, scalar load with a non-wave-uniform address) and item 4 (`pos1`, export order) stay free. Plan, one small PR each, in this order: a. `compile_dxil --refusals` counts `req_<key>.m57` requests (a `.mslayout` sidecar if present, otherwise one fixed reason). b. Mesh entry root inputs from the creation root signature, for `.mslayout`, offline only. This is narrower than my 11-28 15:56 question: root inputs only, read from `.root` with the walk `read_raw_graphics` (`src/gfx1013_compute_native.cpp`) already uses for VS/PS; thread count, topology, stride and wave stay caller-supplied. With (a) it ranks the requests by C++ refusal. c. Named refusals for unmatched exchange shapes, instead of `unsupported mesh instruction or EXEC state: <op>`. d. VCC branch on a wave-uniform compare (`v_cmp_*` into VCC followed by `s_cbranch_vccz`/`vccnz`, refused today at `mesh VCC branch lacks a proven guest whole-wave mask`). On main `0614f68c`, the shader cache of a start-up run of about 6 minutes (carried over from earlier runs) holds 543 slot 57 requests, all with a `gfx2hlsl.py` `.fail`; the run refused 1,923,473 indirect `DispatchMesh` commands (graphics-pipeline bucket). Overlap: draft #3413 (SimSalabimse) derives Mesh57 state at run time for one allocation shape and touches `native_mesh57.inl` and `docs/experiments/native-fixed-mesh57.md`; (b) stays offline and does not touch them. #3409, #3063 and #3415 also edit `compile_dxil.cpp`, in other lines of `compile_one` and in `read_captured_views`; my #3403 only in the watch functions. No open PR touches `gfx1013_direct_mesh.inl`. @tedin7 if your fork fixtures for the inner execz/vccz and SCC-of-mask shapes are source-built, I can port them as controls and credit you.
Leyukaka commented 2026-11-29 05:03:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T05:03:38Z.


Status of the 11-28 23:56 plan: (a) #3418, (c) #3420, (d) #3423 and the item 2 control #3422 are open, none reviewed yet. (b), mesh root inputs from the creation root signature, is written on top of #3418 and has no PR yet; it waits on #3418.
Correction to the overlap note: (b) adds one paragraph to docs/experiments/native-fixed-mesh57.md, which draft #3413 also edits. It does not touch native_mesh57.inl.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7251024502 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7251024502). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T05:03:38Z. --- Status of the 11-28 23:56 plan: (a) #3418, (c) #3420, (d) #3423 and the item 2 control #3422 are open, none reviewed yet. (b), mesh root inputs from the creation root signature, is written on top of #3418 and has no PR yet; it waits on #3418. Correction to the overlap note: (b) adds one paragraph to `docs/experiments/native-fixed-mesh57.md`, which draft #3413 also edits. It does not touch `native_mesh57.inl`.
Leyukaka commented 2026-11-29 09:19:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T09:19:40Z.


Update to my status above: (a) #3418, (c) #3420, (d) #3423 and the item 2 change #3422 are merged (main 1a0120ba). (b), mesh root inputs from the creation root signature, is committed locally on 1a0120ba and has no PR yet. The slot 57 mesh work is tracked in #3416.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7253688783 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7253688783). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T09:19:40Z. --- Update to my status above: (a) #3418, (c) #3420, (d) #3423 and the item 2 change #3422 are merged (`main` `1a0120ba`). (b), mesh root inputs from the creation root signature, is committed locally on `1a0120ba` and has no PR yet. The slot 57 mesh work is tracked in #3416.
Kawiu commented 2026-11-29 21:38:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Kawiu on 2026-11-29T21:38:21Z.


Taking one small item on the native C++ frontend (src/gfx1013_direct_mesh.inl): v_sub_nc_u32.

On main ff9dcef0 the compute ALU table has it, but the mesh frontend's accepted list has v_add_nc_u32 without it, so a mesh program using it is refused as unsupported mesh instruction or EXEC state.

Plan: one PR with a source-built positive case, WARP readback and a negative control. Forms I do not cover stay refused. If someone already has this in progress, I'll step back.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7263033701 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7263033701). Originally posted by [Kawiu](https://github.com/Kawiu) on 2026-11-29T21:38:21Z. --- Taking one small item on the native C++ frontend (`src/gfx1013_direct_mesh.inl`): `v_sub_nc_u32`. On `main` `ff9dcef0` the compute ALU table has it, but the mesh frontend's accepted list has `v_add_nc_u32` without it, so a mesh program using it is refused as `unsupported mesh instruction or EXEC state`. Plan: one PR with a source-built positive case, WARP readback and a negative control. Forms I do not cover stay refused. If someone already has this in progress, I'll step back. AI-assisted.
lambirou commented 2026-11-30 01:56:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-30T01:56:49Z.


R1 runtime acceptance is now in PR #3531 (branch fix/mesh57-runtime, based on 47c30feb).

What it adds:

  • the source-built slot 57 runtime fixture: GPU-written DispatchMesh(1,1,1), producer fence, 4/12 counts, two root constants and one raw SRV;
  • 1,024 pixels compared with the CPU rasteriser;
  • missing and truncated MS/PS bytecode controls (target stays cleared, 0 forwarded mesh calls, argument guards intact);
  • a reviewed buffer-view fallback that uses the publisher's .ms57.cso / .ps57.cso pair when the native frontend still refuses the R1 group-index exchange (0xbefe0481);
  • the fixture root is created from the exact published root blob, and mesh pipelines no longer receive the vertex rectangle-list selector in cbuffer (it shifted both root constants by one word and produced a black target).

Local results on the Release build:

adapter compiled pair missing/truncated
WARP (Microsoft Basic Render Driver) 1,024 pixels matched, dispatchmesh 1 cleared, 0 forwarded, guards intact
AMD Radeon RX 9060 XT 1,024 pixels matched, dispatchmesh 1 cleared, 0 forwarded, guards intact

startup_mesh57_skeleton_draw, startup_mesh57_skeleton_exchange, native_fixed_mesh57_buffers and native_fixed_mesh57_constant also pass on both adapters. The debug layer is unavailable on both local adapters, so I cannot claim zero debug-layer messages; no validation errors were printed. CI on #3531 is green.

PR: https://github.com/R0Y00/Xbox2Windows/pull/3531

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7266574538 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7266574538). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-30T01:56:49Z. --- R1 runtime acceptance is now in PR #3531 (branch `fix/mesh57-runtime`, based on `47c30feb`). What it adds: - the source-built slot 57 runtime fixture: GPU-written `DispatchMesh(1,1,1)`, producer fence, 4/12 counts, two root constants and one raw SRV; - 1,024 pixels compared with the CPU rasteriser; - missing and truncated MS/PS bytecode controls (target stays cleared, 0 forwarded mesh calls, argument guards intact); - a reviewed buffer-view fallback that uses the publisher's `.ms57.cso` / `.ps57.cso` pair when the native frontend still refuses the R1 group-index exchange (`0xbefe0481`); - the fixture root is created from the exact published root blob, and mesh pipelines no longer receive the vertex rectangle-list selector in `cbuffer` (it shifted both root constants by one word and produced a black target). Local results on the Release build: | adapter | compiled pair | missing/truncated | |---|---|---| | WARP (Microsoft Basic Render Driver) | 1,024 pixels matched, `dispatchmesh 1` | cleared, 0 forwarded, guards intact | | AMD Radeon RX 9060 XT | 1,024 pixels matched, `dispatchmesh 1` | cleared, 0 forwarded, guards intact | `startup_mesh57_skeleton_draw`, `startup_mesh57_skeleton_exchange`, `native_fixed_mesh57_buffers` and `native_fixed_mesh57_constant` also pass on both adapters. The debug layer is unavailable on both local adapters, so I cannot claim zero debug-layer messages; no validation errors were printed. CI on #3531 is green. PR: https://github.com/R0Y00/Xbox2Windows/pull/3531
lambirou commented 2026-11-30 02:10:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-30T02:10:58Z.


Native refusal census on the cached requests (compile_dxil --refusals, cache out/startup/shader_cache):

family examined refused no refusal
graphics .a / .rtv 674 662 12
compute .c67 2,718 1,890 828
mesh57 .m57 476 476 0
total 3,868 3,028 840

All 476 mesh57 requests stop at mesh request has no entry layout. The cache contains no .mslayout and no .mesh57-state profile, so this is a layout gap before the mesh frontend reaches the group-index shape.

Weighting needs care. The long UI run gta6-long-20261130-1 has 7,995 compute dispatches, all translated, and its indirect counters are zero including dispatchmesh. The 2026-11-28 run reached refused graphics-pipeline ... dispatchmesh 1449772; I attach that aggregate once to the 476-request layout class, not per key. It cannot distinguish slot57 from slot86.

The Python watcher still exposes 422 of the 476 mesh requests: 314 s_cbranch_execz, 69 readfirstlane, 20 group-index exchange, 14 loop, 5 count exchange. These are not native first refusals until layouts exist. The cache also has 3,534 .fail files versus 3,028 current native refusals, so stale .fail entries must not be counted as current blockers.

Proposed next fixture: a source-built 128-thread wave64 triangle with mesh1 128 3 1 2 128 64 + guest_root, two root constants and one root SRV, plus pixel entry 0x8002/0x8002/64 split as the existing 12-byte .ps57in (PSI1, enable, address) and meshps1 32770 32770 64 in .pslayout. Compile the MS and PS as two explicit outputs; acceptance is that --refusals moves past no entry layout to a named next refusal or no refusal.

The census did not modify tracked files.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7266777777 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7266777777). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-30T02:10:58Z. --- Native refusal census on the cached requests (`compile_dxil --refusals`, cache `out/startup/shader_cache`): | family | examined | refused | no refusal | |---|---:|---:|---:| | graphics `.a` / `.rtv` | 674 | 662 | 12 | | compute `.c67` | 2,718 | 1,890 | 828 | | mesh57 `.m57` | 476 | 476 | 0 | | total | 3,868 | 3,028 | 840 | All 476 mesh57 requests stop at `mesh request has no entry layout`. The cache contains no `.mslayout` and no `.mesh57-state` profile, so this is a layout gap before the mesh frontend reaches the group-index shape. Weighting needs care. The long UI run `gta6-long-20261130-1` has 7,995 compute dispatches, all translated, and its indirect counters are zero including `dispatchmesh`. The 2026-11-28 run reached `refused graphics-pipeline ... dispatchmesh 1449772`; I attach that aggregate once to the 476-request layout class, not per key. It cannot distinguish slot57 from slot86. The Python watcher still exposes 422 of the 476 mesh requests: 314 `s_cbranch_execz`, 69 `readfirstlane`, 20 group-index exchange, 14 loop, 5 count exchange. These are not native first refusals until layouts exist. The cache also has 3,534 `.fail` files versus 3,028 current native refusals, so stale `.fail` entries must not be counted as current blockers. Proposed next fixture: a source-built 128-thread wave64 triangle with `mesh1 128 3 1 2 128 64` + `guest_root`, two root constants and one root SRV, plus pixel entry `0x8002/0x8002/64` split as the existing 12-byte `.ps57in` (`PSI1`, enable, address) and `meshps1 32770 32770 64` in `.pslayout`. Compile the MS and PS as two explicit outputs; acceptance is that `--refusals` moves past `no entry layout` to a named next refusal or no refusal. The census did not modify tracked files.
lambirou commented 2026-11-30 02:48:56 +00:00 (Migrated from github.com)
Author
Contributor

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


The title now reaches the mesh phase. Run gta6-long2-20261130-1 (620 s, 12,835 frames at 21 fps, no crash) passes the legal pages, shows the opening credits, and records:

outcome count
dispatchmesh refused, graphics/no_translation 343,423
dispatchmesh refused, graphics/mesh_profile_missing 777,562
total blocked mesh dispatches 1,120,985
.m57 requests in the cache 478
.ms57.cso / .mesh57-state 0 / 0

So the presentation path is no longer the blocker for this phase: the title submits over a million mesh dispatches, but every request lacks a translated pair/profile. A second run with X2W_MESH57_CAPTURE_STATE=1 and a separate cache is capturing .s57 creation archives so the fixed-state profile can be derived.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7267341811 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7267341811). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-30T02:48:56Z. --- The title now reaches the mesh phase. Run `gta6-long2-20261130-1` (620 s, 12,835 frames at 21 fps, no crash) passes the legal pages, shows the opening credits, and records: | outcome | count | |---|---:| | `dispatchmesh` refused, `graphics/no_translation` | 343,423 | | `dispatchmesh` refused, `graphics/mesh_profile_missing` | 777,562 | | total blocked mesh dispatches | **1,120,985** | | `.m57` requests in the cache | 478 | | `.ms57.cso` / `.mesh57-state` | 0 / 0 | So the presentation path is no longer the blocker for this phase: the title submits over a million mesh dispatches, but every request lacks a translated pair/profile. A second run with `X2W_MESH57_CAPTURE_STATE=1` and a separate cache is capturing `.s57` creation archives so the fixed-state profile can be derived.
lambirou commented 2026-11-30 03:03:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-30T03:03:53Z.


Capture follow-up for the mesh phase:

  • gta6-meshstate-20261130-1 produced 452 .s57 archives for 449 .m57 requests, with 0 .mesh57-state and 0 .ms57.cso.
  • Last mesh counters before the stop: 874,171 dispatchmesh refusals (248,260 graphics/no_translation + 625,911 graphics/mesh_profile_missing), 4,864 frames at 7.6 fps.
  • The run then stopped at XboxBvhBuilder.dll+0x1cef4, second-chance access violation after 643.94 s. This is a separate BVH-builder crash, not a presentation failure.

Compiler progress on the captured requests: the count clamp in PR #3537 moves one real request past mesh count exchange exceeds declared range or lacks an unsigned bound. It now stops at graphics register undefined on an incoming path: 265. The next runtime slice is to decode the .s57 state A/B into a reviewed Mesh57Profile; the BVH crash needs its own investigation.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7267553974 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7267553974). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-30T03:03:53Z. --- Capture follow-up for the mesh phase: - `gta6-meshstate-20261130-1` produced **452 `.s57`** archives for **449 `.m57`** requests, with **0 `.mesh57-state`** and **0 `.ms57.cso`**. - Last mesh counters before the stop: **874,171** `dispatchmesh` refusals (248,260 `graphics/no_translation` + 625,911 `graphics/mesh_profile_missing`), 4,864 frames at 7.6 fps. - The run then stopped at **`XboxBvhBuilder.dll+0x1cef4`**, second-chance access violation after 643.94 s. This is a separate BVH-builder crash, not a presentation failure. Compiler progress on the captured requests: the count clamp in PR #3537 moves one real request past `mesh count exchange exceeds declared range or lacks an unsigned bound`. It now stops at `graphics register undefined on an incoming path: 265`. The next runtime slice is to decode the `.s57` state A/B into a reviewed `Mesh57Profile`; the BVH crash needs its own investigation.
lukaslw-lab commented 2026-11-30 13:29:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-30T13:29:38Z.


Claim (#3416): GPU-selected resource-heap slot in the slot 57 mesh frontend. Today the frontend accepts only a heap slot built from a masked root constant, and refuses mesh heap slot lacks masked root constant provenance otherwise. In the title, the slot is read from a buffer: s_buffer_load_dword → s_lshl_b32 5 → s_load_dwordx4 from the resource heap. By refused calls in a 360 s native run, this is the largest C++ refusal among the top slot 57 variants (1.13 M, weighted list on #3416).

The plan is to bind the selected slot through a verified view check like #3593 and #3599 on slot 86. A slot that is stale, empty or of the wrong type reads as a typed null. I'll start with a source-built mesh fixture. Two buffer-selected indices give two different pixels. The negative controls are a stale slot and a wrong-type slot, both of which read as null.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7279924784 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7279924784). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-30T13:29:38Z. --- Claim (#3416): **GPU-selected resource-heap slot in the slot 57 mesh frontend.** Today the frontend accepts only a heap slot built from a masked root constant, and refuses `mesh heap slot lacks masked root constant provenance` otherwise. In the title, the slot is read from a buffer: `s_buffer_load_dword` → `s_lshl_b32 5` → `s_load_dwordx4` from the resource heap. By refused calls in a 360 s native run, this is the largest C++ refusal among the top slot 57 variants (1.13 M, weighted list on #3416). The plan is to bind the selected slot through a verified view check like #3593 and #3599 on slot 86. A slot that is stale, empty or of the wrong type reads as a typed null. I'll start with a source-built mesh fixture. Two buffer-selected indices give two different pixels. The negative controls are a stale slot and a wrong-type slot, both of which read as null.
mumba17 commented 2026-11-30 17:07:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T17:07:49Z.


Claim (#3416 row mesh EXEC write inside a lane-skip block, listed free): scalar work between a lane diamond's join and its EXEC restore.

In f2b3d808 and 2319d05e, the compiler places EXEC-independent scalar instructions (SMEM loads, SALU, s_waitcnt, s_clause) between the join of a signed-CMPX if/else and the s_mov_b64 exec, <saved> that closes it. The frontend accepts the restore only at the join itself, so it refuses. Those instructions run once per wave whatever EXEC holds, so the restore still closes the diamond. The plan is to accept it when every instruction in the gap leaves EXEC, VCC and control flow alone, no other path arrives in the gap, and the restore still names the open skip's guard. This is the same idea #2900 applied to compute.

Local census (compile_dxil --refusals, 454 cached .m57 requests, layout from #3416): this refusal drops from 63 requests to 8. The 55 that move on stop at later refusals, mostly unsupported instructions (v_fma_mixlo_f16 15, v_sqrt_f32 +8, v_fmamk_f32 5, v_cvt_f16_f32 5). Not covered: the 8 left include an else arm that merges lanes after a large then-arm. That needs lane-merge support, not this change.

PR with a source-built positive case and negative controls (an EXEC/VCC write, a branch, and a saved-mask overwrite in the gap) to follow tonight.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7285764858 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7285764858). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T17:07:49Z. --- Claim (#3416 row `mesh EXEC write inside a lane-skip block`, listed free): **scalar work between a lane diamond's join and its EXEC restore.** In `f2b3d808` and `2319d05e`, the compiler places EXEC-independent scalar instructions (SMEM loads, SALU, `s_waitcnt`, `s_clause`) between the join of a signed-CMPX if/else and the `s_mov_b64 exec, <saved>` that closes it. The frontend accepts the restore only at the join itself, so it refuses. Those instructions run once per wave whatever EXEC holds, so the restore still closes the diamond. The plan is to accept it when every instruction in the gap leaves EXEC, VCC and control flow alone, no other path arrives in the gap, and the restore still names the open skip's guard. This is the same idea #2900 applied to compute. Local census (`compile_dxil --refusals`, 454 cached `.m57` requests, layout from #3416): this refusal drops from 63 requests to 8. The 55 that move on stop at later refusals, mostly unsupported instructions (`v_fma_mixlo_f16` 15, `v_sqrt_f32` +8, `v_fmamk_f32` 5, `v_cvt_f16_f32` 5). Not covered: the 8 left include an else arm that merges lanes after a large then-arm. That needs lane-merge support, not this change. PR with a source-built positive case and negative controls (an EXEC/VCC write, a branch, and a saved-mask overwrite in the gap) to follow tonight.
lukaslw-lab commented 2026-11-30 17:37:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-30T17:37:27Z.


Scope update for my claim above (GPU-selected heap slot in slot 57 mesh programs): I'm keeping the translator part, #3619, and releasing the runtime binding. Whoever takes the binding should build it on @JB2WIN's stage 3 runtime design on #3023, not on a per-draw heap copy. A local prototype of that per-draw approach shows why it fails:

  • Heap size. The title binds one shader-visible view heap of 1,245,184 descriptors (CreateDescriptorHeap type=0 count=1245184, 38 MB of title memory). JB2WIN measured the same heap: about 15.5 k token slots, and one full scan costs 10–13 ms. The prototype snapshots the bound heap's token words for each draw. It passes a 512-slot source-built fixture but cannot scale to this heap.
  • No GPU backing. The heap memory is plain title memory, not a placed GPU resource. The shader therefore needs the raw view over that memory that JB2WIN outlined.

What #3619's guard needs from the runtime:

  • that raw view over the bound heap's memory (token SRV);
  • one R32_UINT typed buffer view per registered view id;
  • kind 16 for those ids in the per-id table;
  • b1 = base, count and null slot, plus the miss counter at u0.

The mesh draw then only binds those. The prototype has a source-built fixture for the binding: a selector read from a table buffer, with R32_FLOAT, empty and out-of-range slots reading the null view and counting misses. I can push it to my fork for whoever takes this.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7286597811 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7286597811). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-30T17:37:27Z. --- Scope update for my claim above (GPU-selected heap slot in slot 57 mesh programs): I'm keeping the translator part, #3619, and releasing the runtime binding. Whoever takes the binding should build it on @JB2WIN's [stage 3 runtime design on #3023](https://github.com/R0Y00/Xbox2Windows/issues/3023#issuecomment-7257080862), not on a per-draw heap copy. A local prototype of that per-draw approach shows why it fails: - **Heap size.** The title binds one shader-visible view heap of 1,245,184 descriptors (`CreateDescriptorHeap type=0 count=1245184`, 38 MB of title memory). JB2WIN measured the same heap: about 15.5 k token slots, and one full scan costs 10–13 ms. The prototype snapshots the bound heap's token words for each draw. It passes a 512-slot source-built fixture but cannot scale to this heap. - **No GPU backing.** The heap memory is plain title memory, not a placed GPU resource. The shader therefore needs the raw view over that memory that JB2WIN outlined. What #3619's guard needs from the runtime: - that raw view over the bound heap's memory (token SRV); - one R32_UINT typed buffer view per registered view id; - kind 16 for those ids in the per-id table; - `b1` = base, count and null slot, plus the miss counter at `u0`. The mesh draw then only binds those. The prototype has a source-built fixture for the binding: a selector read from a table buffer, with R32_FLOAT, empty and out-of-range slots reading the null view and counting misses. I can push it to my fork for whoever takes this.
mumba17 commented 2026-11-30 18:21:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T18:21:34Z.


PR for the claim above: #3633. This refusal drops from 63 to 8 of 454 cached slot 57 requests. The 8 left need lane-merge support (described in the PR).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7287733348 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7287733348). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T18:21:34Z. --- PR for the claim above: #3633. This refusal drops from 63 to 8 of 454 cached slot 57 requests. The 8 left need lane-merge support (described in the PR).
mumba17 commented 2026-11-30 18:35:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T18:35:54Z.


Claim: s_movk_i32 and s_xor_b32 in the C++ mesh frontend (src/gfx1013_direct_mesh.inl). Both are refused as unsupported mesh instruction or EXEC state.

Local census (compile_dxil --refusals, 454 cached slot 57 requests, #3416 layout, with #3633 applied): each is the first refusal for 41 requests, together the third and fourth largest reasons. s_xor_b32 joins the existing SOP2 s_or_b32/s_and_b32 route, with SCC from the result. s_movk_i32 writes its sign-extended 16-bit immediate. Writes to EXEC or VCC stay refused.

PR with a source-built positive case per instruction, a readback-relevant output check and negative controls (a VCC/EXEC destination) to follow tonight. Re-census numbers in the PR.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7288086090 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7288086090). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T18:35:54Z. --- Claim: **`s_movk_i32` and `s_xor_b32` in the C++ mesh frontend** (`src/gfx1013_direct_mesh.inl`). Both are refused as `unsupported mesh instruction or EXEC state`. Local census (`compile_dxil --refusals`, 454 cached slot 57 requests, #3416 layout, with #3633 applied): each is the first refusal for 41 requests, together the third and fourth largest reasons. `s_xor_b32` joins the existing SOP2 `s_or_b32`/`s_and_b32` route, with SCC from the result. `s_movk_i32` writes its sign-extended 16-bit immediate. Writes to EXEC or VCC stay refused. PR with a source-built positive case per instruction, a readback-relevant output check and negative controls (a VCC/EXEC destination) to follow tonight. Re-census numbers in the PR.
mumba17 commented 2026-11-30 18:53:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T18:53:27Z.


PR for the s_movk_i32 / s_xor_b32 claim above: #3635. Neither refusal is left in the 454 cached slot 57 requests; those requests now stop at later refusals (mainly s_and_saveexec_b64 and v_bfm_b32).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7288521583 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7288521583). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T18:53:27Z. --- PR for the `s_movk_i32` / `s_xor_b32` claim above: #3635. Neither refusal is left in the 454 cached slot 57 requests; those requests now stop at later refusals (mainly `s_and_saveexec_b64` and `v_bfm_b32`).
mumba17 commented 2026-11-30 19:24:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T19:24:28Z.


Claim: s_and_saveexec_b64 inside a lane-skip block in the C++ mesh frontend (src/gfx1013_direct_mesh.inl).

The handler from #3638 covers s_and_saveexec_b64 outside a lane skip. Inside one, the instruction is still refused as unsupported mesh instruction or EXEC state: s_and_saveexec_b64. On main a0e126c2 that is the first refusal for 47 of the 454 cached slot 57 requests.

All 47 have the same if/else shape: the saveexec opens a then arm guarded by EXECZ, and s_andn2_b64 exec, <saved>, exec opens the else arm.

  • In 42 of them the else arm only writes VGPRs. It ends where the enclosing lane skip ends, and full EXEC is restored there.
  • The other 5 use a paired EXECZ with s_mov_b64 exec, <saved>, the shape the existing s_and_b64 diamond already handles.

Plan: open a lane diamond from the saveexec in both shapes.

  • The then arm may not write EXEC or the saved mask, and may not contain exports, LDS, barriers, s_sendmsg or branches that leave the arm.
  • The else arm must be vector-only, and may not read any SGPR the then arm writes.
  • Fail closed otherwise. Source-built positive cases and negative controls, per #870.

PR to follow tonight.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7289341190 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7289341190). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T19:24:28Z. --- Claim: **`s_and_saveexec_b64` inside a lane-skip block** in the C++ mesh frontend (`src/gfx1013_direct_mesh.inl`). The handler from #3638 covers `s_and_saveexec_b64` outside a lane skip. Inside one, the instruction is still refused as `unsupported mesh instruction or EXEC state: s_and_saveexec_b64`. On main `a0e126c2` that is the first refusal for 47 of the 454 cached slot 57 requests. All 47 have the same if/else shape: the saveexec opens a then arm guarded by EXECZ, and `s_andn2_b64 exec, <saved>, exec` opens the else arm. - In 42 of them the else arm only writes VGPRs. It ends where the enclosing lane skip ends, and full EXEC is restored there. - The other 5 use a paired EXECZ with `s_mov_b64 exec, <saved>`, the shape the existing `s_and_b64` diamond already handles. Plan: open a lane diamond from the saveexec in both shapes. - The then arm may not write EXEC or the saved mask, and may not contain exports, LDS, barriers, `s_sendmsg` or branches that leave the arm. - The else arm must be vector-only, and may not read any SGPR the then arm writes. - Fail closed otherwise. Source-built positive cases and negative controls, per #870. PR to follow tonight.
mumba17 commented 2026-11-30 20:37:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T20:37:40Z.


PR for the in-skip s_and_saveexec_b64 claim above: #3645. 41 of the 47 requests now get past the SAVEEXEC and stop at s_xor_b32 (#3635). The other 6 are refused by name because their then arm depends on EXEC (a nested CMPX/EXECZ).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7291223804 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7291223804). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T20:37:40Z. --- PR for the in-skip `s_and_saveexec_b64` claim above: #3645. 41 of the 47 requests now get past the SAVEEXEC and stop at `s_xor_b32` (#3635). The other 6 are refused by name because their then arm depends on EXEC (a nested CMPX/EXECZ).
mumba17 commented 2026-11-30 21:59:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T21:59:22Z.


Claim + PR: v_bfm_b32 and v_bcnt_u32_b32 in the C++ mesh frontend, #3655. The shared ALU already lowers both; the mesh vector ALU list now admits them. With #3635/#3645/#3646 applied, v_bfm_b32 was the first refusal for 40 of the 454 cached slot 57 requests. All 40 now get past both instructions; 19 stop next at unsupported mesh SAVEEXEC operands.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7293187485 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7293187485). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T21:59:22Z. --- Claim + PR: **`v_bfm_b32` and `v_bcnt_u32_b32` in the C++ mesh frontend**, #3655. The shared ALU already lowers both; the mesh vector ALU list now admits them. With #3635/#3645/#3646 applied, `v_bfm_b32` was the first refusal for 40 of the 454 cached slot 57 requests. All 40 now get past both instructions; 19 stop next at `unsupported mesh SAVEEXEC operands`.
Kawiu commented 2026-11-30 22:27:44 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Kawiu on 2026-11-30T22:27:44Z.


Native mesh frontend census of captured slot 57 requests, with the open mesh PRs stacked

Counts only, from one local capture. No runtime draw is claimed.

Input. The capture holds 392 distinct slot 57 requests (req_*.m57 + .ps57 + .root), copied to a separate directory. All of them use a guest root, and none has a reviewed .mesh57-state.

Command. Read-only:

compile_dxil --refusals <dir> --mesh-layout <layout> --jobs 8

The caller layout is generic, not reviewed:

mesh1 128 128 128 2 128 64
validate_uint_heap_reads
guest_root

Without validate_uint_heap_reads, 319 of the 392 requests stop at direct resource-heap load requires the selected GPU slot and its view type. The runtime sets that option for direct-heap profiles, so the counts below include it.

Requests with no recorded refusal

Build Default X2W_MESH57_PARTIAL_ZERO=1
main d5970858 0 93
+ #3635 only — 93
+ #3655 only — 93
+ #3645 only — 93
+ #3635 + #3655 + #3645 (merged cleanly) 0 127

Each PR alone moves no request to completion. Together they add 34. With the stacked build and the opt-in, compile_dxil <sdk> <cache> gfx1013-raw-ms wrote a DXIL module for all 127. On the largest one, dxc -dumpbin shows a mesh entry with NumThreads=(128,1,1), MeshOutputTopology, setMeshOutputCounts, storeVertexOutput and emitIndices. I did not run a separate validator pass.

First refusals, stacked build + X2W_MESH57_PARTIAL_ZERO=1 (265 refused)

Count Reason
73 unsupported mesh instruction or EXEC state: v_readfirstlane_b32
50 mesh heap slot lacks masked root constant provenance
46 unsupported mesh heap descriptor address
19 unsupported mesh SAVEEXEC operands
10 unsupported mesh instruction or EXEC state: v_cvt_f16_f32
8 mesh EXEC write inside a lane-skip block
7 unsupported mesh instruction or EXEC state: v_cmpx_eq_i32
6 mesh SAVEEXEC then arm depends on EXEC
6 unsupported mesh instruction or EXEC state: v_cmpx_lt_f32
5 mesh SAVEEXEC then arm lacks an EXECZ skip
5 unmapped mesh export target 13
3 s_not_b64, 3 v_fmamk_f32, 2 mesh signed CMPX requires paired EXECZ arms, smaller entry-register refusals

Without the opt-in, about 150 requests stop at graphics register undefined on an incoming path: N.

Runtime side, same capture. native slot57 preparation reports profile_absent 10726, ps_absent 1336, ready 0. A split of the unsupported_stage_or_descriptor bucket (13,388 creations) shows that all of them are slot 57 creations with a vertex stage, not mesh pipelines.

Caveats.

  • The layout is generic. A reviewed profile can change the result, for example through the vertex and primitive maxima or the root mapping.
  • X2W_MESH57_PARTIAL_ZERO is the documented heuristic, not a reviewed semantic.
  • The Python gfx2hlsl.py translate_mesh57 census on the same requests is unrelated to the counts above. The runtime prepares slot 57 through the native frontend.

AMD Radeon host, Windows 11 build 26300.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7293877892 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7293877892). Originally posted by [Kawiu](https://github.com/Kawiu) on 2026-11-30T22:27:44Z. --- ## Native mesh frontend census of captured slot 57 requests, with the open mesh PRs stacked Counts only, from one local capture. No runtime draw is claimed. **Input.** The capture holds 392 distinct slot 57 requests (`req_*.m57` + `.ps57` + `.root`), copied to a separate directory. All of them use a guest root, and none has a reviewed `.mesh57-state`. **Command.** Read-only: ``` compile_dxil --refusals <dir> --mesh-layout <layout> --jobs 8 ``` The caller layout is generic, not reviewed: ``` mesh1 128 128 128 2 128 64 validate_uint_heap_reads guest_root ``` Without `validate_uint_heap_reads`, 319 of the 392 requests stop at `direct resource-heap load requires the selected GPU slot and its view type`. The runtime sets that option for direct-heap profiles, so the counts below include it. **Requests with no recorded refusal** | Build | Default | `X2W_MESH57_PARTIAL_ZERO=1` | |---|---:|---:| | main `d5970858` | 0 | 93 | | + #3635 only | — | 93 | | + #3655 only | — | 93 | | + #3645 only | — | 93 | | + #3635 + #3655 + #3645 (merged cleanly) | 0 | **127** | Each PR alone moves no request to completion. Together they add 34. With the stacked build and the opt-in, `compile_dxil <sdk> <cache> gfx1013-raw-ms` wrote a DXIL module for all 127. On the largest one, `dxc -dumpbin` shows a mesh entry with `NumThreads=(128,1,1)`, `MeshOutputTopology`, `setMeshOutputCounts`, `storeVertexOutput` and `emitIndices`. I did not run a separate validator pass. **First refusals, stacked build + `X2W_MESH57_PARTIAL_ZERO=1`** (265 refused) | Count | Reason | |---:|---| | 73 | `unsupported mesh instruction or EXEC state: v_readfirstlane_b32` | | 50 | `mesh heap slot lacks masked root constant provenance` | | 46 | `unsupported mesh heap descriptor address` | | 19 | `unsupported mesh SAVEEXEC operands` | | 10 | `unsupported mesh instruction or EXEC state: v_cvt_f16_f32` | | 8 | `mesh EXEC write inside a lane-skip block` | | 7 | `unsupported mesh instruction or EXEC state: v_cmpx_eq_i32` | | 6 | `mesh SAVEEXEC then arm depends on EXEC` | | 6 | `unsupported mesh instruction or EXEC state: v_cmpx_lt_f32` | | 5 | `mesh SAVEEXEC then arm lacks an EXECZ skip` | | 5 | `unmapped mesh export target 13` | | 3 | `s_not_b64`, 3 `v_fmamk_f32`, 2 `mesh signed CMPX requires paired EXECZ arms`, smaller entry-register refusals | Without the opt-in, about 150 requests stop at `graphics register undefined on an incoming path: N`. **Runtime side, same capture.** `native slot57 preparation` reports `profile_absent 10726`, `ps_absent 1336`, `ready 0`. A split of the `unsupported_stage_or_descriptor` bucket (13,388 creations) shows that all of them are slot 57 creations with a vertex stage, not mesh pipelines. **Caveats.** - The layout is generic. A reviewed profile can change the result, for example through the vertex and primitive maxima or the root mapping. - `X2W_MESH57_PARTIAL_ZERO` is the documented heuristic, not a reviewed semantic. - The Python `gfx2hlsl.py` `translate_mesh57` census on the same requests is unrelated to the counts above. The runtime prepares slot 57 through the native frontend. AMD Radeon host, Windows 11 build 26300.
mumba17 commented 2026-11-30 22:51:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T22:51:33Z.


Claim + PR: in-skip s_and_saveexec_b64 with a VCC mask, the if-without-else form, and then-arm VCC writes in the C++ mesh frontend, #3668 (stacked on #3645). This was the first refusal for 19 of the 454 cached slot 57 requests. All 19 now get past it; 18 stop next at a SAVEEXEC nested in the then arm.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7294395475 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7294395475). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T22:51:33Z. --- Claim + PR: **in-skip `s_and_saveexec_b64` with a VCC mask, the if-without-else form, and then-arm VCC writes** in the C++ mesh frontend, #3668 (stacked on #3645). This was the first refusal for 19 of the 454 cached slot 57 requests. All 19 now get past it; 18 stop next at a SAVEEXEC nested in the then arm.
mumba17 commented 2026-11-30 22:55:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T22:55:27Z.


Claim: graphics register undefined on an incoming path: N in the C++ mesh frontend (src/gfx1013_direct_mesh.inl). With the open mesh PRs stacked, this is the first refusal for about 150 of the 454 cached slot 57 requests. It is also the class @Kawiu's census shows X2W_MESH57_PARTIAL_ZERO=1 hiding.

All of them share one shape:

  1. The vertex section writes the position sources under v_cmpx_gt_u32 sV, v0 and EXECZ.
  2. s_mov_b64 exec, -1 erases those partial VGPRs.
  3. The count exchange runs.
  4. The export reads them under v_cmpx_gt_i32 sG, v0.

In every case sG = s_cselect_b32 0, sV, so the export lanes are a subset of the defining lanes. The plan is to replace the erase with a proof rather than the zero fill:

  • keep a partial VGPR across the full-EXEC reset when its value carries a proven lane limit;
  • accept the export read only when the reading guard is that same limit, or provably bounded by it (select(c, 0, V) with V group-uniform);
  • keep refusing every other read.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7294482863 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7294482863). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T22:55:27Z. --- Claim: **`graphics register undefined on an incoming path: N`** in the C++ mesh frontend (`src/gfx1013_direct_mesh.inl`). With the open mesh PRs stacked, this is the first refusal for about 150 of the 454 cached slot 57 requests. It is also the class @Kawiu's census shows `X2W_MESH57_PARTIAL_ZERO=1` hiding. All of them share one shape: 1. The vertex section writes the position sources under `v_cmpx_gt_u32 sV, v0` and EXECZ. 2. `s_mov_b64 exec, -1` erases those partial VGPRs. 3. The count exchange runs. 4. The export reads them under `v_cmpx_gt_i32 sG, v0`. In every case `sG = s_cselect_b32 0, sV`, so the export lanes are a subset of the defining lanes. The plan is to replace the erase with a proof rather than the zero fill: - keep a partial VGPR across the full-EXEC reset when its value carries a proven lane limit; - accept the export read only when the reading guard is that same limit, or provably bounded by it (`select(c, 0, V)` with V group-uniform); - keep refusing every other read.
mumba17 commented 2026-11-30 23:38:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-11-30T23:38:51Z.


PR for the graphics register undefined on an incoming path claim above: #3671. None of the 152 requests stops at it any more, and 143 of them get further. Most now stop at the primitive export reading vertex-section VGPRs under the primitive count. Nothing proves that count is at most V, so that refusal stays.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7295366429 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7295366429). Originally posted by [mumba17](https://github.com/mumba17) on 2026-11-30T23:38:51Z. --- PR for the `graphics register undefined on an incoming path` claim above: #3671. None of the 152 requests stops at it any more, and 143 of them get further. Most now stop at the primitive export reading vertex-section VGPRs under the primitive count. Nothing proves that count is at most V, so that refusal stays.
SimSalabimse commented 2026-12-01 00:12:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T00:12:47Z.


Status on the derived slot 57 walk, draft #3660 (experimental, unproven stride, do not merge): a Windows game run no longer crashes, and native compute translation now reaches +0x374 and refuses at v_readfirstlane_b32 (it used to stop at v_add_co_ci_u32 +0x148). Still nothing drawn.

I'm now working on v_readfirstlane_b32 in the native mesh lowerer: a uniform source as a copy, WaveReadLaneFirst only with proven non-empty EXEC, everything else refused. Fork first, then a draft PR. If you're already on this, please say so and I'll leave it.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7296064841 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7296064841). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-01T00:12:47Z. --- Status on the derived slot 57 walk, draft #3660 (experimental, unproven stride, do not merge): a Windows game run no longer crashes, and native compute translation now reaches +0x374 and refuses at `v_readfirstlane_b32` (it used to stop at `v_add_co_ci_u32` +0x148). Still nothing drawn. I'm now working on `v_readfirstlane_b32` in the native mesh lowerer: a uniform source as a copy, `WaveReadLaneFirst` only with proven non-empty EXEC, everything else refused. Fork first, then a draft PR. If you're already on this, please say so and I'll leave it. AI-Assisted
Not-Saii commented 2026-12-01 19:34:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T19:34:28Z.


Findings: a profiled slot 57 pipeline now gets its DispatchMesh calls forwarded, but they launch zero groups. The passes that should fill the group counts are untranslated compute pipelines.

Base: #3730 (5132cbdb, stable descriptor key), plus local diagnostic commits on an unpushed branch, so this cannot be reproduced from a PR yet. RTX 4090, driver 610.88 (read after the runs), Windows 10.0.26300, debug layer off, 600 s runs with the usual input script, X2W_MESH57_PARTIAL_ZERO=1, and one reviewed local .mesh57-state profile (request 886c650f771e153f, variant f704523d0ccea7c0). One run per configuration; nothing here was repeated. Runs used X2W_SKIP_FAILED=1, X2W_MESH57_CAPTURE_STATE=1, native shaders, and run_preset.py --package <package root> --console s --gpu nvidia --set seconds=600; the switches each section adds are named there.

1. The profile loads. With #3730 the variant name is stable between runs. The runtime logs native slot57 mesh 886c650f771e153f ready, with no profile rejection, no lowering refusal and no pipeline refusal.

2. Binding. At first bind_mesh57_buffers refused every call (about 11,700 per run, graphics/mesh_bind). Logging the reason and the descriptor showed four separate blocks, one per MS read:

Read What it is Refusal Local change that binds it
0, 1 (root 1 + 64) view token for a committed buffer "an input buffer view token names a committed buffer" pass InputBufferUse::mesh86_material, as slot 86 does
2 (root SRV, root 3) address not in the upload ring, the placement index or the committed index "MS root SRV lacks a complete GPU-backed range" committed_root_srv, then a title snapshot
3 (root 1 + 128) placed buffer that does not alias title memory "an input is in a placed buffer that does not alias title memory" title snapshot into an upload allocation
4 (root 1 + 160) native descriptor with stride 16, 30 records and word 3 not the raw-buffer value "unsupported MS native byte buffer descriptor" accept any stride and word 3 for table reads; still refuse swizzle (word 1 bits 30–31)

Read 4 is only an s_buffer_load_dwordx16 at +0x160, and every table read is bound as a raw view, so stride and word 3 do not change what the HLSL reads. Stride × records (480 B) covers the 416 B read. Stride 0 would give 30 B, which does not.

With all four changes in place, 11,878 DispatchMesh calls were forwarded in 600 s at 29.2 fps, with no device removal. These are the first forwarded slot 57 dispatches I know of.

3. The global snapshot switch hung the device. With X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1 the device was removed at about 59 s (0x887a0006, DEVICE_HUNG). That run had no bind-pass counter, but it logged the same read-4 refusal as the later split run, in which no slot 57 dispatch passed binding. So slot 57 very likely did not reach the GPU there, and the hang most likely comes from the switch's compute Dispatch path, but this is not proven. A slot 57-only snapshot switch (local X2W_MESH57_SNAPSHOT) ran 600 s without a hang.

4. The forwarded dispatches launch zero groups. I sampled forwarded dispatches 1, 2, 5000 and 5001. For each, I copied RT0 and the DSV before and after, read the arguments back, and put a PIPELINE_STATISTICS1 query around the ExecuteIndirect:

  • The arguments the GPU read were 0 0 0.
  • Every MS, clipper and PS statistic was 0.
  • The target and depth stayed at their clear values.

So the empty output says nothing yet about the profile, the partial-zero MS or the pixel stage. The arguments in title memory also read 0 0 0 at record time, and the desktop argument buffer does not alias title memory, so the counts are most likely written by an earlier GPU pass.

5. The reset pass is behind X2W_COPIED_OBJECT_UAV. A watch on the argument records found one writer, a natively translated compute pipeline (3882fad2f0ec6197).

  • Without the switch, it is refused on exactly that buffer: "a whole copied output UAV requires X2W_COPIED_OBJECT_UAV".
  • With X2W_COPIED_OBJECT_UAV=1, it translates for all 156,355 dispatches, and the arguments become 0 1 1.
  • Its HLSL only stores uint4(0, 1, 1, 0) per 32-byte record. That is a reset: it never raises X.
  • With the switch, the frame rate fell from 29.2 to 8.7 fps. Samples at dispatches 2500 and 2501 still read 0 1 1, and every statistic was still 0.

6. The passes that raise X are not translated. No refused translated dispatch writes the records (table and heap UAV slots decoded; slots indexed through a word table, root UAVs and textures skipped). So I scanned the bound tables of dispatches refused before their slots were decoded: the first 2 KiB of every bound table, sampled at dispatches 1–8 and then every 256th. Ten compute pipelines that never translate have the exact argument buffer bound. Their guest code, disassembled with LLVM 15 (gfx1013, wave64):

Pipelines Dispatches Code Translator refusal
9a7a55be461871ed, f2bedebd26705bfc 44,218 each buffer_atomic_add 1 at scalar offset bucket × s5, then a buffer_store_format_xyzw payload at the returned index (append) "s_load of a resource heap record whose offset is not a root constant shifted left by 5 since the last branch target"
b9394023b5634ff2, edb7158619057cbd 7,422 each same pattern same
40f9b024bd53b629 3,711 buffer_atomic_add 1 at offset 0 or 32 "TG_SIZE_EN requires at most 32 threads per group"
five others stores only, or no buffer writes various

Reading: the four append shaders add one per object to a counter and write the object beside it. If that counter is field +0 of a 32-byte DispatchMesh record, this is what raises X above the reset value. All four stop at the same translator refusal. If the reading holds, the next block for slot 57 output is that refusal, not slot 57 itself.

Not proven:

  • that the descriptor these shaders atomically add into (table + 0x80) is the argument buffer at those dispatches; the scan only shows the buffer bound in the same table;
  • that s5 is 32;
  • that 40f9's writes land in these records;
  • that no other writer exists: the watch skips word-table-indexed slots, root UAVs and textures, and the table scan is sampled;
  • that X is not legitimately 0 in the sampled frames (the target is a 64x64 R32_FLOAT + D16 pass);
  • that the profile's guessed fields (rasterizer, write mask, logic op, pixel entry 0/0/64) are right. Nothing has been drawn yet that could test them.

Possible claimable items:

  • the heap-record s_load refusal above (four pipelines, about 103,000 dispatches per run);
  • a slot 57 bind path for committed buffers, non-aliasing placed buffers and strided scalar table reads (section 2), with fixtures;
  • a measurement of the X2W_COPIED_OBJECT_UAV cost before it goes into any preset.

The profile and captures are built from title data and stay local.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7323034586 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7323034586). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-12-01T19:34:28Z. --- Findings: a profiled slot 57 pipeline now gets its DispatchMesh calls forwarded, but they launch zero groups. The passes that should fill the group counts are untranslated compute pipelines. Base: #3730 (5132cbdb, stable descriptor key), plus local diagnostic commits on an unpushed branch, so this cannot be reproduced from a PR yet. RTX 4090, driver 610.88 (read after the runs), Windows 10.0.26300, debug layer off, 600 s runs with the usual input script, `X2W_MESH57_PARTIAL_ZERO=1`, and one reviewed local `.mesh57-state` profile (request `886c650f771e153f`, variant `f704523d0ccea7c0`). One run per configuration; nothing here was repeated. Runs used `X2W_SKIP_FAILED=1`, `X2W_MESH57_CAPTURE_STATE=1`, native shaders, and `run_preset.py --package <package root> --console s --gpu nvidia --set seconds=600`; the switches each section adds are named there. **1. The profile loads.** With #3730 the variant name is stable between runs. The runtime logs `native slot57 mesh 886c650f771e153f ready`, with no profile rejection, no lowering refusal and no pipeline refusal. **2. Binding.** At first `bind_mesh57_buffers` refused every call (about 11,700 per run, `graphics/mesh_bind`). Logging the reason and the descriptor showed four separate blocks, one per MS read: | Read | What it is | Refusal | Local change that binds it | |---|---|---|---| | 0, 1 (root 1 + 64) | view token for a committed buffer | "an input buffer view token names a committed buffer" | pass `InputBufferUse::mesh86_material`, as slot 86 does | | 2 (root SRV, root 3) | address not in the upload ring, the placement index or the committed index | "MS root SRV lacks a complete GPU-backed range" | `committed_root_srv`, then a title snapshot | | 3 (root 1 + 128) | placed buffer that does not alias title memory | "an input is in a placed buffer that does not alias title memory" | title snapshot into an upload allocation | | 4 (root 1 + 160) | native descriptor with stride 16, 30 records and word 3 not the raw-buffer value | "unsupported MS native byte buffer descriptor" | accept any stride and word 3 for table reads; still refuse swizzle (word 1 bits 30–31) | Read 4 is only an `s_buffer_load_dwordx16` at +0x160, and every table read is bound as a raw view, so stride and word 3 do not change what the HLSL reads. Stride × records (480 B) covers the 416 B read. Stride 0 would give 30 B, which does not. With all four changes in place, 11,878 DispatchMesh calls were forwarded in 600 s at 29.2 fps, with no device removal. These are the first forwarded slot 57 dispatches I know of. **3. The global snapshot switch hung the device.** With `X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1` the device was removed at about 59 s (`0x887a0006`, DEVICE_HUNG). That run had no bind-pass counter, but it logged the same read-4 refusal as the later split run, in which no slot 57 dispatch passed binding. So slot 57 very likely did not reach the GPU there, and the hang most likely comes from the switch's compute Dispatch path, but this is not proven. A slot 57-only snapshot switch (local `X2W_MESH57_SNAPSHOT`) ran 600 s without a hang. **4. The forwarded dispatches launch zero groups.** I sampled forwarded dispatches 1, 2, 5000 and 5001. For each, I copied RT0 and the DSV before and after, read the arguments back, and put a PIPELINE_STATISTICS1 query around the ExecuteIndirect: - The arguments the GPU read were `0 0 0`. - Every MS, clipper and PS statistic was 0. - The target and depth stayed at their clear values. So the empty output says nothing yet about the profile, the partial-zero MS or the pixel stage. The arguments in title memory also read `0 0 0` at record time, and the desktop argument buffer does not alias title memory, so the counts are most likely written by an earlier GPU pass. **5. The reset pass is behind `X2W_COPIED_OBJECT_UAV`.** A watch on the argument records found one writer, a natively translated compute pipeline (`3882fad2f0ec6197`). - Without the switch, it is refused on exactly that buffer: "a whole copied output UAV requires X2W_COPIED_OBJECT_UAV". - With `X2W_COPIED_OBJECT_UAV=1`, it translates for all 156,355 dispatches, and the arguments become `0 1 1`. - Its HLSL only stores `uint4(0, 1, 1, 0)` per 32-byte record. That is a reset: it never raises X. - With the switch, the frame rate fell from 29.2 to 8.7 fps. Samples at dispatches 2500 and 2501 still read `0 1 1`, and every statistic was still 0. **6. The passes that raise X are not translated.** No refused translated dispatch writes the records (table and heap UAV slots decoded; slots indexed through a word table, root UAVs and textures skipped). So I scanned the bound tables of dispatches refused before their slots were decoded: the first 2 KiB of every bound table, sampled at dispatches 1–8 and then every 256th. Ten compute pipelines that never translate have the exact argument buffer bound. Their guest code, disassembled with LLVM 15 (gfx1013, wave64): | Pipelines | Dispatches | Code | Translator refusal | |---|---:|---|---| | `9a7a55be461871ed`, `f2bedebd26705bfc` | 44,218 each | `buffer_atomic_add 1` at scalar offset bucket × `s5`, then a `buffer_store_format_xyzw` payload at the returned index (append) | "s_load of a resource heap record whose offset is not a root constant shifted left by 5 since the last branch target" | | `b9394023b5634ff2`, `edb7158619057cbd` | 7,422 each | same pattern | same | | `40f9b024bd53b629` | 3,711 | `buffer_atomic_add 1` at offset 0 or 32 | "TG_SIZE_EN requires at most 32 threads per group" | | five others | | stores only, or no buffer writes | various | Reading: the four append shaders add one per object to a counter and write the object beside it. If that counter is field +0 of a 32-byte DispatchMesh record, this is what raises X above the reset value. All four stop at the same translator refusal. If the reading holds, the next block for slot 57 output is that refusal, not slot 57 itself. **Not proven:** - that the descriptor these shaders atomically add into (table + 0x80) is the argument buffer at those dispatches; the scan only shows the buffer bound in the same table; - that `s5` is 32; - that `40f9`'s writes land in these records; - that no other writer exists: the watch skips word-table-indexed slots, root UAVs and textures, and the table scan is sampled; - that X is not legitimately 0 in the sampled frames (the target is a 64x64 R32_FLOAT + D16 pass); - that the profile's guessed fields (rasterizer, write mask, logic op, pixel entry 0/0/64) are right. Nothing has been drawn yet that could test them. **Possible claimable items:** - the heap-record `s_load` refusal above (four pipelines, about 103,000 dispatches per run); - a slot 57 bind path for committed buffers, non-aliasing placed buffers and strided scalar table reads (section 2), with fixtures; - a measurement of the `X2W_COPIED_OBJECT_UAV` cost before it goes into any preset. The profile and captures are built from title data and stay local. AI-Assisted
Not-Saii commented 2026-12-01 19:40:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T19:40:28Z.


Claim: unsupported mesh instruction or EXEC state: v_readfirstlane_b32 in the C++ mesh frontend (src/gfx1013_direct_mesh.inl). This is the row @lukaslw-lab lists as open in the #3416 ranking (about 0.42 M refused calls, first site at a branch join). With the open mesh PRs stacked and X2W_MESH57_PARTIAL_ZERO=1, it's the first refusal for 73 of the 265 requests in @Kawiu's census. It isn't covered by #3619 or #3719, which handle heap-slot selectors.

What's refused today. #3439 accepts v_readfirstlane_b32 when the source VGPR is proven wave-uniform at that point. At a join, that proof is lost: a VGPR written on two incoming paths has no uniform mark, even when both writes were uniform.

Plan.

  1. Classify the 73 requests by why the source isn't proven uniform. Counts only, with compile_dxil --refusals and the #3416 layout, on my own capture. The cases I expect:

    • uniform on every incoming path, under a scalar (SCC) branch;
    • uniform per path, but under an EXEC-divergent if/else, so lanes took different arms;
    • genuinely lane-varying, for example a waterfall.

    I'll post the split before changing anything. If most turn out to be another shape, I'll say so here.

  2. Carry the proof across the join only where it holds. A joined VGPR is wave-uniform when:

    • every incoming definition is uniform;
    • the branch that split the paths was wave-uniform (a scalar condition, not an EXEC or VCC mask that sent lanes different ways);
    • EXEC at the join is full or a known lane skip, as the gate already requires.

    A divergent if/else stays refused, with its own named reason, because readfirstlane there returns the first active lane's arm. A lane-varying source stays refused too.

  3. Tests. Source-built gfx1013 mesh fixtures, assembled with LLVM 15, through compile_dxil with ir and controls checks.

    • Positive:

      • a join after an SCC branch, with uniform values on both paths;
      • a join where one path doesn't write the VGPR and it keeps its earlier uniform value.
    • Negative:

      • an EXEC-divergent if/else with uniform but different constants per arm;
      • one arm writing a lane value (v0);
      • a VGPR overwritten after the join.

      Each gets its named refusal.

    • Mutants:

      • one that marks a join uniform without checking the branch kind;
      • one that ignores a lane-varying incoming value.

      Both must fail the negatives.

  4. Re-measure the 73 requests and report where they stop next.

Environment: Windows 11 build 26300, MSVC (VS 2022, dev preset), Windows SDK 10.0.26100, LLVM 15 for gfx1013, Python 3.12, plus WARP and an RTX 4090 for the hardware variant.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7323214611 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7323214611). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-12-01T19:40:28Z. --- Claim: **`unsupported mesh instruction or EXEC state: v_readfirstlane_b32`** in the C++ mesh frontend (`src/gfx1013_direct_mesh.inl`). This is the row @lukaslw-lab lists as open in the #3416 ranking (about 0.42 M refused calls, first site at a branch join). With the open mesh PRs stacked and `X2W_MESH57_PARTIAL_ZERO=1`, it's the first refusal for 73 of the 265 requests in @Kawiu's census. It isn't covered by #3619 or #3719, which handle heap-slot selectors. **What's refused today.** #3439 accepts `v_readfirstlane_b32` when the source VGPR is proven wave-uniform at that point. At a join, that proof is lost: a VGPR written on two incoming paths has no uniform mark, even when both writes were uniform. **Plan.** 1. **Classify the 73 requests by why the source isn't proven uniform.** Counts only, with `compile_dxil --refusals` and the #3416 layout, on my own capture. The cases I expect: - uniform on every incoming path, under a scalar (SCC) branch; - uniform per path, but under an EXEC-divergent if/else, so lanes took different arms; - genuinely lane-varying, for example a waterfall. I'll post the split before changing anything. If most turn out to be another shape, I'll say so here. 2. **Carry the proof across the join only where it holds.** A joined VGPR is wave-uniform when: - every incoming definition is uniform; - the branch that split the paths was wave-uniform (a scalar condition, not an EXEC or VCC mask that sent lanes different ways); - EXEC at the join is full or a known lane skip, as the gate already requires. A divergent if/else stays refused, with its own named reason, because `readfirstlane` there returns the first active lane's arm. A lane-varying source stays refused too. 3. **Tests.** Source-built gfx1013 mesh fixtures, assembled with LLVM 15, through `compile_dxil` with `ir` and `controls` checks. - Positive: - a join after an SCC branch, with uniform values on both paths; - a join where one path doesn't write the VGPR and it keeps its earlier uniform value. - Negative: - an EXEC-divergent if/else with uniform but different constants per arm; - one arm writing a lane value (`v0`); - a VGPR overwritten after the join. Each gets its named refusal. - Mutants: - one that marks a join uniform without checking the branch kind; - one that ignores a lane-varying incoming value. Both must fail the negatives. 4. **Re-measure the 73 requests** and report where they stop next. Environment: Windows 11 build 26300, MSVC (VS 2022, dev preset), Windows SDK 10.0.26100, LLVM 15 for gfx1013, Python 3.12, plus WARP and an RTX 4090 for the hardware variant. AI-assisted.
Not-Saii commented 2026-12-01 21:18:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T21:18:10Z.


Classification for my v_readfirstlane_b32 claim above (C++ mesh frontend). Counts only, from my own capture. The change I planned would move none of these requests, so I won't open it as claimed.

Setup.

  • Base: main 158ef794, which now includes #3633, #3635, #3645, #3655, #3668 and #3671.
  • Command: compile_dxil --refusals with the #3416 layout (mesh1 128 128 128 2 128 64, packed_parameters, validate_uint_heap_reads, guest_root) and X2W_MESH57_PARTIAL_ZERO=1.
  • Diagnostic: a local build (not for a PR). At each refused readfirstlane it names why the source has no uniform proof, then walks the source's IR definitions back to their leaves.

The capture has 937 .m57 requests. 582 of them are refused before translation with mesh request key does not match its files, because they were written under an older key, and 203 programs appear only among those. So I classified twice: as-is, and with the key check bypassed.

355 requests with current keys all 937
readfirstlane is the first refusal 44 122
distinct mesh programs among them 39 70

The counts are the same without X2W_MESH57_PARTIAL_ZERO, and the same with Kawiu's three-line layout (no packed_parameters).

Why the source isn't proven uniform

Shape 355 937
uniform on every incoming path after a scalar (SCC) branch 0 0
uniform per path after an EXEC-divergent if/else 0 0
a thread-index leaf reaches the source on at least one incoming path 44 122
other 0 0

In every case the EXEC gate already holds at the read. Only the uniform proof is missing. In all 122, the source is a phi at a scalar join where neither incoming value is proven uniform.

The shape, from one disassembled program.

  • Two SCC branches test the same condition, which comes from a root constant.
  • Down the taken path, a record index is (scalar base + thread index / n) mod m, with the thread index from v_mbcnt. The other path uses the scalar base alone.
  • A buffer_load_dwordx2 at that index feeds (field & 0x7f) + 1 and a second 7-bit field plus 1. Down the taken path, each is then multiplied by a scalar.
  • Two v_readfirstlane_b32 read the joined VGPRs into SGPRs. v_cmpx_lt_u32 against the thread index and s_min_u32 / s_cselect_b32 follow, so they look like per-wave counts.

So in this frontend the source is lane-varying on one path, because the thread index reaches it through the load address. This comes from following the IR; I haven't measured lane values at runtime. If n is below the wave width, lanes read different records, and readfirstlane returns the first active lane's value.

Correction to my claim. A join of values that are uniform on both incoming paths is not refused on main. merge_edges already marks the phi uniform when the join isn't a masked or lane-else diamond. I got that from reading the code; I didn't find a fixture for the case. Carrying the proof across the join would move 0 of these requests.

44 vs 73. This is a different capture from Kawiu's (937 requests, 355 of them with current keys, against 392) on a later base. With the key check bypassed, it's 122 of 937.

What would move them is evaluating the source at the guest wave's first active lane, not proving it uniform. EXEC is full at these reads, so that is lane 0 of each guest wave64. The host's WaveReadLaneFirst isn't enough when the host wave is narrower than the guest wave: in wave32, the second host wave would return guest lane 32's value. There are two candidates:

  • a group-shared broadcast from lane 0 of each guest wave;
  • re-evaluating the value with the thread index set to the wave base. The Python translator's readfirstlane_recompute checks are prior art for this one.

I'm releasing this claim.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7326048520 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7326048520). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-12-01T21:18:10Z. --- Classification for my `v_readfirstlane_b32` claim above (C++ mesh frontend). Counts only, from my own capture. The change I planned would move none of these requests, so I won't open it as claimed. **Setup.** - Base: main `158ef794`, which now includes #3633, #3635, #3645, #3655, #3668 and #3671. - Command: `compile_dxil --refusals` with the #3416 layout (`mesh1 128 128 128 2 128 64`, `packed_parameters`, `validate_uint_heap_reads`, `guest_root`) and `X2W_MESH57_PARTIAL_ZERO=1`. - Diagnostic: a local build (not for a PR). At each refused readfirstlane it names why the source has no uniform proof, then walks the source's IR definitions back to their leaves. The capture has 937 `.m57` requests. 582 of them are refused before translation with `mesh request key does not match its files`, because they were written under an older key, and 203 programs appear only among those. So I classified twice: as-is, and with the key check bypassed. | | 355 requests with current keys | all 937 | |---|---:|---:| | readfirstlane is the first refusal | 44 | 122 | | distinct mesh programs among them | 39 | 70 | The counts are the same without `X2W_MESH57_PARTIAL_ZERO`, and the same with Kawiu's three-line layout (no `packed_parameters`). **Why the source isn't proven uniform** | Shape | 355 | 937 | |---|---:|---:| | uniform on every incoming path after a scalar (SCC) branch | 0 | 0 | | uniform per path after an EXEC-divergent if/else | 0 | 0 | | a thread-index leaf reaches the source on at least one incoming path | 44 | 122 | | other | 0 | 0 | In every case the EXEC gate already holds at the read. Only the uniform proof is missing. In all 122, the source is a phi at a scalar join where neither incoming value is proven uniform. **The shape, from one disassembled program.** - Two SCC branches test the same condition, which comes from a root constant. - Down the taken path, a record index is `(scalar base + thread index / n) mod m`, with the thread index from `v_mbcnt`. The other path uses the scalar base alone. - A `buffer_load_dwordx2` at that index feeds `(field & 0x7f) + 1` and a second 7-bit field plus 1. Down the taken path, each is then multiplied by a scalar. - Two `v_readfirstlane_b32` read the joined VGPRs into SGPRs. `v_cmpx_lt_u32` against the thread index and `s_min_u32` / `s_cselect_b32` follow, so they look like per-wave counts. So in this frontend the source is lane-varying on one path, because the thread index reaches it through the load address. This comes from following the IR; I haven't measured lane values at runtime. If `n` is below the wave width, lanes read different records, and `readfirstlane` returns the first active lane's value. **Correction to my claim.** A join of values that are uniform on both incoming paths is not refused on main. `merge_edges` already marks the phi uniform when the join isn't a masked or lane-else diamond. I got that from reading the code; I didn't find a fixture for the case. Carrying the proof across the join would move 0 of these requests. **44 vs 73.** This is a different capture from Kawiu's (937 requests, 355 of them with current keys, against 392) on a later base. With the key check bypassed, it's 122 of 937. **What would move them** is evaluating the source at the guest wave's first active lane, not proving it uniform. EXEC is full at these reads, so that is lane 0 of each guest wave64. The host's `WaveReadLaneFirst` isn't enough when the host wave is narrower than the guest wave: in wave32, the second host wave would return guest lane 32's value. There are two candidates: - a group-shared broadcast from lane 0 of each guest wave; - re-evaluating the value with the thread index set to the wave base. The Python translator's `readfirstlane_recompute` checks are prior art for this one. I'm releasing this claim. AI-assisted.
timbot103 commented 2026-12-01 22:43:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-01T22:43:46Z.


Claiming three independent unclaimed slices from the findings above (each as a small independent PR against main with source-built fixtures and fail-closed controls):

  1. Full-EXEC v_readfirstlane_b32 on lane-varying sources in the C++ mesh frontend (released by @Not-Saii above, ~0.42 M refused calls / 70–122 programs): lower v_readfirstlane_b32 sD, vS under proven full EXEC and uniform control flow via a guest-wave64 lane-0 groupshared broadcast (matching lane 0 across both host wave32 and wave64), keeping partial/divergent EXEC and non-uniform control flow strictly refused.
  2. Slot 57 runtime binding in src/startup_stubs/native_mesh57.inl (from @Not-Saii's section 2): accept non-zero stride & word 3 on raw table byte-buffer reads using stride * records bounds (still refusing swizzle bits), and wire committed view tokens (InputBufferUse::mesh86_material) plus the merged #3718 committed root-SRV resolver into bind_mesh57_buffers, with WARP + RTX 5080 integration and negative controls.
  3. Multi-wave COMPUTE_PGM_RSRC2.TG_SIZE_EN wave-base bits (0xfc0 / bits [11:6]) in compute lowering (for groups > 32 threads, per the 40f9b024bd53b629 refusal above and src/gfx1013_compute_clear.cpp): verify and fix TG_SIZE wave-ID / wave-count packing in native direct compute (src/gfx1013_direct_compute.inl) and multi-wave s_and_b32(..., 0xfc0) support with source-built WARP + RTX 5080 readbacks.

Environment: Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100, NVIDIA GeForce RTX 5080 (driver 621.40) + WARP. Source-built tests only.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7328252376 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7328252376). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-01T22:43:46Z. --- Claiming three independent unclaimed slices from the findings above (each as a small independent PR against `main` with source-built fixtures and fail-closed controls): 1. **Full-EXEC `v_readfirstlane_b32` on lane-varying sources in the C++ mesh frontend** (released by @Not-Saii above, ~0.42 M refused calls / 70–122 programs): lower `v_readfirstlane_b32 sD, vS` under proven full `EXEC` and uniform control flow via a guest-wave64 lane-0 groupshared broadcast (matching lane 0 across both host wave32 and wave64), keeping partial/divergent `EXEC` and non-uniform control flow strictly refused. 2. **Slot 57 runtime binding in `src/startup_stubs/native_mesh57.inl`** (from @Not-Saii's section 2): accept non-zero stride & word 3 on raw table byte-buffer reads using `stride * records` bounds (still refusing swizzle bits), and wire committed view tokens (`InputBufferUse::mesh86_material`) plus the merged #3718 committed root-SRV resolver into `bind_mesh57_buffers`, with WARP + RTX 5080 integration and negative controls. 3. **Multi-wave `COMPUTE_PGM_RSRC2.TG_SIZE_EN` wave-base bits (`0xfc0` / bits [11:6]) in compute lowering** (for groups > 32 threads, per the `40f9b024bd53b629` refusal above and `src/gfx1013_compute_clear.cpp`): verify and fix `TG_SIZE` wave-ID / wave-count packing in native direct compute (`src/gfx1013_direct_compute.inl`) and multi-wave `s_and_b32(..., 0xfc0)` support with source-built WARP + RTX 5080 readbacks. Environment: Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100, NVIDIA GeForce RTX 5080 (driver 621.40) + WARP. Source-built tests only. AI-assisted.
timbot103 commented 2026-12-01 22:58:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-01T22:58:13Z.


All three claimed #2413 slices are up as independent PRs against main (158ef794), each verified in both Debug and Release with source-built fixtures and fail-closed controls (Windows 11 26200.9974, MSVC 19.44, Windows SDK 10.0.26100.0, WARP + NVIDIA GeForce RTX 5080 driver 32.0.16.2140):

  1. Full-EXEC v_readfirstlane_b32 lane-0 broadcast (released by @Not-Saii): #3793 (Debug + Release 2/2 passed)
  2. Slot 57 strided table byte buffers + committed view tokens & committed root SRVs (native_mesh57.inl): #3795 (Debug 36/36 + Release 36/36 passed on WARP & RTX 5080)
  3. GFX10.13 TG_SIZE_EN wave-base bits [11:6] & rounded wave count (native direct compute): #3796 (Debug + Release passed on WARP 1.0.22 & RTX 5080, 320/320 UAV words matched, native_wave_request_hardware untouched and passing; note gfx2hlsl.py keeps its <= 32 refusal where guest wave width is absent)

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7328569547 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7328569547). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-01T22:58:13Z. --- All three claimed #2413 slices are up as independent PRs against `main` (`158ef794`), each verified in both Debug and Release with source-built fixtures and fail-closed controls (Windows 11 26200.9974, MSVC 19.44, Windows SDK 10.0.26100.0, WARP + NVIDIA GeForce RTX 5080 driver `32.0.16.2140`): 1. **Full-EXEC `v_readfirstlane_b32` lane-0 broadcast** (released by @Not-Saii): #3793 (Debug + Release 2/2 passed) 2. **Slot 57 strided table byte buffers + committed view tokens & committed root SRVs** (`native_mesh57.inl`): #3795 (Debug 36/36 + Release 36/36 passed on WARP & RTX 5080) 3. **GFX10.13 `TG_SIZE_EN` wave-base bits `[11:6]` & rounded wave count** (native direct compute): #3796 (Debug + Release passed on WARP 1.0.22 & RTX 5080, 320/320 UAV words matched, `native_wave_request_hardware` untouched and passing; note `gfx2hlsl.py` keeps its `<= 32` refusal where guest wave width is absent) AI-assisted.
timbot103 commented 2026-12-02 00:38:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T00:38:03Z.


Claiming three small unclaimed C++ mesh frontend refusals from @Kawiu's slot 57 census on main (158ef794, independent PR, zero overlap with #3793/#3797 or @mumba17's open stack):

  • v_fmamk_f32 / v_fmaak_f32 (3 requests; already lowered in shared ALU);
  • straight-line s_and_saveexec_b64 without an EXECZ skip (mesh SAVEEXEC then arm lacks an EXECZ skip, 5 requests);
  • verified exp pos1 (target 13) clip/cull channel masks (unmapped mesh export target 13, 5 requests).

Source-built gfx1013 mesh fixtures and fail-closed negative controls only, verified in Debug and Release with DXC validation.

Environment: Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100, NVIDIA GeForce RTX 5080 (driver 32.0.16.2140) + WARP.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7330784768 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7330784768). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T00:38:03Z. --- Claiming three small unclaimed C++ mesh frontend refusals from @Kawiu's slot 57 census on `main` (`158ef794`, independent PR, zero overlap with #3793/#3797 or @mumba17's open stack): - `v_fmamk_f32` / `v_fmaak_f32` (3 requests; already lowered in shared ALU); - straight-line `s_and_saveexec_b64` without an `EXECZ` skip (`mesh SAVEEXEC then arm lacks an EXECZ skip`, 5 requests); - verified `exp pos1` (`target 13`) clip/cull channel masks (`unmapped mesh export target 13`, 5 requests). Source-built gfx1013 mesh fixtures and fail-closed negative controls only, verified in Debug and Release with DXC validation. Environment: Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100, NVIDIA GeForce RTX 5080 (driver 32.0.16.2140) + WARP. AI-assisted.
timbot103 commented 2026-12-02 01:31:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T01:31:33Z.


PR https://github.com/R0Y00/Xbox2Windows/pull/3806 is up for the claimed _fmamk_f32/ _fmaak_f32, straight-line SAVEEXEC without EXECZ skip, and reflected exp pos1 ( arget 13) CCDIST0 clip/cull slice (independent against main 158ef794, Debug 2/2 + Release 2/2 passed with DXC validation and fail-closed controls).

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7331804036 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7331804036). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T01:31:33Z. --- PR https://github.com/R0Y00/Xbox2Windows/pull/3806 is up for the claimed _fmamk_f32/ _fmaak_f32, straight-line SAVEEXEC without EXECZ skip, and reflected exp pos1 ( arget 13) CCDIST0 clip/cull slice (independent against main 158ef794, Debug 2/2 + Release 2/2 passed with DXC validation and fail-closed controls). AI-assisted.
Leyukaka commented 2026-12-02 20:48:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T20:48:32Z.


Slot 57 profiles: a scan for the registers the mesh-layout blocks still hide is up in #3889.

It tests every aligned offset of creation blocks A and B against the gfx10 field definitions and against evidence held outside the blocks (pixel exports and interpolation, the .t57 tuple), the same approach that placed the blend words in #1216. Three independent capture corpora of about 320 variants each agree on every row:

  • CB_COLOR_CONTROL: A+0x0D0 in the mesh layout (same base as CB_BLEND at A+0x124), the only candidate passing the field test in three captures; no field is read yet.
  • DB_ALPHA_TO_MASK: A+0x0B4, provisional (reserved bits only; the word also passes the PA_SU_SC_MODE_CNTL predicate).
  • SPI_PS_IN_CONTROL: two candidates, A+0x0B0 matched in every informative variant.
  • CB_SHADER_MASK: ambiguous between A+0x0C4 and A+0x0CC.
  • PA_SU_SC_MODE_CNTL: ambiguous, five candidates.
  • CB_TARGET_MASK, SPI_PS_INPUT_ADDR / _ENA, PA_SC_AA_MASK: unresolved.

The PR carries the tool, a synthetic check with three negative controls and the offsets only; no captured values.

Still open: the mesh entry dimensions are not in these blocks. I am deriving them from the mesh program itself and will follow up separately.

Question: does anyone have a source for where CB_TARGET_MASK or SPI_PS_INPUT_ADDR sit in the slot 57 creation blocks, or a capture set where variants bind more targets than their pixel program exports? That would separate the two mask words.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7358349827 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7358349827). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-02T20:48:32Z. --- Slot 57 profiles: a scan for the registers the mesh-layout blocks still hide is up in #3889. It tests every aligned offset of creation blocks A and B against the gfx10 field definitions and against evidence held outside the blocks (pixel exports and interpolation, the `.t57` tuple), the same approach that placed the blend words in #1216. Three independent capture corpora of about 320 variants each agree on every row: - `CB_COLOR_CONTROL`: A+0x0D0 in the mesh layout (same base as `CB_BLEND` at A+0x124), the only candidate passing the field test in three captures; no field is read yet. - `DB_ALPHA_TO_MASK`: A+0x0B4, provisional (reserved bits only; the word also passes the `PA_SU_SC_MODE_CNTL` predicate). - `SPI_PS_IN_CONTROL`: two candidates, A+0x0B0 matched in every informative variant. - `CB_SHADER_MASK`: ambiguous between A+0x0C4 and A+0x0CC. - `PA_SU_SC_MODE_CNTL`: ambiguous, five candidates. - `CB_TARGET_MASK`, `SPI_PS_INPUT_ADDR` / `_ENA`, `PA_SC_AA_MASK`: unresolved. The PR carries the tool, a synthetic check with three negative controls and the offsets only; no captured values. Still open: the mesh entry dimensions are not in these blocks. I am deriving them from the mesh program itself and will follow up separately. Question: does anyone have a source for where `CB_TARGET_MASK` or `SPI_PS_INPUT_ADDR` sit in the slot 57 creation blocks, or a capture set where variants bind more targets than their pixel program exports? That would separate the two mask words.
Sign in to join this conversation.
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#2405
No description provided.