Repository navigation
Description
Status update · 1 December 2026
Superseded by #3641 for the scene readback and presentation proof. The first verified binding failures are now tracked in #3639 and #3640. The native path and direct dispatch diagnostics merged in #3638. Visible scene geometry remains unverified.
Refs #870, #1759 and #3310. Target main.
Goal — Reproduce one scene draw that changes an expected color or depth pixel before composition, using the native C++ path. Compare against the same scene in a reference capture and fix the earliest verified divergence that prevents the draw or corrupts its inputs.
Slot 86 is a candidate: the reference runtime creates Mesh PSOs from streams even when slot 57 deserialization is refused, and X2W currently rejects some slot 86 root layouts. Indirect argument production is another candidate: #3310 matched 48 records by resource and byte offset that stayed at (0,1,1). A frequently submitted draw is a good starting point, but a once-per-scene compute or bake pass can be a prerequisite for many draws.
- Select a reference draw with a measurable scene-target contribution. Match its shader identities, root bindings and target state on current
main. Trace the producers of the resources it reads and report the first divergence. Keep the Python fallback disabled and use existing C++-generated cache artifacts where available. - Fix the verified blocker for that draw. If the slot 86 PSO or resource binding fails, trace the required MS/PS translation, root mapping and desktop descriptor. If a GPU-written indirect mesh record is involved, use gpu: trace a GPU-written DispatchMesh argument through its producer and descriptor history #3310 to trace the producer SRV/UAV, backing resource, byte offset and queue fence. Read the same 12 bytes after the write and before consumption, and verify the reads agree and that X is nonzero.
- On the same scene, show that the repaired path submits the draw and changes an expected scene-target pixel before composition. Record the commit, exact command, adapter/driver and debug-layer result. Add a source-built regression for the behavior that changed, with a negative control.
Publish title-neutral, sanitized results and source-built fixtures.
Activity
[-]P0: render the first verified 3D scene draw through slot 86[/-][+]P0: identify and fix the first GPU blocker for a visible 3D scene draw[/+]lukaslw-lab commentedon Nov 30, 2026
I'll take the trace on a live native run (current
main+ #3599, from a saved scene, 360 s). Correction to the first version of this comment: the 4 slot 86 pipelines (2 ×0x400, 2 ×0xc00) are created but never reachExecuteIndirectin any of our runs (up to 360 s), matching mumba17's 545 s run on #3545. The placeholder count I quoted counts placeholder command signatures, not slot 86. The largest refusals on the same run are slot 57DispatchMesh:no_translation8.31 M andmesh_profile_missing7.39 M calls by 360 s. I'll trace the most-submitted of those pairs, find which keys they are and why each is refused, and report the first one that blocks a scene-target write. The fixed slot 57 pass in #3560 stays a second pre-composition candidate.lukaslw-lab commentedon Nov 30, 2026
First results for the trace claimed above. On a 360 s native run from a saved scene, every indirect
DispatchMeshis refused, and no slot 57 mesh pipeline is prepared natively.mesh_profile_missingno_translationindirect_graphics_match_code)The native slot 57 preparation counters end at
ready 0,profile_absent 10,726,unsupported_stage_or_descriptor 13,388.A
.mesh57-stateprofile alone would not make these draw. The top requests by refused calls stop at the mesh frontend first (offlinegfx2hlsl.py):77a438d6e76ca6d7s_cbranch_execz skips code with effects outside active lanesf2b3d808dc09473c3e82436207e34109v_readfirstlane_b32 outside the group-index read is not covered12f152dfa2a751f6s_cbranch_execz ...33f028d7d49277d3s_mov_b64absentAll five share one creation root: three tables, a root SRV and two root constants, with flags
0xc00.Next, I'll write a
.mslayoutfor77a438d6and report its C++ frontend refusal here. I'll also post the call-weighted list on #3416 to help order the ranking there.Tree:
main077bff3a+ #3599 + #3506 #3516 #3464 #3521 #3097 #3472.X2W_INDIRECT_PIPELINE_KEYS=1,X2W_MESH57_CAPTURE_STATE=1, Agility SDK, native-only. RTX 3080 Ti (driver 32.0.16.1047), Windows 10 19045, debug layer off. 6,685 frames, 0 errors.lukaslw-lab commentedon Nov 30, 2026
Correction to my last comment: the
s_cbranch_execzrefusals came fromgfx2hlsl.py. The C++ frontend gets past that shape. Its first refusals for the same requests, with the flags native preparation sets, are:mesh heap slot lacks masked root constant provenance:77a438d6,12f152df(1.13 M calls). In77a438d6the heap slot is read from a buffer,s_buffer_load_dword<< 5 →s_load_dwordx4(+0x28c–0x2a0 in the.m57). This is the slot 57 counterpart of the GPU-selected index in P0: bind GPU-selected buffer SRVs for slot 86 mesh draws #3545.mesh EXEC write inside a lane-skip block(0.78 M),graphics register undefined on an incoming path: 265(0.47 M) andv_readfirstlane_b32(0.42 M).The full table, with offsets and reproduction steps, is on #3416. I'm taking the heap-slot row (claim in #2413).
Not-Saii commentedon Nov 30, 2026
Findings from a native-only run on a different host, for a direct draw that is separate from the
DispatchMeshtrace above.Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100.
mainat78261e08, release build, native shaders only, debug layer off. Runs start from a saved scene with one input.1. The most-submitted refused direct draw is a depth-only fixed slot 57 pass.
586474590e81c52e8f7cfdb662063ba6The two requests have byte-identical programs and root. The vertex stage exports a position and one parameter. The pixel stage reads a packed pixel position, discards per pixel, and ends in a depth export with no colour export. Captured
PSI1:SPI_PS_INPUT_ADDR = 0x8002,NUM_INTERP = 1. I have not read the depth target's format or size.2. Why each route refuses it.
+0x130:raw graphics varying or system export requires a stage interface.graphics branch on a wave mask. The lanes are removed by av_cmpx_ne_i32that writes EXEC, followed bys_cbranch_execzto a null export. The surviving path has descriptor and buffer loads before the depth export. I did not look past this refusal.MRTZ requires one uncompressed depth export in a straight-line pixel shader with entry EXEC.3. A native-only run stops presenting unless a prepared compute pack is supplied.
Without a pack, presenting stops about 30 s after the scene starts loading (seen in five runs), and the process later stops in the application's own code. Three thread samples taken during the stall agree: one thread holds the draw lock in
record_translated_dispatch→translate_compute_natively, called fromExecuteIndirect, while callers ofdraw_translated,list_dispatchandlist_resetwait. A warm bytecode cache does not change it.With a pack built by
compile_dxil --prepare-compute-packandX2W_NATIVE_COMPUTE_REQUEST_CACHE_MIB=256, one 100 s run kept presenting to its last heartbeat at 94 s (2,157 frames). The two settings were changed together, so I have not separated their effects, and the run ended on its timer. The offline pack build took 507 s for 2,805 requests on one thread, about 181 ms each; that the same cost per request applies inside a run is an inference from the matching rate, not a measurement.4. Setup note. The native graphics path looks stages up in an interface library in the shader cache (
compile_dxil --index-graphics-interfaces). This host had none. Without it, 555 of 654 graphics requests were refused withraw graphics requires a verified stage interface or wave state; with it, that reason no longer appears.Not reproducible on a source-built input: the pipelines are the application's own, so the evidence is the keys, the captured register values, the refusal texts and the runs above.
SimSalabimse commentedon Nov 30, 2026
Some findings on one slot 57
DispatchMeshpair that might save time on the trace. This is the heap-indexed MS+PS bucket (derived mesh guest root is heap indexed, root paramst,t,t,srv,c1), from runs on my Windows test PC. I'm not claiming any part of this issue; I'm only sharing what I measured.The MS does not declare fixed output counts. The
GS_ALLOC_REQ(s_sendmsgmsg 9) buildsm0 = (s21 << 12) | s18fromv_readfirstlanevalues, not from an immediate. So the tree'smesh57_read_layout, which expectss_mov m0, <imm>, refuses it by design.buffer_load_dwordx2:V = (w & 0x7f) + 1andP = ((w >> 7) & 0x7f) + 1, each 1..128.k = rootconst >> 29is non-zero, V and P are each multiplied bym = min((G << k) + (1 << k), L) - (G << k), where L comes from ans_buffer_loadat descriptor +0xac0, shifted right by 15. With an entry log on, every call I saw had k = 1 and took this path, so m is 0, 1 or 2.The pipeline state words that look like NGG limits are a global budget. The words at state block offsets +0x070, +0x074 and +0x078 look like
VGT_GS_ONCHIP_CNTL/GE_MAX_OUTPUT_PER_SUBGROUP(128/128/128), and +0x1a4 is 0x40. All of them are identical across all 267 mesh-layout pipelines I had, so they aren't per-shader maxV/maxP/threads.The create-time descriptor spans don't hold an MS container. I copied the measured ptr+length spans of the 0x300 description at creation time. None contains DXBC, XBCH or FSSM at any offset, and none has a zlib stream, so there's no declared MS I/O record to read for this pair.
So for this kind of pair, I think the realistic route is sizing the desktop mesh shader from bounds derived from the code (per-record max times the multiply factor), with
SetMeshOutputCountsusing the runtime values, rather than looking for a declared profile. I'm trying that as an experiment on my fork and will report back here if it draws.AI-Assisted
lukaslw-lab commentedon Nov 30, 2026
@SimSalabimse, thanks. That fits what I see on the same root shape (
t,t,t,srv,c1, flags0xc00). The top two requests by refused calls stop earlier in the C++ frontend. The heap slot is a dword read from a root-table buffer and then shifted left by 5, which is the row I claimed in #2413. A local prototype gets both past that point. The next refusal isv_readfirstlane_b32(+0x470 / +0x474). I'm coordinating the safe form of that read with the view-token guard on #3023.Your point about the counts settles the layout question. In my
.mslayoutthe vertex and primitive limits of 128 were placeholders, so a real layout needs bounds derived from the code, as you describe. #3616 keepsnative_direct_meshpinned to the frontend's clamp to the declared limits (#3537), which is the guard if a runtime count exceeds them.So the two pieces don't overlap. I'm doing the heap slot, and your output sizing is separate. A draw of one of these pairs needs both.
Not-Saii commentedon Nov 30, 2026
Follow-up on the depth-only fixed slot 57 pass from my earlier comment (native key
586474590e81c52e). With #3612 and #3615 applied it is submitted, but it writes no depth. The cause is upstream of the draw: its vertex data buffer is never written on the native path.Environment: same host (Windows 11 build 26300, NVIDIA GeForce RTX 4090, driver 32.0.16.1088).
mainat077bff3awith #3612 and #3615 cherry-picked, plus local diagnostics in the D3D12 shim that are not proposed here. Release build, native shaders only, prepared compute pack,X2W_DEPTH_STATE=1, debug layer on. Eight 300 s runs from a saved scene with one input.1. The draws are submitted, but no depth texel changes.
A local readback copied the bound depth target before and after each draw of this key. In 24 draws, on two 512x384 D16 targets and later one 1536x1536 target, 0 texels changed; every plane stayed at the 1.0 clear. The pipeline's own state is LESS_EQUAL, depth write on, no culling, depth clip on, so the depth test does not explain it.
2. The clipper rejects every primitive.
Pipeline-statistics and occlusion queries around each draw, with the depth test forced to ALWAYS and culling off for this key:
With depth clip also off the result is the same, so the rejection is not about z.
3. The vertex program culls on purpose when a width reads zero.
Before
exp pos0, the vertex stage doesv_cmp_lt_f32 vcc, 1e-4, v1and writes the position (-4, -4, 0, 1) whereverv1 <= 1e-4, which is outside the clip volume.v1is an f16 loaded from the last 16-byte record of the instance's run in the raw buffer described at user-data offset 0x720. The per-vertex positions come from the same buffer.4. That buffer is bound correctly but holds only zeros.
OpenExistingHeapFromAddressheap. The CPU view is therefore what the GPU reads.5. No translated compute dispatch writes it.
A local watch armed on the buffer's range decoded the buffer outputs (raw descriptor or view token, table or heap) of every translated compute dispatch, recorded or refused. It found 0 overlaps for the rest of the run. In the frame it armed, 200 distinct compute keys were dispatched with no translation (the logging cap). Run totals for compute dispatches: 107,532 translated, 8,165,025 refused, 14,398,329 with no translation.
What this shows and what it does not:
Not reproducible on a source-built input: the pipelines are the application's own, so the evidence is the key, the disassembled instructions, the query counters and the runs above.
SimSalabimse commentedon Nov 30, 2026
Follow-up on the output sizing I posted earlier, plus a status so nobody duplicates the same experiment.
On the SimSalabimse fork branch
local/mesh57-bounds(experimental, not opened as a PR) I now have:derive_slot57_meshv_bfe/v_mul_loand buffer loadsTwo things still block a draw. One is the color-target check: a live run shows these draws bind 3 or 6 render targets (viewport, scissor, formats and single-sample all fine), and the derive path only accepts one, so multi-target support is my next step on the fork. The other is
group_stride. The record path yields stride 0, so I can't feed the native exchange (the compute at +0x28 that doesv_lshrrev v5, 7thends_writeat 0x500) without guessing a stride, which I won't bind. Public Mesa, LLPC and RDNA 2 sources don't document that entry layout.Does anyone know where the
group_stridevalues in the existing reviewed.mesh57-state/ mesh1 profiles (for example 128) came from, and has anyone measured the entry v5 value that exchange broadcasts?This doesn't overlap lukaslw-lab's heap-slot /
v_readfirstlanework and is still separate from the output sizing, as they already noted.AI-Assisted
runtime: wire native slot 86 mesh bindings and direct DispatchMesh (#…
shader: admit a depth-only export in the raw graphics front end
shader: lower a pixel discard written as a compare that writes EXEC