Slot 86 (Mesh86) pixel stages: first refusal per stage, and what clears it #3814

Open
opened 2026-12-02 02:35:20 +00:00 by lukaslw-lab · 16 comments
lukaslw-lab commented 2026-12-02 02:35:20 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-02T02:35:20Z.


Refs #3640, #3641, #3703.

The Mesh86 work in #3703 tracks the mesh halves. The pixel halves of the same pipelines have their own walls. This
is an offline census of every captured slot 86 pixel stage through compile_dxil gfx1013-mesh86-ps, the same
translate_graphics_container call the runtime makes for a Mesh86 pair.

Capture: one arm-B run (X2W_NATIVE_MESH86=1) of the local case-study package, main 158ef794. Counts only, no
shader bytes. 6,436 distinct .ps86 + .root (24,817 requests); 11 are empty (depth-only, 2,958 requests) and are
refused before translation. (#3803 counts requests with no pixel stage in another cache, 987 of 3,876 .m86; this
table counts distinct stages from one run, so the two numbers do not compare directly.) The remaining 6,425 real
pixel stages:

First refusal Stages Requests Owner
graphics branch on a wave mask 3,370 11,300 flat two-armed CMPX if/else: us, #3815 (322 / 574 move); the rest open
DPP8 requires repeating quad-local selections 844 2,103 open
graphics wave or control-flow instruction 728 4,097 open
branch enters a masked graphics region 363 1,296 open
masked graphics region requires lane-local vector arithmetic 344 1,025 open
undefined graphics register 126 212 520 open
unsupported scalar memory addressing 116 534 open
graphics scalar condition depends on a varying input 73 248 open
branch enters a CMPX region 53 147 open
12 smaller walls 48 182 open
translates 272 406 —
  • Two-armed CMPX if/else (s_mov_b64 s[4:5], exec; v_cmpx_*; s_cbranch_execz ELSE; …; ELSE: s_andn2_b64 exec, s[4:5], exec; s_cbranch_execz JOIN; …; JOIN: s_mov_b64 exec, s[4:5]): pixel_readonly_arms only matched the
    one-armed skip. #3815 adds the flat form. On this census 322 stages (574 requests) move on; they next stop at
    "looping graphics shader uses an entry input operation after a branch" (315) and readfirstlane (9). The 24 pixel
    stages of the Mesh86 draws selected in the run all pass every CMPX region.
  • The rest of the wave-mask wall (3,048) is a long tail. In a sample of 150: one-armed EXECZ skips over scalar
    loads or WQM tails, SAVEEXEC fed by s_xor/s_or masks, a CMPX if nested inside an arm, and uniform
    vccnz/scc branches inside an arm.
  • First refusal only: clearing one wall shows the next, as on the mesh side.
  • Not covered here: validate_raster_link(ms, ps) and make_native_mesh86_root on the pair.

Command: ps86_census.py <compile_dxil> <dxc> <cache> <out> 0 6 (every distinct stage, 6 jobs). The script is a
local helper; I can add it under tools/ if that is useful.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6735556432 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-12-02T02:35:20Z. --- Refs #3640, #3641, #3703. The Mesh86 work in #3703 tracks the mesh halves. The pixel halves of the same pipelines have their own walls. This is an offline census of every captured slot 86 pixel stage through `compile_dxil gfx1013-mesh86-ps`, the same `translate_graphics_container` call the runtime makes for a Mesh86 pair. Capture: one arm-B run (`X2W_NATIVE_MESH86=1`) of the local case-study package, main `158ef794`. Counts only, no shader bytes. 6,436 distinct `.ps86` + `.root` (24,817 requests); 11 are empty (depth-only, 2,958 requests) and are refused before translation. (#3803 counts requests with no pixel stage in another cache, 987 of 3,876 `.m86`; this table counts distinct stages from one run, so the two numbers do not compare directly.) The remaining 6,425 real pixel stages: | First refusal | Stages | Requests | Owner | |---|---|---|---| | graphics branch on a wave mask | 3,370 | 11,300 | flat two-armed CMPX if/else: us, #3815 (322 / 574 move); the rest open | | DPP8 requires repeating quad-local selections | 844 | 2,103 | open | | graphics wave or control-flow instruction | 728 | 4,097 | open | | branch enters a masked graphics region | 363 | 1,296 | open | | masked graphics region requires lane-local vector arithmetic | 344 | 1,025 | open | | undefined graphics register 126 | 212 | 520 | open | | unsupported scalar memory addressing | 116 | 534 | open | | graphics scalar condition depends on a varying input | 73 | 248 | open | | branch enters a CMPX region | 53 | 147 | open | | 12 smaller walls | 48 | 182 | open | | translates | 272 | 406 | — | - **Two-armed CMPX if/else** (`s_mov_b64 s[4:5], exec; v_cmpx_*; s_cbranch_execz ELSE; …; ELSE: s_andn2_b64 exec, s[4:5], exec; s_cbranch_execz JOIN; …; JOIN: s_mov_b64 exec, s[4:5]`): `pixel_readonly_arms` only matched the one-armed skip. #3815 adds the flat form. On this census 322 stages (574 requests) move on; they next stop at "looping graphics shader uses an entry input operation after a branch" (315) and readfirstlane (9). The 24 pixel stages of the Mesh86 draws selected in the run all pass every CMPX region. - **The rest of the wave-mask wall** (3,048) is a long tail. In a sample of 150: one-armed EXECZ skips over scalar loads or WQM tails, SAVEEXEC fed by `s_xor`/`s_or` masks, a CMPX if nested inside an arm, and uniform `vccnz`/`scc` branches inside an arm. - First refusal only: clearing one wall shows the next, as on the mesh side. - Not covered here: `validate_raster_link(ms, ps)` and `make_native_mesh86_root` on the pair. Command: `ps86_census.py <compile_dxil> <dxc> <cache> <out> 0 6` (every distinct stage, 6 jobs). The script is a local helper; I can add it under `tools/` if that is useful. AI-assisted.
lukaslw-lab commented 2026-12-02 04:52:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-02T04:52:22Z.


