tracking: fixed mesh pipelines (slot 57) through the native C++ frontend #3416

Open
opened 2026-11-28 23:56:38 +00:00 by Leyukaka · 12 comments
Leyukaka commented 2026-11-28 23:56:38 +00:00 (Migrated from github.com)
Contributor

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


Part of #2413. Refs #870, #3091, #3094, #3308.

Goal

Translate fixed mesh pipelines (device slot 57) through the native C++ frontend. 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, and that run refused 1,923,473 indirect DispatchMesh commands (graphics-pipeline bucket).

Done when the 543 requests are ranked by C++ refusal here, and each claimed item below is merged or released.

How a GPU program reaches the screen

application (unmodified x64 code)
  -> console D3D12 / GDK calls -> stand-ins (src/startup_stubs) -> Windows D3D12
       each GPU program is gfx1013 machine code and must be translated to DXIL

  compute (slot 67)        mesh + pixel (slot 57)        vertex + pixel
        \                          |                          /
         translation: gfx2hlsl.py (--pending, or the watcher with -Translate);
         C++ frontend in the stand-in with -NativeShaders;
         if no translation exists, the draw or dispatch is refused
                                   |
         runtime binding: descriptors in guest memory matched to D3D12 resources
         and a manifest

On the native path, a slot 57 pipeline also needs a reviewed <variant>.mesh57-state profile (src/startup_stubs/native_mesh57.inl:251-257), so today every captured request stops there before translation. Offline, compile_dxil --refusals reads req_<key>.m57 requests with their .ps57 and .root files (tools/startup/compile_dxil.cpp:548-629); each needs an entry layout, a .mslayout file beside the request or --mesh-layout FILE, and fails with mesh request has no entry layout otherwise.

Where things stand

First gfx2hlsl.py refusals of the 543: s_cbranch_execz skips code with effects outside active lanes 398, v_readfirstlane_b32 outside the group-index read is not covered 91, exchange shapes 37, loops 17. The C++ frontend handles execz blocks differently, so its ranking is still to be measured.

