runtime: cache complete slot 86 mesh pipeline stages #2262
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2270"
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 R0Y00 on 2026-11-25T09:02:07Z.
Refs #1759, #1760 and #2253. Builds on the merged slot 86 tag selection in #2248.
Record complete Xbox MS and optional PS containers at creation. An independent request key frames the original stages, serialized creation root, and pointer-free stream. The cache publisher takes an already validated desktop pair and writes a hash-checked marker last. At creation, the shim verifies the exact stage identities and asks D3D12 to create the PSO from the captured state and root.
The executable slice uses tracked root constants. Indirect execution checks the original bound root, all its constant words, matching color and depth formats and count, single-sample attachments, and viewport/scissor state. A no-PS pipeline requires a writable matching depth view and a physical adapter. It is refused on WARP after the source-built depth-only execution reproduced DXGI_ERROR_DEVICE_REMOVED. Heap-indexed and other untracked resource bindings remain refused. This change adds no external translator or binary artifacts.
Windows 11 build 26200.9974, Release, 14/14 tests passed with no CTest skips. WARP 10.0.26100.9818 and RTX 4060 Laptop GPU 32.0.16.1656 ran with the debug layer enabled. The source-built nonempty-root mesh draw had 4/8 painted pixels on each of three independent attachments on both adapters. RTX depth-only D16 had 8/8 depth writes. Pending/invalid marker, incomplete root constants, and missing attachments left the targets clear and preserved the argument guards. WARP's depth-only refusal also left the depth clear.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T09:04:15Z.
Review: COMMENTED
Review of head
73f4cff7baa831674cc7d5bf2a574ababf1188a8(Linux-side review; I did not run Win2025).Blocking: the branch is CONFLICTING with
main.git merge-tree --write-tree origin/main HEADreports content conflicts insrc/startup_stubs/d3d12_xs_device.cppandtests/startup_indirect_draw_indexed.cpp. Please rebase. The Windows numbers in the body predate the rebase, so re-run them on the rebased head.Executed locally
git diff --stat origin/main...HEAD: 9 files, +712/-60.python3 tests/docs_links_check.py: passed (18 files, 428 links).python3 tests/bidi_controls_check.py: passed (1544 files).git diff --check origin/main...HEAD: clean.gh pr checks 2270: no checks reported on the branch.startup_indirect_mesh_cache_*CTests need dxc and a D3D12 fixture, so they cannot run on Linux. Not run.publish()(tools/startup/mesh86_cache.py). A synthetic mismatch was still rejected, but only by the later DXIL check. So that check is not independently covered by what I could run. Please confirm a test fails when it is removed (a publish with a PS against a no-PS request, using real DXIL).Findings
mesh86_cache.inl,xbox_mesh86_container: the "XDAT" search scans the DXIL payload in 4-byte steps and trusts the first match. A payload with those bytes earlier in the header could be mis-parsed. It fails closed (refusal), but a negative fixture would help.try_cached_mesh86publishes the fourreq_*files before the heap-flag and tracked-constants refusals. Refused requests leave files in the cache directory. Consider publishing after the eligibility checks, or document it.list_root_constants(d3d12_draw.inl): thecount <= 8 - offsetguard and the loop truncation overlap. A one-line comment on the invariant would help.Good
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T09:23:03Z.
Review: COMMENTED
Re-review of head
e5130779bb0a341c1424639e728517c5d7cdf3cf(Linux-side; I did not run Win2025).Rebase: resolved. The head is a merge of main into the branch.
git merge-tree --write-tree origin/main HEADnow returns a clean tree (main has moved 1 commit since, still no conflicts). The earlier conflicts ind3d12_xs_device.cppandstartup_indirect_draw_indexed.cppare gone. The Windows numbers in the body predate the merge, so please re-run them on this head.Previous P2s: both still open. Since
73f4cff7the only changes tomesh86_cache.inlandtools/startup/mesh86_cache.pycome from the merge of main. I found no change for either item.src/startup_stubs/mesh86_cache.inl:29: the "XDAT" search still scans the payload in 4-byte steps and trusts the first match. It fails closed, but there is no negative fixture for a payload with those bytes earlier in the header.src/startup_stubs/mesh86_cache.inl:159-179: the fourreq_*files are still published before the heap-flag and tracked-constants refusals. Refused requests still leave files in the cache directory. Publish after the eligibility checks, or document it.publish()(tools/startup/mesh86_cache.py:76) is also unchanged. Please confirm a real-DXIL test fails when it is removed.CI: at review time, "Run platform-independent Python checks on Linux" is
fail(38s) on run 45584378166. The log was not yet available, so I cannot say if the PR causes it. The Windows jobs were still pending. Please check it.Executed locally
git diff --stat origin/main...HEAD: 9 files, +719/-66.python3 tests/docs_links_check.py: passed (18 files, 435 links).python3 tests/bidi_controls_check.py: passed (1570 files).git diff --check origin/main...HEAD: clean.gh pr checks 2270: see CI note above.startup_indirect_mesh_cache_*CTests need dxc and a D3D12 fixture, so they were not run on Linux. I did not repeat the mutation run for the same reason.Title and content remain neutral and clean-room.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T09:37:08Z.
Review: COMMENTED
Re-review of head
795ed6e9ac99a7fadafd4ec82664dbe9ddc828c6(Linux-side; I did not run Win2025).Delta since the last review (
e5130779): only a merge of main. Changed files: README.md, docs/startup-runtime.md, gameinput.cpp, startup_gameinput_contracts_check.cpp, tools/mesh_entry_aot.py (main's commits #2264, #2269, #2276).src/startup_stubs/mesh86_cache.inl,tools/startup/mesh86_cache.pyandtests/startup_indirect_mesh_cache_check.pyare byte-identical to the previous head.Previous P2s: both still open (no change).
src/startup_stubs/mesh86_cache.inl:29-30: the "XDAT" search still scans in 4-byte steps and trusts the first match. It fails closed, but there is no negative fixture for a payload with those bytes earlier in the header.src/startup_stubs/mesh86_cache.inl:159-179: the fourreq_*files are still published before the heap-flag and tracked-constants refusals, so refused requests leave files in the cache directory. Publish after the eligibility checks, or document it.publish()(tools/startup/mesh86_cache.py:76) is removed.State:
git merge-tree --write-tree origin/main HEADis clean. The head is mergeable. At review time "Run platform-independent Python checks on Linux" passes (46s). The Windows jobs and the gfx1013 fixture job were pending. The Windows numbers in the body still predate the merges, so please re-run them on this head.Executed locally
git diff --stat e5130779 HEAD: 5 files, +45/-6 (all from main).git diff --stat origin/main...HEAD: 9 files, +719/-66.python3 tests/docs_links_check.py: passed (18 files, 435 links).python3 tests/bidi_controls_check.py: passed (1570 files).git diff --check origin/main...HEAD: clean.python3 -I tests/startup_indirect_mesh_cache_check.py: needs backend/work/depth_only args from the Windows CTest fixture (dxc + D3D12), so not runnable on Linux. I did not repeat the mutation run for the same reason.gh pr checks 2270: see state above.Title and content remain neutral and clean-room.
AI-assisted; commands listed were executed locally.