Work split on main 0dd65da1

Same capture and method as above. Main now includes #3815: 272 of 6,425 real pixel stages translate. #3819 (WQM complementary arms) changes no first refusal on this capture: its shape is not the first one any of these stages reach.

The two largest refusals, split by the instruction shape at the refusal (offline disassembly of the refusing stages; only the refusal site and its branch target are classified, not the arm contents):

graphics branch on a wave mask (3,048 stages). Shares from a 600-stage random sample, scaled to 3,048:

Item Shape at the refusal ≈ Stages Owner
W1 one-armed CMPX skip to its restore, then s_and_b64 exec, exec, sN (coverage re-applied) 620 timbot103, #3829 (merged)
W2 one-armed CMPX skip to its restore, followed by scalar loads or SALU 550 timbot103, #3828 (merged)
W3 SAVEEXEC on an s_xor_b64 sN, sM, -1 mask ("if not") 370 timbot103, #3826 (merged)
W5 the skip lands on s_wqm_b64 (WQM re-entered after the arm) 270 timbot103, #3848 (draft)
W4 SAVEEXEC on an s_or_b64/s_and_b64 mask 260 timbot103, #3826 (merged)
W7 two-armed CMPX if/else whose arm holds something #3815 refuses 130 timbot103, #3850 (draft)
W6 waterfall loop: s_andn2_wrexec_b64 + backward s_cbranch_execnz, with v_readfirstlane 115 timbot103, #3839 (draft)
— long tail 730 open

graphics wave or control-flow instruction (728 stages, all classified):

Item Instruction Stages Owner
G1 a CMPX that kills lanes with no saved EXEC (alpha test: v_mul_legacy_f32 / v_fract_f32, then v_cmpx_lt/gt_f32) 566 timbot103, #3829 (merged); live-mask form (most of these): timbot103, #3847 (draft)
G2 s_and_b64 exec, exec, sN after interpolation (coverage mask) 86 timbot103, #3829 (merged)
G3 v_writelane_b32 (SGPR spill to a VGPR lane) 21 timbot103, #3834 (draft)
G4 s_and_b64 vcc, exec, vcc 16 timbot103, #3834 (draft)
— other 39 open

Other first refusals: DPP8 quad selection 844, branch into a masked region 363 (and into a CMPX region 53) (timbot103, #3849 draft), lane-local vector arithmetic in a masked region 344 (timbot103, #3840 draft), looping shader reads an input after a branch 315 (timbot103, #3831 merged), EXEC read at entry (undefined graphics register 126) 212 (timbot103, #3834 draft), scalar memory addressing 116 (timbot103, #3833 draft: DLC/GLC part), scalar condition on a varying input 73 (timbot103, #3845 draft), smaller ones 70.

  • W1, G1 and G2 look like one family: the alpha-test kill and the coverage re-application that follows it.
  • Owners updated 2 Dec from the claims below. Items marked open are unclaimed; claim one here, as on #3703.
  • Main 5770f14e (2 Dec): still 272 translate, of 6,436 stages run. With #3847 (draft, 7947b4e9) on top: 546, none lost.
  • Local stack check, 2 Dec: f365f125 + #3825 + #3826, #3828, #3829 still translates 272 (0 gained, 0 lost); 118 stages change their first refusal. Most G1 kills use a live-mask form that #3829 does not accept yet (details on #3829).
  • First refusal only.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7335346131 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7335346131). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-12-02T04:52:22Z. --- ## Work split on main `0dd65da1` Same capture and method as above. Main now includes #3815: **272 of 6,425 real pixel stages translate**. #3819 (WQM complementary arms) changes no first refusal on this capture: its shape is not the first one any of these stages reach. The two largest refusals, split by the instruction shape at the refusal (offline disassembly of the refusing stages; only the refusal site and its branch target are classified, not the arm contents): **`graphics branch on a wave mask` (3,048 stages).** Shares from a 600-stage random sample, scaled to 3,048: | Item | Shape at the refusal | ≈ Stages | Owner | |---|---|---:|---| | W1 | one-armed CMPX skip to its restore, then `s_and_b64 exec, exec, sN` (coverage re-applied) | 620 | timbot103, #3829 (merged) | | W2 | one-armed CMPX skip to its restore, followed by scalar loads or SALU | 550 | timbot103, #3828 (merged) | | W3 | SAVEEXEC on an `s_xor_b64 sN, sM, -1` mask ("if not") | 370 | timbot103, #3826 (merged) | | W5 | the skip lands on `s_wqm_b64` (WQM re-entered after the arm) | 270 | timbot103, #3848 (draft) | | W4 | SAVEEXEC on an `s_or_b64`/`s_and_b64` mask | 260 | timbot103, #3826 (merged) | | W7 | two-armed CMPX if/else whose arm holds something #3815 refuses | 130 | timbot103, #3850 (draft) | | W6 | waterfall loop: `s_andn2_wrexec_b64` + backward `s_cbranch_execnz`, with `v_readfirstlane` | 115 | timbot103, #3839 (draft) | | — | long tail | 730 | open | **`graphics wave or control-flow instruction` (728 stages, all classified):** | Item | Instruction | Stages | Owner | |---|---|---:|---| | G1 | a CMPX that kills lanes with no saved EXEC (alpha test: `v_mul_legacy_f32` / `v_fract_f32`, then `v_cmpx_lt/gt_f32`) | 566 | timbot103, #3829 (merged); live-mask form (most of these): timbot103, #3847 (draft) | | G2 | `s_and_b64 exec, exec, sN` after interpolation (coverage mask) | 86 | timbot103, #3829 (merged) | | G3 | `v_writelane_b32` (SGPR spill to a VGPR lane) | 21 | timbot103, #3834 (draft) | | G4 | `s_and_b64 vcc, exec, vcc` | 16 | timbot103, #3834 (draft) | | — | other | 39 | open | **Other first refusals:** DPP8 quad selection 844, branch into a masked region 363 (and into a CMPX region 53) (timbot103, #3849 draft), lane-local vector arithmetic in a masked region 344 (timbot103, #3840 draft), looping shader reads an input after a branch 315 (timbot103, #3831 merged), EXEC read at entry (`undefined graphics register 126`) 212 (timbot103, #3834 draft), scalar memory addressing 116 (timbot103, #3833 draft: DLC/GLC part), scalar condition on a varying input 73 (timbot103, #3845 draft), smaller ones 70. - W1, G1 and G2 look like one family: the alpha-test kill and the coverage re-application that follows it. - Owners updated 2 Dec from the claims below. Items marked open are unclaimed; claim one here, as on #3703. - Main `5770f14e` (2 Dec): still 272 translate, of 6,436 stages run. With #3847 (draft, `7947b4e9`) on top: **546**, none lost. - Local stack check, 2 Dec: `f365f125` + #3825 + #3826, #3828, #3829 still translates 272 (0 gained, 0 lost); 118 stages change their first refusal. Most G1 kills use a live-mask form that #3829 does not accept yet (details on #3829). - First refusal only. AI-assisted.
