Skip to content

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

Backlog

Description

@lukaslw-lab

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. shader: lower two-armed CMPX if/else regions in wave64 pixel stages #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.

Activity

  1. lukaslw-lab commented on Dec 2, 2026

    @lukaslw-lab
    ContributorAuthor

    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
    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; live-mask form (most of these): timbot103, #3847 (draft)
    G2 s_and_b64 exec, exec, sN after interpolation (coverage mask) 86 timbot103, #3829
    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.

    AI-assisted.

  2. timbot103 commented on Dec 2, 2026

    @timbot103
    Contributor

    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).
  3. timbot103 commented on Dec 2, 2026

    @timbot103
    Contributor

    All three claimed slices are now open for review:

  4. timbot103 commented on Dec 2, 2026

    @timbot103
    Contributor

    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 shader: lower two-armed CMPX if/else regions in wave64 pixel stages #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).
  5. timbot103 commented on Dec 2, 2026

    @timbot103
    Contributor

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

  6. timbot103 commented on Dec 2, 2026

    @timbot103
    Contributor

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

  7. timbot103 commented on Dec 2, 2026

    @timbot103
    Contributor

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

  8. timbot103 commented on Dec 2, 2026

    @timbot103
    Contributor

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

  9. timbot103 commented on Dec 2, 2026

    @timbot103
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions