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
No Branch/Tag specified
main
codex/indirect-large-backed-views
codex/word3-preflight-check
codex/vertex-table-two-records
codex/live-index-alias
codex/copied-vertex-buffer-srv
codex/windows-stage-test-output
codex/preserve-live-srv-retirement
codex/share-render-target-tracking
codex/sgd5-negative-offset-fixture
coverage-dashboard
codex/mesh-loose-root
codex/mesh86-cache-padding
codex/xmem-scatter-preflight
codex/mesh-depth-ps
codex/indirect-dispatch-refresh
codex/compute-container-index
codex/startup-compute-formatted-load
codex/compute-indirect-producer
codex/compute-atomic-soffset
codex/mesh-dual-handoff
codex/startup-run-sh-watcher-control
codex/queue31-page-alias
codex/indexed-indirect-compute-root
codex/typed-buffer-view-metadata
codex/translated-indexed-address-alias
codex/fixed-mesh-create-result
codex/xmem-section-lease
codex/startup-slot86-mesh-cache
codex/restore-mesh-barrier-iteration
codex/translated-indirect-upload-index
codex/xapu-completion-opt-in
codex/translated-indexed-rect
codex/translated-indexed-indirect
codex/startup-mesh-lds-integration
codex/startup-console-ms24
codex/startup-slot57-mesh-request
codex/indirect-copy-provenance
codex/present-color-producer-trace
codex/compute-dispatch-binding-trace
codex/translated-indirect-table-buffers
codex/indirect-copy-provenance-base
codex/mix-half-literal-source
codex/translated-indirect-draw
codex/xmem-scatter-diagnostics
codex/slot148-recording-upload
codex/slot70-loading-art-verified
codex/command-list-upload-arena
codex/recover-failed-command-list
codex/startup-heap-timing-notes
codex/align-audio-input-timeline
codex/synthetic-depth-export-control
codex/startup-texture1d-on-windows
codex/1629-packed-position-fixture
codex/cpu-srv-refresh
codex/stream-root-srv-draw
codex/audio-mixer-timer
codex/startup-reload-published-shader
codex/priority-integrate-1284
codex/guest-sixteen-page-record
codex/aot-placed-dxr-batch
codex/guest-directory-selection
codex/gamesave-enumerate-read
codex/readme-archive-to-pixels
codex/pe-placed-view-draw
codex/archive-directory-gpu
codex/slot133-dxr-build
codex/materialize-placed-vertex-view
codex/dstorage-directory-offsets
codex/xg-nine-bc-copy
codex/xg-slot10-bc64-arrays
codex/dxr-guest-address-readback
codex/gpu-va-high-bits
codex/clarify-diagnostic-startup-scope
codex/xg-six-levels
codex/typed-derived-blend
codex/english-legal-text-progress
codex/address-bc-4ks
codex/dstorage-bounded-file-read
codex/wide-srv-offsets-menu
codex/startup-memory-srv
codex/bound-view-tail
codex/language-selector-readback
codex/setup-menu-progress
codex/cpu-plane-refresh
codex/startup-ubyte-vertex
codex/presenter-window-selection
codex/startup-uniform-buffer-lane
codex/intro-loop-timing
codex/static-clzero-loops
codex/document-rtx-intro
codex/startup-insertq
codex/nv12-startup-texture
codex/stream-stage-draw
codex/startup-null-uav-format
codex/startup-draw-capture
codex/shorten-windows-checks
codex/dstorage-rfc1950
codex/startup-dump-fence
codex/pr1135-review-base
codex/startup-stream-requests
codex/startup-chroma-view
codex/readme-graphics-pipeline-streams
codex/static-crt-free-tls
codex/arc-140t-rtx-5080-laptop-gpu-reports
codex/main-startup-progress-entry
codex/signed-dxil-catalogue
codex/reloc-free-preferred-base
codex/quad-dpp-bit-mask
codex/raw-srv-bounds
codex/rx9070-31044-hardware-report
codex/gpu-page-source-provenance
codex/runtime-placeholder-interior
codex/gpu-copy-queue-tile-order
codex/pe-pin-external-providers
codex/xmem-placeholder-reservations
codex/xmem-shared-physical-pages
codex/pe-package-startup
codex/xmem-tools-memory-query
codex/cpu-stack-output-import
codex/pe-load-security-cookie
codex/record-three-bvh-retests
codex/cpu-rbp-frame-anchor
codex/xmem-default-startup
codex/record-rtx-3050-ti-9597
codex/docs-readme-start-here
codex/check-compute-mad24-truncation
codex/docs-discord-community
codex/bound-rcx-branch-mutants
codex/rtx5060ti-bvh-62114
codex/837-neutral-readme-disclaimer
codex/record-rtx-3070-ti
codex/title-neutral-public-wording
codex/exe-shadow-frame-submissions
codex/exe-shadow-runtime-chain
codex/readme-polish
codex/gpu-coverage-nov23
codex/spirv-minlod
codex/shadow-shim-device
codex/exe-two-shadow-frames
codex/shim-dispatch-cleanup
codex/fix-spirv-cache-probe
codex/sampler-use
codex/ballot-bit-extract
codex/packed-fma-release
codex/cpu-packed-fma-o2
codex/publish-coverage-dashboard
codex/mesh-cbv-binding-order
codex/spirv-window-fixture
codex/ps-e32-float-uint
codex/ps-cbuffer-reads
codex/fixed-profile-rescan
codex/shim-compute-integration
codex/readme-visible-coverage
codex/readme-research-navigation
codex/integrate-pr-256
codex/indexed-mesh
codex/sampled-coverage
codex/first-ms
codex/dual-ps
codex/ps-attribute
codex/compute-first
codex/ps-export
codex/readme-research-status
codex/ps-layout
codex/blast-window
codex/chart-caption
codex/reviewer-roles
codex/blast-aot
codex/archive-program
codex/crc-stream-program
codex/exe-image-data-chain
codex/local-cpu-fixture-coverage
codex/exe-bound-frame-chain
codex/exe-mapped-comparison
codex/contribution-dependencies
codex/exe-entry-aot
codex/bink-frame-heap-integration
docs/hardware-seven-reports
codex/bink-custom-heap
codex/bink-heap-callers
codex/discussions-entry-points
codex/gpu-community-batch-64
codex/ffx-scratch-writers
codex/generic-project-documentation
codex/ffx-dispatch-rcas
codex/four-windows-gpu-reports
codex/title-neutral-project-wording
codex/community-coverage-provenance
codex/rcas-packed-texels
codex/community-gpu-retests
codex/community-build-and-gpu-reports
codex/ffx-provider-loop
codex/ffx-recurrent-views
codex/ffx-recurrent-resource
codex/amd-wave64-reports
codex/ffx-backend-slots
codex/upscaler-device-init
codex/ffx-context-lifecycle
codex/ffx-version-query
codex/ffx-provider-contract
codex/typed-object-callback
codex/cpu-ordinal-import
codex/chained-cpu-ranges
codex/cpu-import-call
codex/cpu-direct-call
codex/cpu-leaf-aot
codex/community-project-status
codex/script-state-path-replay
codex/script-state-evidence
codex/bc7-resident-tail
codex/bcpack-mip-tail
codex/bc7-texture-draw
codex/asset-ranges
codex/pixel-constants
codex/pixel-aot
codex/pre-exe-workloads
codex/root-signature-device-coverage
engineering/packed-bvh-leaves
engineering/bvh-build-and-update
engineering/intake-root-roundtrip
community/gpu-check-release
community/english-contributor-entry
gpu-check-v0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 agfx2hlsl.py.fail, and that run refused 1,923,473 indirectDispatchMeshcommands (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
On the native path, a slot 57 pipeline also needs a reviewed
<variant>.mesh57-stateprofile (src/startup_stubs/native_mesh57.inl:251-257), so today every captured request stops there before translation. Offline,compile_dxil --refusalsreadsreq_<key>.m57requests with their.ps57and.rootfiles (tools/startup/compile_dxil.cpp:548-629); each needs an entry layout, a.mslayoutfile beside the request or--mesh-layout FILE, and fails withmesh request has no entry layoutotherwise.Where things stand
First
gfx2hlsl.pyrefusals of the 543:s_cbranch_execz skips code with effects outside active lanes398,v_readfirstlane_b32 outside the group-index read is not covered91, 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)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.
pos1and per-thread export orderv_writelane/v_readlaneNot 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.
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 (664db4caonmain0614f68c) plus the root-input change (not opened yet). Caller layouts all usedguest_root, wave 64 and a non-zerogroup_stride. Variants tested: threads 64 and 128, maxima equal to threads, triangle topology, with and withoutpacked_parameters. Every variant gave the same counts:v_readfirstlane_b32s_mov_b64With wave 32 or
group_stride0, all 543 stop atunsupported 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
main8ecd30fe). #3023 covers heap view types on the native compute route.Next for #3416: the
v_readfirstlane_b32class (147), then thes_mov_b64class (21). Whether those 21 are exchange shapes failing another matching condition is not established; #3420 would separate them.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_i32ands_mul_hi_u32, which the shared scalar ALU already implements. A negative control keeps a lane-varyingv_cvt_f32_u32input refused. This moves those requests forward but does not translate them yet: by a static estimate (not measured), the next refusals arev_mul_hi_u32ands_max_u32.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 onmain212d4b5f, PRs to follow:v_readfirstlane_b32of 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_i32ands_mul_hi_u32join the scalar ALU list.s_max_u32andv_mul_hi_u32.Also taking a soundness bug in the mesh frontend on
main212d4b5f: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 thatcompile_dxilemits for a source-built fixture; nothing was run on a GPU.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T04:24:40Z.
Status: five branches on
main212d4b5f, PRs not opened yet.v_readfirstlane_b32, ands_max_u32/v_mul_hi_u32.mesh EXEC write inside a lane-skip block). Narrowings_and_b64/s_andn2_b64, the gather and signed-CMPX join restores, and the restore right after a nested skip closes stay accepted.s_mov_b64first 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: theprofile input bytes differrefusal names the first part that differs (length or content). Accepted and refused profiles are unchanged.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
main212d4b5f; PRs not opened yet.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
maineab7180c; PRs not opened yet.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T09:19:35Z.
Status on
main1a0120ba:--refusalscounts slot 57 requests: merged (1a0120ba).41babe6e).b8c68ee9).d58a9f63).v_readfirstlane_b32of a proven wave-uniform VGPR, pluss_sub_i32/s_mul_hi_u32: open.profile input bytes differnames the first differing part: open.s_max_u32andv_mul_hi_u32: open.Each open PR merges cleanly onto
1a0120ba. Between them (git merge-tree --write-tree, pairwise): #3438 and #3439 conflict intests/native_direct_mesh_check.py, #3439 and #3445 insrc/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
1a0120baand has no PR yet.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T11:23:45Z.
#3450 (open, head
a87c6f7e, onmaine358cf5f) refuses three mesh program shapes thatmainaccepts and translates to wrong DXIL: a VGPR left partial by writes under narrowed EXEC and read after ans_or_b64/s_and_b64/s_andn2_b64EXEC write that can add lanes; a scalar ALU write toexec_lo/exec_hioutside a lane-skip block, which leaves the lane state on the old mask; and a scalar ALU write tovcc_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.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
mainand their PR checks are green. Order that lets each one merge without carrying another:78693088): counters for each exit of native slot 57 preparation. Depends on: nothing. CI: green.6a9d2a02):sampleLevelat level 0 for a constant-coordinate nonuniformIMAGE_SAMPLE, fixes #3489. Depends on: nothing. CI: green.1014e85f): tool that builds a.mesh57-stateprofile from a runtime capture. Depends on: nothing. CI: green.ea3a90c2): mesh-layout blend words read at +0x124 instead of +0xD0. Depends on: nothing. CI: green.196adf8c): PS-less (depth-only) slot 57 pipelines admitted with a reviewed profile. Depends on: #3483 (contains its commit). CI: green.4991e866): bound target formats recorded in a.t57file next to the creation capture. Depends on: #3493 (only the last commit is new). CI: green.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
.t57file from #3502 as an input but does not contain its code.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
DispatchMeshkey maps to its.s57variant and request. Offsets are ascompile_dxilprints them, from the start of the.m57:Updated 1 Dec: claims and PR states.
mesh heap slot lacks masked root constant provenance77a438d6,12f152df77a438d6+0x2a0:s_load_dwordx4 s[36:39], s[16:17], s23, slot =s_buffer_load_dword s23, s[36:39], 0x7f8<< 5heap_tokens). Runtime binding open, to build on #3023 stage 3 (#2413 note). Until then the runtime still refuses heremesh EXEC write inside a lane-skip blockf2b3d808,2319d05ef2b3d808+0x70c:s_mov_b64 exec, s[20:21]graphics register undefined on an incoming path: 2653e824362exp pos0 ... doneafterv_cmpx_gt_i32+s_cbranch_execz; the pos0 export is skipped on one pathunsupported mesh instruction or EXEC state: v_readfirstlane_b3233f028d7,88fef29833f028d7+0x370:v_readfirstlane_b32 s10, v8, at a branch joinFurther 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_b64inside a lane skip: #3645, open.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).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_missingcalls. 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:
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).
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
.t57tuple), 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 asCB_BLENDat 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 thePA_SU_SC_MODE_CNTLpredicate).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_MASKorSPI_PS_INPUT_ADDRsit 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.