timbot103 commented 2026-12-02 06:42:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T06:42:17Z.


Claiming three independent pixel-stage slices from the 0dd65da1 split above (each as its own focused PR with dedicated source-built DXIL + GPU readback fixtures):

  1. G1 + G2 + W1 (~1,272 stages): alpha-test v_cmpx_* lane kill without saved EXEC, post-interpolation coverage re-application (s_and_b64 exec, exec, sN), and one-armed CMPX skips followed by coverage re-application.
  2. W3 + W4 (~630 stages): wave64 pixel s_and_saveexec_b64 fed by s_xor_b64 sN, sM, -1 / s_not_b64 ("if not") and s_or_b64 / s_and_b64 / s_andn2_b64 compare-mask combinations.
  3. W2 (~550 stages): one-armed CMPX skips to restore with scalar loads / SALU (within the arm or in the restore tail, expiring modified scalar registers at the restore).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7337312975 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7337312975). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T06:42:17Z. --- Claiming three independent pixel-stage slices from the `0dd65da1` split above (each as its own focused PR with dedicated source-built DXIL + GPU readback fixtures): 1. **G1 + G2 + W1** (~1,272 stages): alpha-test `v_cmpx_*` lane kill without saved EXEC, post-interpolation coverage re-application (`s_and_b64 exec, exec, sN`), and one-armed CMPX skips followed by coverage re-application. 2. **W3 + W4** (~630 stages): wave64 pixel `s_and_saveexec_b64` fed by `s_xor_b64 sN, sM, -1` / `s_not_b64` ("if not") and `s_or_b64` / `s_and_b64` / `s_andn2_b64` compare-mask combinations. 3. **W2** (~550 stages): one-armed CMPX skips to restore with scalar loads / SALU (within the arm or in the restore tail, expiring modified scalar registers at the restore).
timbot103 commented 2026-12-02 07:27:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T07:27:48Z.


All three claimed slices are now open for review:

  • W3 + W4 (s_and_saveexec_b64 lane-mask expressions): #3826
  • W2 (one-armed CMPX skips with scalar loads / SALU in arm, tail, and after restore): #3828
  • G1 + G2 + W1 (alpha-test v_cmpx_* kills, s_and_b64 exec, exec, sN coverage re-application, and combined one-armed CMPX coverage restore): #3829
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7338212358 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7338212358). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T07:27:48Z. --- All three claimed slices are now open for review: - **W3 + W4** (`s_and_saveexec_b64` lane-mask expressions): #3826 - **W2** (one-armed CMPX skips with scalar loads / SALU in arm, tail, and after restore): #3828 - **G1 + G2 + W1** (alpha-test `v_cmpx_*` kills, `s_and_b64 exec, exec, sN` coverage re-application, and combined one-armed CMPX coverage restore): #3829
timbot103 commented 2026-12-02 07:45:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T07:45:58Z.


