shader: supply mesh57 descriptor words from the guest V# #3803
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3803
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3801"
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?
@lambirou on GitHub · 2026-12-01 23:58 UTC · original
lambirou:codex/mesh57-descriptor-words→main· +606 −88 · 24 files · 18 commits · merged 2026-12-03 14:57 UTCProblem
The slot 57 runtime previously bound a temporary SRV for the guest descriptor words and copied that descriptor into the draw heap. The submitter also accepted a nonzero exit from an in-box WARP pre-dispatch fault, so it could report a pass without reaching the draw.
The remaining two-table failure was in the fixture: it placed the second physical SRV at a hard-coded 32-byte offset. WARP uses a 64-byte descriptor increment, so the view landed on an invalid descriptor and removed the device.
Change
R32_UINTtable SRV directly in the shader-visible heap. The runtime no longer stages a temporary descriptor or callsCopyDescriptorsSimple.Validation
startup_mesh57_runtime_warp: passed, 1/1, descriptor words and two-table entries each match all 1024 pixels withdispatchmesh 1.startup_mesh57_runtime_hardware: passed, 1/1 on AMD RX 9060 XT, driver32.0.32029.2010.native_direct: passed, 4/4.(16,1),expected bf4000ff, got bf0000ff, withdispatchmesh 1.dcf7828e: all required checks passed.python -B tests/docs_links_check.pyandgit diff --checkpassed locally.Refs #3705, #2413. AI-assisted.
The slot 57 capture req_72e1909e13df6f66.m57 contains image_load v[19:21], v11, s[56:63] dmask:0x7 dim:SQ_RSRC_IMG_1D unorm at +0x700, fed by the eight-dword resource-heap fetch at +0x614. This is a complete guest V#, not a texture heap slot-map record, so the slot-map branch refuses it. - A mesh image branch handles the full-V# form when !layout.texture_heap_slot_map: image_load (op 0), dim 1D, dmask 0x7, UNORM, no LWE/TFE/R128/reserved bits, eight contiguous descriptor words sharing one fetch pc and a destination inside the VGPR range. - The eight words stay symbolic. The fetch is identified by heap_fetches (a root-proven selector) or heap_descriptor_slots (a GPU-selected selector); no projected_numeric flag is needed. - createHandleFromHeap(slot) is annotated Texture1D { 1, 1033 } and textureLoad.f32 reads mip 0 at the VGPR coordinate, writing the three integer channels. - Four-channel loads, other dimensions, missing UNORM or an unmatched descriptor keep refusing. Observed on the captured MS with the exact profile layout: - before: native compute +0x700: unsupported mesh instruction or EXEC state: image_load - now: native compute +0x69c: unbound numeric SGPR s57 The capture reads descriptor word 1 numerically at +0x69c (s_bfe_u32 s22, s57, 0x2001e) to build the image coordinate. After #3754's correction the words stay symbolic, which is the accurate refusal: this branch needs a contract that supplies the real V# field bits before the +0x700 image is reachable. The source-built fixtures use a constant coordinate and cover the translation itself; the earlier +0x7c0 observation belonged to the slot-materialising draft and no longer applies. tests/native_direct_mesh_check.py adds mesh-image-full-descriptor (root selector), mesh-image-full-descriptor-root/-gpu, the four-channel and 2D controls, and keeps the symbolic descriptor-word refusals. Verified: - cmake --build --preset release --target compile_dxil - python -B tests/native_direct_mesh_check.py <compile_dxil.exe> <dxc dir>: exit 0, "mesh allocation, indexed outputs, group exchange and negative controls passed" - ctest --preset release --no-tests=error -R '^native_direct': 2/2 passed - real capture: native compute +0x69c: unbound numeric SGPR s57 Refs #3497@lambirou on GitHub · 2026-12-02 14:44 UTC · original · reviewed
Reviewed
ad7a54d0against #3760/#3754; read the frontend, runtime binding and revision changes, not built here.Verdict: changes requested. The frontend now materialises descriptor words through a 1024-entry table and bumps the mesh57 revision to 5, but the PR body itself says the runtime root-signature/binding path is not proven by a fixture. A mismatch between the guest table parameter and the runtime root SRV would only appear on the real capture, after the profile revision has already changed.
descriptor_table_root()selects the first guest descriptor-table root parameter without checking that it declares an SRV range or that it is the table the eight-word fetch came from. Validate the table's ranges and the expected register/space, or require the translator to carry the root index explicitly.The PR is currently
DIRTY; rebase and rerun the mesh57 runtime checks after the base PRs land.ad7a54d099to36fda7217b36fda7217btofc1d0f9c4bea67fab159tocf015e6632@R0Y00 on GitHub · 2026-12-03 11:59 UTC · original · requested changes
The previous hosted Windows failure at
74092072was startup_mesh57_runtime_warp, descriptor words: the fixture process exited 2173. At60a8ff0f, the replacement returns 0 for that exit code on any WARP build before checking the forwarded draw or reading pixels. It never checks a driver version or adapter capability. A repeated descriptor-write failure can therefore make the test pass without exercising the PR's new runtime binding.Please keep this failure visible while diagnosing the descriptor write. If the case is unsupported on the hosted adapter, gate that condition on an independently measured capability, or move the descriptor-only case to a separate CTest and report a verified capability skip as 77. The hardware and capable WARP paths should still require the forwarded draw, exact pixels and negative cases.
@lambirou on GitHub · 2026-12-03 14:06 UTC · original
Updated at
2411e130. The runtime now creates the descriptor-word table SRV directly in the shader-visible heap and the descriptor-word fixture uses a synthetic guest V#; the global hosted-WARP 2173 skip is removed. The exact case passes on WARP and RX 9060 XT withdispatchmesh 1and all 1024 expected pixels. The unrelated two-table control is gated by a separate, independent two-SRV probe. A word-5 mutation still fails at the expected pixel. Please rerun the hosted checks on this head; the CI rerun will verify the hosted WARP runtime independently from the local Debug run.@R0Y00 on GitHub · 2026-12-03 14:21 UTC · original
Re-ran
2411e130in MSVC Debug on Windows 11 build 26300 with the D3D12 debug layer enabled. The synthetic descriptor-word case now forwards one DispatchMesh and matches all 1,024 pixels on both WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. Native direct mesh and the full RTX runtime case passed. The full WARP runtime test still fails in two table entries with exit 2173. I ran descriptor-srv-write-probe separately on the same WARP build: both shader-visible views were accepted, zero D3D12 warnings/errors, exit 0. This probe does not reproduce the remaining two-table failure on this driver, so I am keeping the review open for that path.@lambirou on GitHub · 2026-12-03 14:24 UTC · original · edited 2026-12-03 14:59 UTC
Superseded by
dcf7828ed: the first probe ata4418820created two buffer SRVs, but the hostedtwo-viewscase still failed. The measured difference was the hard-coded physical descriptor offset. WARP reports a 64-byte descriptor increment, while the mesh table uses a 32-byte logical stride.@R0Y00 on GitHub · 2026-12-03 14:50 UTC · original · approved these changes
Re-reviewed
dcf7828e. The two-table fixture now creates the second SRV at the real heap increment and copies just its token into the 32-byte logical slot. In my prior one-line experiment ona4418820, using only the physical increment avoided the SRV fault but yielded mesh_bind: unsupported MS native byte buffer descriptor. The current logical-slot copy fixes that second part.Independently rebuilt with MSVC Debug on Windows 11 build 26300 and ran
ctest --preset dev --no-tests=error -j 1 -V -R '^(startup_mesh57_runtime_(warp|hardware)|native_direct_mesh)$': 3/3 passed. WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 each reached both descriptor words and two table entries, with one forwarded DispatchMesh and 1,024 matching pixels per case. The D3D12 debug layer was enabled, with no capability skips. The previous WARP failure is resolved in this run.@lambirou on GitHub · 2026-12-03 14:58 UTC · original · edited 2026-12-03 14:59 UTC
Fixed and merged at
dcf7828ed. The actualtwo-viewsfailure was the hard-codedcpu + 32physical descriptor offset: WARP reports a 64-byte descriptor increment. The fixture now creates the second SRV at the measured physical increment and copies its 32-byte token to the logical slot read by the mesh program. The independent probe mirrors the two-buffer plus RTV path and only maps WARP2173to a measured skip after a valid pre-failure transcript; all other results remain failures. Localdescriptor wordsstill passes with 1024 exact pixels anddispatchmesh 1. CI run https://github.com/R0Y00/Xbox2Windows/actions/runs/47130310749 is green: Windows12m09s, Linux Python and gfx1013 assembly all passed.s_bitset1_b32, then stop at a scalar loop #3705