shader: supply mesh57 descriptor words from the guest V# #3801
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-01T23:58:48Z.
Problem
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 #3703, #2413. AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-02T14:44:58Z.
Review: COMMENTED
Reviewed
ad7a54d0against #3758/#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.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T11:59:41Z.
Review: CHANGES_REQUESTED
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.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-03T14:06:52Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T14:21:07Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-03T14:24:14Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T14:50:05Z.
Review: APPROVED
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.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-03T14:58:03Z.
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.