shader: test the mesh86 root SRV load count #2314
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2322"
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 sydney-0o on 2026-11-25T12:16:28Z.
Follow-up to merged PR #2303 and tedin7's review finding.
#2303 lets a cached slot 86 mesh draw consume one leased XMem DWORD through a root SRV. The cache publisher only emits the version 2 proof marker when the DXIL has exactly one raw 32-bit load at byte offset zero from
t0 space0. The previous cases exercised shifted, dynamic and wide loads. The review identified a gap in coverage for two instructions that each match the allowed load form and use the same SRV handle.This test feeds the verifier a synthetic DXIL dump with one load, then appends the same load with a distinct SSA result. It checks that the first dump returns a four-byte extent and the second is rejected by the load-count guard. Feeding the dump directly preserves both instructions independently of DXC optimization. The no-argument test runs in Linux Python CI, and the existing DXC-backed CTest entry runs both the dump check and the cache publication cases.
Refs #1914, #870.
Validation
Tested local commit
a10f5fe8on Windows with Python 3.12.14 and Windows SDK 10.0.26100.0 DXC. Its Git tree is identical to this PR head.All three Python checks passed. The DXC-backed check passed the dump assertions, the positive cache publication and the existing refusal cases. The diff check was clean. Replacing the load-count guard in memory with
if False:made the new test fail withaccepted two DWORD loads from the verified SRV handle.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T12:19:19Z.
Review: COMMENTED
Review of head
595113add0780190af2df843d0e5813495cf9342.No P1, no P2.
What I checked
tests/startup_mesh86_srv_proof_check.py: newcheck_load_count()feedsprove_mesh_root_srva synthetic dump. One load returns 4. A second identical load with the same handle raises the exactexpected one DWORD load from the verified SRV handleerror. This matches the guard attools/startup/mesh86_cache.py:114(loads != handles).__main__block now runs the dump check first and the DXC part only when arguments are given. The CTest entry inCMakeLists.txt:1355still passes DXC and the work dir, so it runs both..github/workflows/windows.ymladds the script to the no-argument list.docs/experiments.mddocuments the command.Commands run locally (worktree at the head above)
python3 -B tests/startup_mesh86_srv_proof_check.py->accepted one DWORD load and rejected two loads from the same SRV handlepython3 tests/docs_links_check.py-> self-test passed, 18 files, 450 linkspython3 tests/bidi_controls_check.py-> 1611 files, no bidirectional controlsgit diff --check origin/main...HEAD-> cleanloads != handlestonot loadsintools/startup/mesh86_cache.py. The new test failed withaccepted two DWORD loads from the verified SRV handle. Reverted afterwards.State: mergeable. At review time the Windows and Linux CI jobs were still pending, and the fixture job had passed.
Nit (not blocking): the test only covers two loads with the same handle. A case with a different handle would also be rejected by the same condition, but it is not asserted here.
AI-assisted; commands listed were executed locally.