Claimed (Leyukaka, see #2413)

  • tooling: count slot 57 mesh requests in compile_dxil --refusals (#3418)
  • shader: derive mesh entry root inputs from the creation root signature (offline; open question in #2413) (#3446)
  • the C++ refusal ranking of the 543 requests, posted here
  • shader: name the mesh exchange shapes the frontend does not match (#3420)
  • shader: branch on VCC from a wave-uniform mesh compare (#3423)
  • shader: refuse mesh VGPRs written under a narrowed EXEC and read after the count exchange (the control showed the gap) (#3422)
  • shader: fail closed on stale mesh lane masks and partial VGPRs (#3450)
  • shader: accept readfirstlane of a proven wave-uniform VGPR in the mesh frontend (#3439)
  • docs: native mesh frontend refusal and acceptance rules (#3447)

Free

Each needs a source-built positive case and a negative control (#870). Claim in #2413 before starting.

  • pos1 and per-thread export order
  • the rest of tedin7's item 1: inner execz, SCC of a mask op, scalar load with a non-wave-uniform address
  • loops outside the group-memory exchanges
  • v_writelane / v_readlane
  • depth-only pipelines (the native path needs at least one colour target today)
  • a source for the group thread count and topology of a fixed mesh pipeline

Not covered yet

A translated mesh program still needs a profile to draw: thread count, topology, rasterizer state and attachment formats have no automatic source; draft #3413 proposes an opt-in runtime derivation for one allocation shape.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6672672958 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T23:56:38Z. --- Part of #2413. Refs #870, #3091, #3094, #3308. ## Goal Translate fixed mesh pipelines (device slot 57) through the native C++ frontend. 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`, and that run refused 1,923,473 indirect `DispatchMesh` commands (graphics-pipeline bucket). Done when the 543 requests are ranked by C++ refusal here, and each claimed item below is merged or released. ## How a GPU program reaches the screen ```text application (unmodified x64 code) -> console D3D12 / GDK calls -> stand-ins (src/startup_stubs) -> Windows D3D12 each GPU program is gfx1013 machine code and must be translated to DXIL compute (slot 67) mesh + pixel (slot 57) vertex + pixel \ | / translation: gfx2hlsl.py (--pending, or the watcher with -Translate); C++ frontend in the stand-in with -NativeShaders; if no translation exists, the draw or dispatch is refused | runtime binding: descriptors in guest memory matched to D3D12 resources and a manifest ``` On the native path, a slot 57 pipeline also needs a reviewed `<variant>.mesh57-state` profile (`src/startup_stubs/native_mesh57.inl:251-257`), so today every captured request stops there before translation. Offline, `compile_dxil --refusals` reads `req_<key>.m57` requests with their `.ps57` and `.root` files (`tools/startup/compile_dxil.cpp:548-629`); each needs an entry layout, a `.mslayout` file beside the request or `--mesh-layout FILE`, and fails with `mesh request has no entry layout` otherwise. ## Where things stand First `gfx2hlsl.py` refusals of the 543: `s_cbranch_execz skips code with effects outside active lanes` 398, `v_readfirstlane_b32 outside the group-index read is not covered` 91, exchange shapes 37, loops 17. The C++ frontend handles execz blocks differently, so its ranking is still to be measured. ## Claimed (Leyukaka, see #2413) - [x] `tooling: count slot 57 mesh requests in compile_dxil --refusals` (#3418) - [x] `shader: derive mesh entry root inputs from the creation root signature` (offline; open question in #2413) (#3446) - [ ] the C++ refusal ranking of the 543 requests, posted here - [x] `shader: name the mesh exchange shapes the frontend does not match` (#3420) - [x] `shader: branch on VCC from a wave-uniform mesh compare` (#3423) - [x] `shader: refuse mesh VGPRs written under a narrowed EXEC and read after the count exchange` (the control showed the gap) (#3422) - [x] `shader: fail closed on stale mesh lane masks and partial VGPRs` (#3450) - [x] `shader: accept readfirstlane of a proven wave-uniform VGPR in the mesh frontend` (#3439) - [x] `docs: native mesh frontend refusal and acceptance rules` (#3447) ## Free Each needs a source-built positive case and a negative control (#870). Claim in #2413 before starting. - `pos1` and per-thread export order - the rest of tedin7's item 1: inner execz, SCC of a mask op, scalar load with a non-wave-uniform address - loops outside the group-memory exchanges - `v_writelane` / `v_readlane` - depth-only pipelines (the native path needs at least one colour target today) - a source for the group thread count and topology of a fixed mesh pipeline ## Not covered yet A translated mesh program still needs a profile to draw: thread count, topology, rasterizer state and attachment formats have no automatic source; draft #3413 proposes an opt-in runtime derivation for one allocation shape.
Leyukaka commented 2026-11-29 00:56:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T00:56:54Z.


First C++ refusal ranking for the 543 captured slot 57 requests.

Tool: compile_dxil --refusals <dir> --jobs 8 --json --mesh-layout <file>, built from #3418 (664db4ca on main 0614f68c) plus the root-input change (not opened yet). Caller layouts all used guest_root, wave 64 and a non-zero group_stride. Variants tested: threads 64 and 128, maxima equal to threads, triangle topology, with and without packed_parameters. Every variant gave the same counts:

First refusal Count
direct resource-heap load requires the selected GPU slot and its view type 370
unsupported mesh instruction or EXEC state: v_readfirstlane_b32 147
unsupported mesh instruction or EXEC state: s_mov_b64 21
formatted mesh load lacks an R32_UINT resource heap contract 5
translated 0

With wave 32 or group_stride 0, all 543 stop at unsupported mesh instruction or EXEC state: s_mov_b64. The exchange is matched only when, among other conditions, !layout.wave32 && layout.group_stride (src/gfx1013_direct_mesh.inl:383), so those runs measure the layout, not the programs.

These are first refusals only. Fixing one reason can expose later refusals in the same requests.

The top reason is the same heap-selection refusal that leads the compute family in #3224 (333 of the 882 compute programs at main 8ecd30fe). #3023 covers heap view types on the native compute route.

Next for #3416: the v_readfirstlane_b32 class (147), then the s_mov_b64 class (21). Whether those 21 are exchange shapes failing another matching condition is not established; #3420 would separate them.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7248459427 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7248459427). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T00:56:54Z. --- First C++ refusal ranking for the 543 captured slot 57 requests. Tool: `compile_dxil --refusals <dir> --jobs 8 --json --mesh-layout <file>`, built from #3418 (`664db4ca` on `main` `0614f68c`) plus the root-input change (not opened yet). Caller layouts all used `guest_root`, wave 64 and a non-zero `group_stride`. Variants tested: threads 64 and 128, maxima equal to threads, triangle topology, with and without `packed_parameters`. Every variant gave the same counts: | First refusal | Count | |---|---| | direct resource-heap load requires the selected GPU slot and its view type | 370 | | unsupported mesh instruction or EXEC state: `v_readfirstlane_b32` | 147 | | unsupported mesh instruction or EXEC state: `s_mov_b64` | 21 | | formatted mesh load lacks an R32_UINT resource heap contract | 5 | | translated | 0 | With wave 32 or `group_stride` 0, all 543 stop at `unsupported mesh instruction or EXEC state: s_mov_b64`. The exchange is matched only when, among other conditions, `!layout.wave32 && layout.group_stride` (`src/gfx1013_direct_mesh.inl:383`), so those runs measure the layout, not the programs. These are first refusals only. Fixing one reason can expose later refusals in the same requests. The top reason is the same heap-selection refusal that leads the compute family in #3224 (333 of the 882 compute programs at `main` `8ecd30fe`). #3023 covers heap view types on the native compute route. Next for #3416: the `v_readfirstlane_b32` class (147), then the `s_mov_b64` class (21). Whether those 21 are exchange shapes failing another matching condition is not established; #3420 would separate them.
Leyukaka commented 2026-11-29 01:05:02 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T01:05:02Z.


Taking the next item from the ranking above: the 147 requests that stop at v_readfirstlane_b32. By disassembly and code reading (the tool does not report the pc), the refused read in each is the 32-bit unsigned-division expansion over SGPR inputs (v_cvt_f32_u32 / v_rcp_f32 / v_mul_f32 / v_cvt_u32_f32), whose result is the same in every lane, but the frontend does not record VALU results as wave-uniform.

Plan, one PR: record a VALU result as wave-uniform when every source is (no DPP/SDWA, no VCC/EXEC or lane-index source), and accept s_sub_i32 and s_mul_hi_u32, which the shared scalar ALU already implements. A negative control keeps a lane-varying v_cvt_f32_u32 input refused. This moves those requests forward but does not translate them yet: by a static estimate (not measured), the next refusals are v_mul_hi_u32 and s_max_u32.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7248547705 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7248547705). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T01:05:02Z. --- Taking the next item from the ranking above: the 147 requests that stop at `v_readfirstlane_b32`. By disassembly and code reading (the tool does not report the pc), the refused read in each is the 32-bit unsigned-division expansion over SGPR inputs (`v_cvt_f32_u32` / `v_rcp_f32` / `v_mul_f32` / `v_cvt_u32_f32`), whose result is the same in every lane, but the frontend does not record VALU results as wave-uniform. Plan, one PR: record a VALU result as wave-uniform when every source is (no DPP/SDWA, no VCC/EXEC or lane-index source), and accept `s_sub_i32` and `s_mul_hi_u32`, which the shared scalar ALU already implements. A negative control keeps a lane-varying `v_cvt_f32_u32` input refused. This moves those requests forward but does not translate them yet: by a static estimate (not measured), the next refusals are `v_mul_hi_u32` and `s_max_u32`.
Leyukaka commented 2026-11-29 02:25:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T02:25:09Z.


Status of the v_readfirstlane_b32 / 32-bit unsigned-division item, both branches on main 212d4b5f, PRs to follow:

  • v_readfirstlane_b32 of a proven wave-uniform VGPR is accepted. A VALU result counts as uniform only when it is written under full EXEC from uniform sources; for accumulator ops the accumulator is checked, for 64-bit pair sources the high word too; DPP and SDWA forms are excluded. s_sub_i32 and s_mul_hi_u32 join the scalar ALU list.
  • A second, independent branch admits s_max_u32 and v_mul_hi_u32.

Also taking a soundness bug in the mesh frontend on main 212d4b5f: s_or_b64 exec, exec, s[x:y] inside an open lane-skip block (v_cmpx_* + s_cbranch_execz) widens EXEC, but the rest of the block is still emitted under the narrowed lane condition. The program is accepted and the DXIL is wrong, with no refusal: a VGPR write after the widening reaches only the lanes that passed the compare. Found by reading the DXIL that compile_dxil emits for a source-built fixture; nothing was run on a GPU.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7249415320 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7249415320). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T02:25:09Z. --- Status of the `v_readfirstlane_b32` / 32-bit unsigned-division item, both branches on `main` `212d4b5f`, PRs to follow: - `v_readfirstlane_b32` of a proven wave-uniform VGPR is accepted. A VALU result counts as uniform only when it is written under full EXEC from uniform sources; for accumulator ops the accumulator is checked, for 64-bit pair sources the high word too; DPP and SDWA forms are excluded. `s_sub_i32` and `s_mul_hi_u32` join the scalar ALU list. - A second, independent branch admits `s_max_u32` and `v_mul_hi_u32`. Also taking a soundness bug in the mesh frontend on `main` `212d4b5f`: `s_or_b64 exec, exec, s[x:y]` inside an open lane-skip block (`v_cmpx_*` + `s_cbranch_execz`) widens EXEC, but the rest of the block is still emitted under the narrowed lane condition. The program is accepted and the DXIL is wrong, with no refusal: a VGPR write after the widening reaches only the lanes that passed the compare. Found by reading the DXIL that `compile_dxil` emits for a source-built fixture; nothing was run on a GPU.
Leyukaka commented 2026-11-29 04:24:40 +00:00 (Migrated from github.com)
Author
Contributor

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


Status: five branches on main 212d4b5f, PRs not opened yet.

  • The two above: uniform v_readfirstlane_b32, and s_max_u32 / v_mul_hi_u32.
  • EXEC widening: inside an open lane-skip block, an EXEC write that can widen past the skip's guard is refused (mesh EXEC write inside a lane-skip block). Narrowing s_and_b64 / s_andn2_b64, the gather and signed-CMPX join restores, and the restore right after a nested skip closes stay accepted.
  • The 21 s_mov_b64 first refusals in the ranking are, by disassembly, the group exchange without its EXEC save (60 bytes instead of 64, every other word identical). The matcher accepts that form; a later EXEC restore from a pair that was never saved is still refused. What those 21 requests refuse next is not measured.
  • prepare_native_mesh57: the profile input bytes differ refusal names the first part that differs (length or content). Accepted and refused profiles are unchanged.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7250635545 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7250635545). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T04:24:40Z. --- Status: five branches on `main` `212d4b5f`, PRs not opened yet. - The two above: uniform `v_readfirstlane_b32`, and `s_max_u32` / `v_mul_hi_u32`. - EXEC widening: inside an open lane-skip block, an EXEC write that can widen past the skip's guard is refused (`mesh EXEC write inside a lane-skip block`). Narrowing `s_and_b64` / `s_andn2_b64`, the gather and signed-CMPX join restores, and the restore right after a nested skip closes stay accepted. - The 21 `s_mov_b64` first refusals in the ranking are, by disassembly, the group exchange without its EXEC save (60 bytes instead of 64, every other word identical). The matcher accepts that form; a later EXEC restore from a pair that was never saved is still refused. What those 21 requests refuse next is not measured. - `prepare_native_mesh57`: the `profile input bytes differ` refusal names the first part that differs (length or content). Accepted and refused profiles are unchanged.
Leyukaka commented 2026-11-29 06:06:40 +00:00 (Migrated from github.com)
Author
Contributor

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


Still on this. The five changes listed above are committed on top of main 212d4b5f; PRs not opened yet.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7251654364 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7251654364). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T06:06:40Z. --- Still on this. The five changes listed above are committed on top of `main` `212d4b5f`; PRs not opened yet.
Leyukaka commented 2026-11-29 07:49:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T07:49:49Z.


Still on this. The five changes listed above merge cleanly onto the current main eab7180c; PRs not opened yet.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7252717464 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7252717464). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T07:49:49Z. --- Still on this. The five changes listed above merge cleanly onto the current `main` `eab7180c`; PRs not opened yet.
Leyukaka commented 2026-11-29 09:19:35 +00:00 (Migrated from github.com)
Author
Contributor

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


Status on main 1a0120ba:

  • #3418 --refusals counts slot 57 requests: merged (1a0120ba).
  • #3420 named refusals for unmatched exchange shapes: merged (41babe6e).
  • #3422 refuse VGPRs written under a narrowed EXEC and read after the count exchange: merged (b8c68ee9).
  • #3423 VCC branch on a wave-uniform compare: merged (d58a9f63).
  • #3438 six added cases for mesh refusal paths (tests only): open.
  • #3439 v_readfirstlane_b32 of a proven wave-uniform VGPR, plus s_sub_i32 / s_mul_hi_u32: open.
  • #3440 profile input bytes differ names the first differing part: open.
  • #3443 refuse EXEC widening inside an open lane-skip block: open.
  • #3444 group exchange without the EXEC save: open.
  • #3445 s_max_u32 and v_mul_hi_u32: open.

Each open PR merges cleanly onto 1a0120ba. Between them (git merge-tree --write-tree, pairwise): #3438 and #3439 conflict in tests/native_direct_mesh_check.py, #3439 and #3445 in src/gfx1013_direct_mesh.inl. No other pair conflicts. I will rebase whichever lands second.

Left from the plan: mesh entry root inputs from the creation root signature (offline). It is committed locally on 1a0120ba and has no PR yet.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7253687876 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7253687876). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T09:19:35Z. --- Status on `main` `1a0120ba`: - #3418 `--refusals` counts slot 57 requests: merged (`1a0120ba`). - #3420 named refusals for unmatched exchange shapes: merged (`41babe6e`). - #3422 refuse VGPRs written under a narrowed EXEC and read after the count exchange: merged (`b8c68ee9`). - #3423 VCC branch on a wave-uniform compare: merged (`d58a9f63`). - #3438 six added cases for mesh refusal paths (tests only): open. - #3439 `v_readfirstlane_b32` of a proven wave-uniform VGPR, plus `s_sub_i32` / `s_mul_hi_u32`: open. - #3440 `profile input bytes differ` names the first differing part: open. - #3443 refuse EXEC widening inside an open lane-skip block: open. - #3444 group exchange without the EXEC save: open. - #3445 `s_max_u32` and `v_mul_hi_u32`: open. Each open PR merges cleanly onto `1a0120ba`. Between them (`git merge-tree --write-tree`, pairwise): #3438 and #3439 conflict in `tests/native_direct_mesh_check.py`, #3439 and #3445 in `src/gfx1013_direct_mesh.inl`. No other pair conflicts. I will rebase whichever lands second. Left from the plan: mesh entry root inputs from the creation root signature (offline). It is committed locally on `1a0120ba` and has no PR yet.
Leyukaka commented 2026-11-29 11:23:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T11:23:45Z.


#3450 (open, head a87c6f7e, on main e358cf5f) refuses three mesh program shapes that main accepts and translates to wrong DXIL: a VGPR left partial by writes under narrowed EXEC and read after an s_or_b64 / s_and_b64 / s_andn2_b64 EXEC write that can add lanes; a scalar ALU write to exec_lo / exec_hi outside a lane-skip block, which leaves the lane state on the old mask; and a scalar ALU write to vcc_lo / vcc_hi, whose word is then used as the predicate of every lane.

#3439 will be rebased on it once it is merged: its two added SOP2 opcodes (s_sub_i32, s_mul_hi_u32) go through the same guarded handler.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7255082463 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7255082463). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T11:23:45Z. --- #3450 (open, head `a87c6f7e`, on `main` `e358cf5f`) refuses three mesh program shapes that `main` accepts and translates to wrong DXIL: a VGPR left partial by writes under narrowed EXEC and read after an `s_or_b64` / `s_and_b64` / `s_andn2_b64` EXEC write that can add lanes; a scalar ALU write to `exec_lo` / `exec_hi` outside a lane-skip block, which leaves the lane state on the old mask; and a scalar ALU write to `vcc_lo` / `vcc_hi`, whose word is then used as the predicate of every lane. #3439 will be rebased on it once it is merged: its two added SOP2 opcodes (`s_sub_i32`, `s_mul_hi_u32`) go through the same guarded handler.
Leyukaka commented 2026-11-29 18:53:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T18:53:54Z.


Seven slot 57 PRs are open and ready for review. All are mergeable against main and their PR checks are green. Order that lets each one merge without carrying another:

  1. #3483 (78693088): counters for each exit of native slot 57 preparation. Depends on: nothing. CI: green.
  2. #3496 (6a9d2a02): sampleLevel at level 0 for a constant-coordinate nonuniform IMAGE_SAMPLE, fixes #3489. Depends on: nothing. CI: green.
  3. #3497 (1014e85f): tool that builds a .mesh57-state profile from a runtime capture. Depends on: nothing. CI: green.
  4. #3503 (ea3a90c2): mesh-layout blend words read at +0x124 instead of +0xD0. Depends on: nothing. CI: green.
  5. #3493 (196adf8c): PS-less (depth-only) slot 57 pipelines admitted with a reviewed profile. Depends on: #3483 (contains its commit). CI: green.
  6. #3502 (4991e866): bound target formats recorded in a .t57 file next to the creation capture. Depends on: #3493 (only the last commit is new). CI: green.
  7. #3505 (5b05bac2): depth-only profiles and a draft mode in the profile tool. Depends on: #3493, #3497 and #3503 (contains their commits). CI: green.

1 to 4 are independent of each other and can merge in any order. #3493 is the one that unblocks #3502 and #3505; once 1 to 5 are merged, the last two show only their own commits. #3505 reads the .t57 file from #3502 as an input but does not contain its code.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7260846204 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7260846204). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T18:53:54Z. --- Seven slot 57 PRs are open and ready for review. All are mergeable against `main` and their PR checks are green. Order that lets each one merge without carrying another: 1. #3483 (`78693088`): counters for each exit of native slot 57 preparation. Depends on: nothing. CI: green. 2. #3496 (`6a9d2a02`): `sampleLevel` at level 0 for a constant-coordinate nonuniform `IMAGE_SAMPLE`, fixes #3489. Depends on: nothing. CI: green. 3. #3497 (`1014e85f`): tool that builds a `.mesh57-state` profile from a runtime capture. Depends on: nothing. CI: green. 4. #3503 (`ea3a90c2`): mesh-layout blend words read at +0x124 instead of +0xD0. Depends on: nothing. CI: green. 5. #3493 (`196adf8c`): PS-less (depth-only) slot 57 pipelines admitted with a reviewed profile. Depends on: #3483 (contains its commit). CI: green. 6. #3502 (`4991e866`): bound target formats recorded in a `.t57` file next to the creation capture. Depends on: #3493 (only the last commit is new). CI: green. 7. #3505 (`5b05bac2`): depth-only profiles and a draft mode in the profile tool. Depends on: #3493, #3497 and #3503 (contains their commits). CI: green. 1 to 4 are independent of each other and can merge in any order. #3493 is the one that unblocks #3502 and #3505; once 1 to 5 are merged, the last two show only their own commits. #3505 reads the `.t57` file from #3502 as an input but does not contain its code.
lukaslw-lab commented 2026-11-30 13:29:37 +00:00 (Migrated from github.com)
Author
Contributor

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


Call-weighted input for the C++ ranking, from a 360 s native run from a saved scene (details and tree in #3541). Each refused DispatchMesh key maps to its .s57 variant and request. Offsets are as compile_dxil prints them, from the start of the .m57:

Updated 1 Dec: claims and PR states.

C++ first refusal Requests Refused calls First site Claim
mesh heap slot lacks masked root constant provenance 77a438d6, 12f152df 1.13 M 77a438d6 +0x2a0: s_load_dwordx4 s[36:39], s[16:17], s23, slot = s_buffer_load_dword s23, s[36:39], 0x7f8 << 5 translator: lukaslw-lab, #3619 (merged; opt-in through the layout's heap_tokens). Runtime binding open, to build on #3023 stage 3 (#2413 note). Until then the runtime still refuses here
mesh EXEC write inside a lane-skip block f2b3d808, 2319d05e 0.78 M f2b3d808 +0x70c: s_mov_b64 exec, s[20:21] mumba17, #3633 + #3646 (merged). 8 of 454 cached requests remain; they need lane-merge support (free)
graphics register undefined on an incoming path: 265 3e824362 0.47 M +0x46c: exp pos0 ... done after v_cmpx_gt_i32 + s_cbranch_execz; the pos0 export is skipped on one path mumba17, PR #3671 (open) (#2413)
unsupported mesh instruction or EXEC state: v_readfirstlane_b32 33f028d7, 88fef298 0.42 M 33f028d7 +0x370: v_readfirstlane_b32 s10, v8, at a branch join SimSalabimse, in progress (#2413)

Further stops from the 454-request census (request counts, not call-weighted), all mumba17:

  • s_movk_i32 / s_xor_b32: #3635, merged.
  • v_bfm_b32 / v_bcnt_u32_b32: #3655, merged.
  • s_and_saveexec_b64 inside a lane skip: #3645, open.
  • VCC-mask and if-only SAVEEXEC: #3668, open, stacked on #3645.

Census with the open PRs stacked: Kawiu, #2413 (392 captured requests).

  • v_cvt_f16_f32 (10), v_cmpx_eq_i32 (7), v_cmpx_lt_f32 (6): Kawiu, #3666 (open).
  • v_sub_co_u32, v_subrev_co_u32, v_and_or_b32: SimSalabimse, #3659 (draft).
  • Free: unsupported mesh heap descriptor address (46). Claim on #2413.

These are the top seven slot 57 variants: 2.8 M of the 7.2 M mesh_profile_missing calls. Another 7.5 M refused calls go through slot 55 derived pipelines, which #3413 addresses.

To reproduce a row, put the three request files in one folder and pass this layout. These are the flags native preparation sets. The vertex and primitive limits are placeholders that do not change these refusals:

mesh1 128 128 128 2 128 64
packed_parameters
validate_uint_heap_reads
guest_root
compile_dxil --refusals <dir> --json --mesh-layout <layout>
compile_dxil <sdk> <cache> gfx1013-raw-ms <key>.m57 <out>   # prints the +offset; needs <key>.mslayout and <key>.root beside it
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7279924248 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7279924248). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-30T13:29:37Z. --- Call-weighted input for the C++ ranking, from a 360 s native run from a saved scene (details and tree in #3541). Each refused `DispatchMesh` key maps to its `.s57` variant and request. Offsets are as `compile_dxil` prints them, from the start of the `.m57`: **Updated 1 Dec:** claims and PR states. | C++ first refusal | Requests | Refused calls | First site | Claim | |---|---|---|---|---| | `mesh heap slot lacks masked root constant provenance` | `77a438d6`, `12f152df` | 1.13 M | `77a438d6` +0x2a0: `s_load_dwordx4 s[36:39], s[16:17], s23`, slot = `s_buffer_load_dword s23, s[36:39], 0x7f8` << 5 | translator: lukaslw-lab, #3619 (merged; opt-in through the layout's `heap_tokens`). **Runtime binding open**, to build on #3023 stage 3 ([#2413 note](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7286597811)). Until then the runtime still refuses here | | `mesh EXEC write inside a lane-skip block` | `f2b3d808`, `2319d05e` | 0.78 M | `f2b3d808` +0x70c: `s_mov_b64 exec, s[20:21]` | mumba17, #3633 + #3646 (merged). 8 of 454 cached requests remain; they need lane-merge support (free) | | `graphics register undefined on an incoming path: 265` | `3e824362` | 0.47 M | +0x46c: `exp pos0 ... done` after `v_cmpx_gt_i32` + `s_cbranch_execz`; the pos0 export is skipped on one path | mumba17, PR #3671 (open) ([#2413](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7294482863)) | | `unsupported mesh instruction or EXEC state: v_readfirstlane_b32` | `33f028d7`, `88fef298` | 0.42 M | `33f028d7` +0x370: `v_readfirstlane_b32 s10, v8`, at a branch join | SimSalabimse, in progress ([#2413](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7296064841)) | Further stops from the 454-request census (request counts, not call-weighted), all mumba17: - `s_movk_i32` / `s_xor_b32`: #3635, merged. - `v_bfm_b32` / `v_bcnt_u32_b32`: #3655, merged. - `s_and_saveexec_b64` inside a lane skip: #3645, open. - VCC-mask and if-only SAVEEXEC: #3668, open, stacked on #3645. Census with the open PRs stacked: Kawiu, [#2413](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7293877892) (392 captured requests). - `v_cvt_f16_f32` (10), `v_cmpx_eq_i32` (7), `v_cmpx_lt_f32` (6): Kawiu, #3666 (open). - `v_sub_co_u32`, `v_subrev_co_u32`, `v_and_or_b32`: SimSalabimse, #3659 (draft). - Free: `unsupported mesh heap descriptor address` (46). Claim on #2413. These are the top seven slot 57 variants: 2.8 M of the 7.2 M `mesh_profile_missing` calls. Another 7.5 M refused calls go through slot 55 derived pipelines, which #3413 addresses. To reproduce a row, put the three request files in one folder and pass this layout. These are the flags native preparation sets. The vertex and primitive limits are placeholders that do not change these refusals: ``` mesh1 128 128 128 2 128 64 packed_parameters validate_uint_heap_reads guest_root ``` ```powershell compile_dxil --refusals <dir> --json --mesh-layout <layout> compile_dxil <sdk> <cache> gfx1013-raw-ms <key>.m57 <out> # prints the +offset; needs <key>.mslayout and <key>.root beside it ```
Leyukaka commented 2026-12-01 15:47:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T15:47:35Z.


Next step here: verify one reviewed slot 57 profile end to end.

The call-weighted census above already identifies the slot 57 variants that account for the most refused indirect DispatchMesh calls. Use its archive mapping to select the first variant that the C++ frontend already translates and that has complete captured state and attachment evidence. If a new run is needed, rank the cumulative DispatchMesh refusals by pipeline and record the unmatched and overflow counts separately.

Use the draft and validation tools from #3724 to review the captured state and attachment tuple. Start a second process with the reviewed profile present in the cache from startup. This step depends on the profile identity rule from #3748 or #3730, and on one .t57 producer (#3736 or #3502); none is merged. Record profile readiness and indirect DispatchMesh forwards for the selected pipeline. Repeat with that profile removed and the workload held fixed.

Acceptance requires at least one ready profile and one forwarded indirect DispatchMesh attributed to the selected pipeline with the reviewed profile installed. Record the first lowering or binding refusal if readiness or forwarding remains zero. Use a source-built control to exercise the ready and missing-profile outcomes.

Related: #2413, #3724, #3736 / #3502 (attachment capture), #3748 / #3730 (profile identity), #3531 (published-pair control).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7316513668 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7316513668). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-01T15:47:35Z. --- Next step here: verify one reviewed slot 57 profile end to end. The call-weighted census above already identifies the slot 57 variants that account for the most refused indirect DispatchMesh calls. Use its archive mapping to select the first variant that the C++ frontend already translates and that has complete captured state and attachment evidence. If a new run is needed, rank the cumulative DispatchMesh refusals by pipeline and record the unmatched and overflow counts separately. Use the draft and validation tools from #3724 to review the captured state and attachment tuple. Start a second process with the reviewed profile present in the cache from startup. This step depends on the profile identity rule from #3748 or #3730, and on one .t57 producer (#3736 or #3502); none is merged. Record profile readiness and indirect DispatchMesh forwards for the selected pipeline. Repeat with that profile removed and the workload held fixed. Acceptance requires at least one ready profile and one forwarded indirect DispatchMesh attributed to the selected pipeline with the reviewed profile installed. Record the first lowering or binding refusal if readiness or forwarding remains zero. Use a source-built control to exercise the ready and missing-profile outcomes. Related: #2413, #3724, #3736 / #3502 (attachment capture), #3748 / #3730 (profile identity), #3531 (published-pair control).
Leyukaka commented 2026-12-02 20:48:33 +00:00 (Migrated from github.com)
Author
Contributor

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


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:7358350305 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3416#issuecomment-7358350305). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-02T20:48:33Z. --- 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#3416
No description provided.