Claiming three more disjoint #3814 slices (will stage as Draft PRs per #3514 until our active review slots open, each with source-built DXIL + WARP/RTX 5080 hardware tests):

  1. looping graphics shader uses an entry input operation after a branch (~315 stages — the main second wall uncovered by #3815): emit_graphics_loops entry interpolation / barycentric handling.
  2. unsupported scalar memory addressing (~116 stages): safe read-only graphics SMEM addressing forms.
  3. undefined graphics register 126 (entry EXEC reads, ~212) + G3 (v_writelane_b32, 21) + G4 (s_and_b64 vcc, exec, vcc, 16) (~249 stages).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7338582280 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7338582280). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T07:45:58Z. --- Claiming three more disjoint `#3814` slices (will stage as Draft PRs per #3514 until our active review slots open, each with source-built DXIL + WARP/RTX 5080 hardware tests): 1. **`looping graphics shader uses an entry input operation after a branch`** (~315 stages — the main second wall uncovered by #3815): `emit_graphics_loops` entry interpolation / barycentric handling. 2. **`unsupported scalar memory addressing`** (~116 stages): safe read-only graphics SMEM addressing forms. 3. **`undefined graphics register 126` (entry EXEC reads, ~212) + G3 (`v_writelane_b32`, 21) + G4 (`s_and_b64 vcc, exec, vcc`, 16)** (~249 stages).
timbot103 commented 2026-12-02 08:04:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T08:04:55Z.


Wave 1 Draft PRs opened (and claiming 2 more disjoint #3814 slices to stage as Drafts per #3514):

  • Opened Drafts: #3831 (loop entry interpolation), #3833 (graphics SMEM DLC/GLC cache policies).
  • Claiming next (disjoint from pixel_readonly_arms and emit_graphics_loops):
    1. masked graphics region requires lane-local vector arithmetic (~344 stages): extend safe lane-local ops inside flattened masked regions (GraphicsMaskRegions).
    2. W6 pixel descriptor waterfall loops (~115 stages): extend PixelWaterfalls (src/gfx1013_pixel_waterfall.inl) for s_clause, v_cmp_eq_* + s_and_saveexec_b64 partition form, explicit-LOD / additional image ops, non-in-place s_lshl_b32, and constant descriptor offsets.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7338978858 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7338978858). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T08:04:55Z. --- Wave 1 Draft PRs opened (and claiming 2 more disjoint `#3814` slices to stage as Drafts per #3514): - Opened Drafts: #3831 (loop entry interpolation), #3833 (graphics SMEM DLC/GLC cache policies). - Claiming next (disjoint from `pixel_readonly_arms` and `emit_graphics_loops`): 1. **`masked graphics region requires lane-local vector arithmetic`** (~344 stages): extend safe lane-local ops inside flattened masked regions (`GraphicsMaskRegions`). 2. **W6 pixel descriptor waterfall loops** (~115 stages): extend `PixelWaterfalls` (`src/gfx1013_pixel_waterfall.inl`) for `s_clause`, `v_cmp_eq_* + s_and_saveexec_b64` partition form, explicit-LOD / additional image ops, non-in-place `s_lshl_b32`, and constant descriptor offsets.
timbot103 commented 2026-12-02 08:23:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T08:23:23Z.


Draft PRs opened & claiming next disjoint #3814 slice (staged as Draft per #3514):

  • Opened Drafts: #3834 (entry EXEC masks + G3 v_writelane_b32 + G4 s_and_b64 vcc, exec, vcc), #3839 (W6 pixel descriptor waterfall extensions — updating link once created).
  • Claiming next: graphics scalar condition depends on a varying input (73 stages — safe wave/quad-uniform scalar branch proofs and per-lane scalar-compare reconvergence where sound).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7339378933 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7339378933). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T08:23:23Z. --- Draft PRs opened & claiming next disjoint `#3814` slice (staged as Draft per #3514): - Opened Drafts: #3834 (entry EXEC masks + G3 `v_writelane_b32` + G4 `s_and_b64 vcc, exec, vcc`), #3839 (W6 pixel descriptor waterfall extensions — updating link once created). - Claiming next: **`graphics scalar condition depends on a varying input`** (73 stages — safe wave/quad-uniform scalar branch proofs and per-lane scalar-compare reconvergence where sound).
timbot103 commented 2026-12-02 08:35:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T08:35:06Z.


Wave 2 Draft PRs opened & claiming next unclaimed #3814 slices (staged as Drafts per #3514):

  • Opened Drafts: #3839 (W6 pixel descriptor waterfalls), #3840 (lane-local operations in masked pixel regions).
  • Claiming next:
    1. Live-mask G1 + G2 alpha-kill triple (the s_mov_b64 sK, exec -> v_cmpx_* -> s_andn2_b64 sK, sK, exec -> s_cbranch_scc0 L -> s_and_b64 exec, sC, sK form noted on #3829, ~566 stages).
    2. branch enters a masked graphics region (363) + branch enters a CMPX region (53) (416 stages).
    3. W5 (~270 stages): one-armed skip landing on s_wqm_b64 (WQM re-entered after the arm).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7339649029 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7339649029). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T08:35:06Z. --- Wave 2 Draft PRs opened & claiming next unclaimed `#3814` slices (staged as Drafts per #3514): - Opened Drafts: #3839 (W6 pixel descriptor waterfalls), #3840 (lane-local operations in masked pixel regions). - Claiming next: 1. **Live-mask G1 + G2 alpha-kill triple** (the `s_mov_b64 sK, exec` -> `v_cmpx_*` -> `s_andn2_b64 sK, sK, exec` -> `s_cbranch_scc0 L` -> `s_and_b64 exec, sC, sK` form noted on #3829, ~566 stages). 2. **`branch enters a masked graphics region` (363) + `branch enters a CMPX region` (53)** (416 stages). 3. **W5** (~270 stages): one-armed skip landing on `s_wqm_b64` (WQM re-entered after the arm).
timbot103 commented 2026-12-02 08:44:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T08:44:15Z.


Early Wave 3 Draft PR opened & claiming W7 (staged as Drafts per #3514):

  • Opened Draft: #3845 (shader/pixel-varying-scalar-cond — varying pixel VCCZ shortcuts + uniform VGPR comparisons, 73 stages; 21 WARP + RTX 5080 draws).
  • Claiming W7 (~130 stages): extended arm operations & inner masked patterns in two-armed pixel CMPX if/else (pixel_readonly_arms, building on #3815).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7339858197 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7339858197). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T08:44:15Z. --- Early Wave 3 Draft PR opened & claiming W7 (staged as Drafts per #3514): - Opened Draft: #3845 (`shader/pixel-varying-scalar-cond` — varying pixel `VCCZ` shortcuts + uniform VGPR comparisons, 73 stages; 21 WARP + RTX 5080 draws). - Claiming **W7** (~130 stages): extended arm operations & inner masked patterns in two-armed pixel CMPX if/else (`pixel_readonly_arms`, building on #3815).
timbot103 commented 2026-12-02 09:01:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T09:01:30Z.


Wave 3 #3814 Draft PRs opened (staged as Drafts per #3514):

  • #3847 (shader/pixel-live-mask-kill): live-mask G1+G2 alpha kills (s_mov_b64 sK, exec -> v_cmpx_* -> s_andn2_b64 sK, sK, exec -> s_cbranch_scc0 -> s_and_b64 exec, sC, sK, ~566 stages) + --startup-pixel-atomic atomic-after-kill GPU readback + mesh86-pixel-execz.md update.
  • #3848 (shader/pixel-w5-wqm-reentry): W5 whole-quad s_wqm_b64 EXECZ joins (~270 stages).
  • #3849 (shader/pixel-branch-masked-region): structured branches & shared restores in masked/CMPX pixel regions (416 stages).
  • #3850 (shader/pixel-w7-cmpx-ifelse): W7 extended two-armed CMPX if/else arms (~130 stages).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7340258534 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7340258534). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-02T09:01:30Z. --- Wave 3 `#3814` Draft PRs opened (staged as Drafts per #3514): - #3847 (`shader/pixel-live-mask-kill`): live-mask G1+G2 alpha kills (`s_mov_b64 sK, exec` -> `v_cmpx_*` -> `s_andn2_b64 sK, sK, exec` -> `s_cbranch_scc0` -> `s_and_b64 exec, sC, sK`, ~566 stages) + `--startup-pixel-atomic` atomic-after-kill GPU readback + `mesh86-pixel-execz.md` update. - #3848 (`shader/pixel-w5-wqm-reentry`): W5 whole-quad `s_wqm_b64` EXECZ joins (~270 stages). - #3849 (`shader/pixel-branch-masked-region`): structured branches & shared restores in masked/CMPX pixel regions (416 stages). - #3850 (`shader/pixel-w7-cmpx-ifelse`): W7 extended two-armed CMPX if/else arms (~130 stages).
lukaslw-lab commented 2026-12-02 23:27:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-02T23:27:13Z.


Claiming graphics readfirstlane requires a wave-uniform reaching value where the read is in a loop (332 stages / 612 requests stop at this refusal on main 517854f0b; not a row on the board above).

  • Seen in two control-flow shapes I disassembled (24 stages): the loop counter is carried over the back-edge by v_readfirstlane_b32. Uniform facts are not recorded for general vector ALU inside loops.
  • Plan: check these reads after finish_loop_dependencies(), as the loop branch conditions already are.
  • A local prototype moves 322 of the 332 to unsupported wave64 scalar mask operation (s_cselect_b64 sN, exec, 0 in the 24); 10 stay, not looked at. 0 gained, 0 lost: this only exposes the next wall.
  • Not covered: v_readfirstlane_b32 inside a CMPX arm (#3850), and the s_cselect_b64 wall behind it.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7362014266 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7362014266). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-12-02T23:27:13Z. --- Claiming `graphics readfirstlane requires a wave-uniform reaching value` where the read is in a loop (332 stages / 612 requests stop at this refusal on main `517854f0b`; not a row on the board above). - Seen in two control-flow shapes I disassembled (24 stages): the loop counter is carried over the back-edge by `v_readfirstlane_b32`. Uniform facts are not recorded for general vector ALU inside loops. - Plan: check these reads after `finish_loop_dependencies()`, as the loop branch conditions already are. - A local prototype moves 322 of the 332 to `unsupported wave64 scalar mask operation` (`s_cselect_b64 sN, exec, 0` in the 24); 10 stay, not looked at. 0 gained, 0 lost: this only exposes the next wall. - Not covered: `v_readfirstlane_b32` inside a CMPX arm (#3850), and the `s_cselect_b64` wall behind it. AI-assisted.
lukaslw-lab commented 2026-12-02 23:38:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-02T23:38:14Z.


Work split on main 517854f0b

Same capture and method as above. 272 of 6,436 stages translate (unchanged since 0dd65da1). The merged slices moved stages
onward without new passes. Shapes come from offline disassembly of the refusing stages. They are classified by the instruction at the
refusal and its branch target only, not by the arm contents. Item names are new; the 0dd65da1 items are linked where the shape is
the same.

Item First refusal / shape Stages Owner
L1 graphics readfirstlane requires a wave-uniform reaching value: loop counter carried over the back edge 332 lukaslw-lab, #3904 (merged) (claim)
L2 s_cselect_b64 sN, exec, 0 in a loop: next refusal of 322 of L1's stages (322) open
L3 in a loop, a phi at a CMPX-arm merge counts as varying even for registers the arm does not write not counted open
E1 undefined graphics register 126: s_cselect_b64 sN, exec, 0 (118 of 224) and s_mov_b64 sN, exec (100) 224 timbot103, #3834 (merged)
K1 graphics wave or control-flow instruction: alpha kill v_cmpx_gt/lt_f32 with no saved EXEC (573 of 648) 573 timbot103, #3847 (merged; on 5770f14e: +274 OK)
K2 same refusal: v_writelane_b32 (23), s_and_b64 with EXEC (30) 53 timbot103, #3834 (merged)
D1 DPP8 requires repeating quad-local selections: v_min_u32_dpp (≈ 515) and v_or_b32_dpp (≈ 330) with dpp8 844 open
F1 pixel descriptor waterfall, five reasons 774 timbot103, #3839 (merged; on 5770f14e: 252 moved, 0 OK)
M1 lane-local vector arithmetic in a masked region 211 timbot103, #3840 (merged)
M2 branch enters a masked region (144) or a CMPX region (16) 160 timbot103, #3849 (draft)
S1 unsupported scalar memory addressing 116 timbot103, #3833 (merged)
Q1 unsupported exact-mask operation after whole-quad entry (76 moved here from graphics wave or control-flow instruction since 5770f14e) 80 open
V1 graphics scalar condition depends on a varying input 73 timbot103, #3845 (merged)

graphics branch on a wave mask (2,636). 600-stage random sample, 496 in the 25 most common shapes, scaled to 2,636:

Item Shape at the refusal ≈ Stages Owner
B1 one-armed CMPX skip to its restore, then coverage s_and_b64 exec, … (the W1 shape) 655 open: still refused after #3829
B2 one-armed skip to its restore, then scalar loads or SALU (W2 shape) 490 open: still refused after #3828
B3 SAVEEXEC on s_xor_b64 sN, sM, -1 (W3 shape) 390 open: still refused after #3826
B4 SAVEEXEC on s_or_b64/s_and_b64 (W4 shape) 240 open: still refused after #3826
B5 two-armed if/else, skip lands on s_andn2_b64 exec (W7 shape) 205 timbot103, #3850 (draft; 0 moved on 5770f14e)
B6 skip lands on s_wqm_b64 (W5 shape) 200 timbot103, #3848 (open; 0 moved on 5770f14e)
— long tail 455 open
  • Why B1–B4 still refuse after the merged slices is not checked: the classifier sees only the refusal site.
  • Not covered: validate_raster_link(ms, ps) and make_native_mesh86_root on the pair.
  • Owners updated 3 Dec 04:42 UTC (#3833, #3834, #3839, #3840, #3845, #3847, #3904 merged; #3848 out of draft). Counts are still from 517854f0b; a new census follows.
  • First refusal only.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7362244678 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7362244678). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-12-02T23:38:14Z. --- ## Work split on main `517854f0b` Same capture and method as above. **272 of 6,436 stages translate** (unchanged since `0dd65da1`). The merged slices moved stages onward without new passes. Shapes come from offline disassembly of the refusing stages. They are classified by the instruction at the refusal and its branch target only, not by the arm contents. Item names are new; the `0dd65da1` items are linked where the shape is the same. | Item | First refusal / shape | Stages | Owner | |---|---|---:|---| | L1 | `graphics readfirstlane requires a wave-uniform reaching value`: loop counter carried over the back edge | 332 | **lukaslw-lab**, #3904 (merged) ([claim](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7362014266)) | | L2 | `s_cselect_b64 sN, exec, 0` in a loop: next refusal of 322 of L1's stages | (322) | open | | L3 | in a loop, a phi at a CMPX-arm merge counts as varying even for registers the arm does not write | not counted | open | | E1 | `undefined graphics register 126`: `s_cselect_b64 sN, exec, 0` (118 of 224) and `s_mov_b64 sN, exec` (100) | 224 | timbot103, #3834 (merged) | | K1 | `graphics wave or control-flow instruction`: alpha kill `v_cmpx_gt/lt_f32` with no saved EXEC (573 of 648) | 573 | timbot103, #3847 (merged; on `5770f14e`: +274 OK) | | K2 | same refusal: `v_writelane_b32` (23), `s_and_b64` with EXEC (30) | 53 | timbot103, #3834 (merged) | | D1 | `DPP8 requires repeating quad-local selections`: `v_min_u32_dpp` (≈ 515) and `v_or_b32_dpp` (≈ 330) with `dpp8` | 844 | open | | F1 | pixel descriptor waterfall, five reasons | 774 | timbot103, #3839 (merged; on `5770f14e`: 252 moved, 0 OK) | | M1 | lane-local vector arithmetic in a masked region | 211 | timbot103, #3840 (merged) | | M2 | branch enters a masked region (144) or a CMPX region (16) | 160 | timbot103, #3849 (draft) | | S1 | unsupported scalar memory addressing | 116 | timbot103, #3833 (merged) | | Q1 | `unsupported exact-mask operation after whole-quad entry` (76 moved here from `graphics wave or control-flow instruction` since `5770f14e`) | 80 | open | | V1 | graphics scalar condition depends on a varying input | 73 | timbot103, #3845 (merged) | **`graphics branch on a wave mask` (2,636).** 600-stage random sample, 496 in the 25 most common shapes, scaled to 2,636: | Item | Shape at the refusal | ≈ Stages | Owner | |---|---|---:|---| | B1 | one-armed CMPX skip to its restore, then coverage `s_and_b64 exec, …` (the W1 shape) | 655 | open: still refused after #3829 | | B2 | one-armed skip to its restore, then scalar loads or SALU (W2 shape) | 490 | open: still refused after #3828 | | B3 | SAVEEXEC on `s_xor_b64 sN, sM, -1` (W3 shape) | 390 | open: still refused after #3826 | | B4 | SAVEEXEC on `s_or_b64`/`s_and_b64` (W4 shape) | 240 | open: still refused after #3826 | | B5 | two-armed if/else, skip lands on `s_andn2_b64 exec` (W7 shape) | 205 | timbot103, #3850 (draft; 0 moved on `5770f14e`) | | B6 | skip lands on `s_wqm_b64` (W5 shape) | 200 | timbot103, #3848 (open; 0 moved on `5770f14e`) | | — | long tail | 455 | open | - Why B1–B4 still refuse after the merged slices is not checked: the classifier sees only the refusal site. - Not covered: `validate_raster_link(ms, ps)` and `make_native_mesh86_root` on the pair. - Owners updated 3 Dec 04:42 UTC (#3833, #3834, #3839, #3840, #3845, #3847, #3904 merged; #3848 out of draft). Counts are still from `517854f0b`; a new census follows. - First refusal only. AI-assisted.
R0Y00 commented 2026-12-03 04:36:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T04:36:11Z.


Main now includes #3840 (d1d727f1) and #3834 (368a045d). The first extends lane-local operations in flattened pixel arms and keeps the incoming value when a write covers fewer lanes than the eventual read. The second adds wave64 EXEC-mask combines and dedicated scalar lane spills. Independent Windows Debug fixtures for both passed together on WARP and RTX 4060 Laptop. The new exact-coverage refusal and an altered spill read both caught the intended regressions. The 6,436-stage census has not been repeated on these commits, so the counts above still correspond to their recorded baselines.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7367832750 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7367832750). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T04:36:11Z. --- Main now includes #3840 (`d1d727f1`) and #3834 (`368a045d`). The first extends lane-local operations in flattened pixel arms and keeps the incoming value when a write covers fewer lanes than the eventual read. The second adds wave64 EXEC-mask combines and dedicated scalar lane spills. Independent Windows Debug fixtures for both passed together on WARP and RTX 4060 Laptop. The new exact-coverage refusal and an altered spill read both caught the intended regressions. The 6,436-stage census has not been repeated on these commits, so the counts above still correspond to their recorded baselines.
lukaslw-lab commented 2026-12-03 05:00:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-03T05:00:16Z.


Pixel census on main 9dfe168a0

Same capture and method as the work split: every distinct slot 86 pixel stage, one first refusal each. Rerun after the 3 Dec merges (#3833, #3834, #3839, #3840, #3845, #3847, #3904).

548 of 6,436 translate (272 on 517854f0b). 274 of the 276 new passes come from #3847's alpha kills; the other two stopped at unsupported pixel entry VGPR 6 before. The other merges moved stages to later refusals without new passes, and #3833, #3840 and #3845 moved none of the stages in their own rows.

Item First refusal Stages on 517854f0b Owner
B graphics branch on a wave mask (shapes B1–B6 on the split) 2,633 2,636 B5: timbot103, #3850 (draft); B6: timbot103, #3848 (open); rest open
D1 DPP8 requires repeating quad-local selections 842 844 open
F pixel descriptor waterfall, four reasons (#3839 moved 252 between them) 774 774 open
K graphics wave or control-flow instruction, what #3847 left 386 648 open
L2 unsupported wave64 scalar mask operation: s_cselect_b64 sN, exec, 0 in a loop, after #3904 322 0 open
M1 masked graphics region requires lane-local vector arithmetic 211 211 open (#3840 merged)
E1 undefined graphics register 126 (#3834 moved 49 on) 175 224 open
M2 branch enters a masked region (144) or a CMPX region (16) 160 160 timbot103, #3849 (draft)
S1 unsupported scalar memory addressing 116 116 open (#3833 merged)
V1 graphics scalar condition depends on a varying input (12 moved in from K) 85 73 open (#3845 merged)
Q1 unsupported exact-mask operation after whole-quad entry 80 80 open
S2 pixel lane spill: unpartitioned execution (17) or no numeric scalar source (8), new from #3834 25 0 open
— unsupported packed FP16 interpolation operands 22 22 open
L1 graphics readfirstlane … left after #3904 10 332 open
— other 47 open
  • Our 24 Mesh86 draw shapes from #3814: all 24 pixel partners now stop at L2.
  • Claim a row here; the split above keeps its owners.
  • First refusal only: clearing one shows the next.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7368270349 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7368270349). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-12-03T05:00:16Z. --- ## Pixel census on main `9dfe168a0` Same capture and method as [the work split](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7362244678): every distinct slot 86 pixel stage, one first refusal each. Rerun after the 3 Dec merges (#3833, #3834, #3839, #3840, #3845, #3847, #3904). **548 of 6,436 translate** (272 on `517854f0b`). 274 of the 276 new passes come from #3847's alpha kills; the other two stopped at `unsupported pixel entry VGPR 6` before. The other merges moved stages to later refusals without new passes, and #3833, #3840 and #3845 moved none of the stages in their own rows. | Item | First refusal | Stages | on `517854f0b` | Owner | |---|---|---:|---:|---| | B | `graphics branch on a wave mask` (shapes B1–B6 on the split) | 2,633 | 2,636 | B5: timbot103, #3850 (draft); B6: timbot103, #3848 (open); rest open | | D1 | `DPP8 requires repeating quad-local selections` | 842 | 844 | open | | F | pixel descriptor waterfall, four reasons (#3839 moved 252 between them) | 774 | 774 | open | | K | `graphics wave or control-flow instruction`, what #3847 left | 386 | 648 | open | | L2 | `unsupported wave64 scalar mask operation`: `s_cselect_b64 sN, exec, 0` in a loop, after #3904 | 322 | 0 | open | | M1 | `masked graphics region requires lane-local vector arithmetic` | 211 | 211 | open (#3840 merged) | | E1 | `undefined graphics register 126` (#3834 moved 49 on) | 175 | 224 | open | | M2 | branch enters a masked region (144) or a CMPX region (16) | 160 | 160 | timbot103, #3849 (draft) | | S1 | `unsupported scalar memory addressing` | 116 | 116 | open (#3833 merged) | | V1 | `graphics scalar condition depends on a varying input` (12 moved in from K) | 85 | 73 | open (#3845 merged) | | Q1 | `unsupported exact-mask operation after whole-quad entry` | 80 | 80 | open | | S2 | pixel lane spill: unpartitioned execution (17) or no numeric scalar source (8), new from #3834 | 25 | 0 | open | | — | `unsupported packed FP16 interpolation operands` | 22 | 22 | open | | L1 | `graphics readfirstlane …` left after #3904 | 10 | 332 | open | | — | other | 47 | | open | - Our 24 Mesh86 draw shapes from #3814: all 24 pixel partners now stop at L2. - Claim a row here; the split above keeps its owners. - First refusal only: clearing one shows the next. AI-assisted.
timbot103 commented 2026-12-03 10:05:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-03T10:05:59Z.


Claiming L2, unsupported wave64 scalar mask operation, the s_cselect_b64 sN, exec, 0 in a loop (322) on the 9dfe168a0 census. Your note says all 24 Mesh86 draw partners now stop there, so this looks like the next pixel gate for #3641. If you already planned it as a follow-up to #3904, say so and I'll pick another row.

All fixtures will be source-built, with Windows Debug and Release readbacks on WARP and the RTX 5080. A few normalized loop shapes would help us match the real form. In particular: where the selected mask is consumed, and whether the loop exits on SCC or on an EXECZ test.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7374732733 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7374732733). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-03T10:05:59Z. --- Claiming **L2**, `unsupported wave64 scalar mask operation`, the `s_cselect_b64 sN, exec, 0` in a loop (322) on the `9dfe168a0` census. Your note says all 24 Mesh86 draw partners now stop there, so this looks like the next pixel gate for #3641. If you already planned it as a follow-up to #3904, say so and I'll pick another row. All fixtures will be source-built, with Windows Debug and Release readbacks on WARP and the RTX 5080. A few normalized loop shapes would help us match the real form. In particular: where the selected mask is consumed, and whether the loop exits on SCC or on an EXECZ test.
timbot103 commented 2026-12-03 10:32:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-03T10:32:51Z.


L2 is up for review. It lowers s_cselect_b64 sN, exec, 0 in wave64 pixel loops when SCC is proven wave-uniform, along with the SAVEEXEC/EXECZ gate and the s_and_b64 consumers. Everything else stays refused. The census delta, including the 24 Mesh86 pixel partners, is still to be measured.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7375395851 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7375395851). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-03T10:32:51Z. --- L2 is up for review. It lowers `s_cselect_b64 sN, exec, 0` in wave64 pixel loops when SCC is proven wave-uniform, along with the SAVEEXEC/EXECZ gate and the `s_and_b64` consumers. Everything else stays refused. The census delta, including the 24 Mesh86 pixel partners, is still to be measured.
timbot103 commented 2026-12-03 10:33:02 +00:00 (Migrated from github.com)
Author
Contributor

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


Also taking what is left of E1, undefined graphics register 126 (175). Its shapes are s_cselect_b64 sN, exec, 0 and s_mov_b64 sN, exec outside loops, which sit next to the L2 lowering in #3918.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7375400169 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3814#issuecomment-7375400169). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-03T10:33:02Z. --- Also taking what is left of **E1**, `undefined graphics register 126` (175). Its shapes are `s_cselect_b64 sN, exec, 0` and `s_mov_b64 sN, exec` outside loops, which sit next to the L2 lowering in #3918.
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#3814
No description provided.