runtime: leave unreferenced root parameters of slot 86 heap windows unset (Part of #3545) #3605
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!3605
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3603"
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?
@mumba17 on GitHub · 2026-11-30 12:53 UTC · original
mumba17:runtime/mesh86-unreferenced-root→main· +245 −36 · 9 files · 3 commits · merged 2026-11-30 17:14 UTCPart of #3547. Rebased on
mainafter #3601 and #3608. The second commit addsstartup_indirect_mesh_cache_heap_wide_warpto theprpreset filter. The third addresses the review: per-stage visibility and aconstants-onlymarker flag.Problem
Every slot 86 request in a local title shader cache uses one root layout:
0x400on half of them and0xc00on the other half.With a published heap-buffer window (#3595, #3601), these roots still stopped at
root bindings outside supported profile, or atroot heap indexing (0xc00) has no verified binding. The cached path only accepted roots made of constants.Change
Publisher (
mesh86_cache.py):root_constant_registers).Resource Bindingstable holds nothing but cbuffers at the root's 32-bit-constants registers visible to that stage,ALLor its own visibility (prove_constants_only). D3D12 lets disjoint visibilities share a register, so mesh-only constants atb0do not cover a pixel stage'scb0.constants-onlyto the profile 3 marker to record that this proof ran.Runtime (
mesh86_cache.inl,d3d12_xs_device.cpp):0x800is accepted next to0x400. A sampler-heap flag without the resource-heap flag is still refused.constants-onlymarker: one published before the proof is refused until republished. A root of constants only still accepts the older marker.SetGraphicsRoot32BitConstantson every parameter except the root SRV, which would have been wrong for a table.Tests
startup_indirect_mesh_cache_heap_wide_{warp,hardware}repeat the five heap window cases from #3595/#3599 (views, swapped, empty, raw, uint) with the title root shape:t0-t3, space 1) that is never set;t4, space 3) that is never set;0xc00.t0, space1from the table is refused at publication.constants-onlyis refused at creation for the wide root and still draws for the narrow one.cb0): constants atb0withALLor pixel visibility pass, mesh-only constants are refused.runtime_mesh86_cache_cli_checkadds cases for:b0next to a pixel-only CBV table atb0(refused), and the reverse with pixel-visible constants (accepted).runtime_mesh86_cache_cli_checkandstartup_indirect_mesh_cache_heap_warp. After the review fixes, all 25 slot 86 tests (mesh86|indirect_mesh_cache|indirect_mesh_lease) pass on the RTX 3090 and WARP.Windows 11 build 26300, MSVC 19.44, Release, debug layer enabled. On an RTX 3090 (driver 32.0.16.1664) and WARP 10.0.26100.9818, both new tests passed with zero D3D12 warnings or errors, so leaving those parameters unset is clean on both. A serial run of
startup_(indirect|list|mesh|native_mesh|translated|compute_dispatch|resource_retire)|mesh86passed 229 of 229, with three native-compute WARP capability skips.Title run
Setup: this branch,
tools/startup/run_preset.py --console x --gpu nvidiawith a saved profile, on an RTX 3090. The run was stopped by hand at 545.7 s, after 7,131 presented frames.0x400and 2 with0xc00. All 4 now reachslot86 mesh request <key> pending, meaning they wait for a published pair. Before this change they stopped at the root-profile and sampler-heap refusals described above.ExecuteIndirectin this run window, so no title draw was attempted through them..m86requests. A title draw through this path needs a hand-published pair, and that pair has to pass the window and constants-only proofs.🤖 Generated with Claude Code
The title's slot 86 roots hold descriptor tables, a root SRV and root constants, and half of them also allow sampler-heap indexing (0xc00). With a published heap-buffer window they still stopped at "root bindings outside supported profile". The publisher now decodes the request's RTS0 root and accepts a heap-buffer pair only if each stage's DXIL resource bindings hold nothing but cbuffers at the root's 32-bit-constants registers. For such a window the runtime accepts descriptor tables and root CBV/SRV/UAV parameters, accepts 0x800 next to 0x400 (the stages provably never read the sampler heap), leaves those parameters unset, and binds and checks only the constants. startup_indirect_mesh_cache_heap_wide_{warp,hardware} repeat the heap window cases with that root shape, and refuse a pixel stage that reads the table. Part of #3545. Co-Authored-By: Claude Opus 5.5 <[email protected]>@R0Y00 on GitHub · 2026-11-30 15:49 UTC · original
#3601 and #3608 are now on
main. The current #3605 head still conflicts withmainafter the #3601 squash. Please refresh the branch as planned and retainruntime_mesh86_cache_cli_checkandstartup_indirect_mesh_cache_heap_warpin theprpreset when adding the wide-window case. That will let us review only the new root-binding change and rerun all three slot 86 checks together.9f2bb7dd27to1e55621640@mumba17 on GitHub · 2026-11-30 15:56 UTC · original
Refreshed on
main(f50b85c5), head is now1e556216. The second commit widens theprfilter tostartup_indirect_mesh_cache_heap(_wide)?_warpand keepsruntime_mesh86_cache_cli_check, soctest --preset pr -Nlists all three slot 86 checks. 25/25 slot 86 tests pass locally, CI is running.@R0Y00 on GitHub · 2026-11-30 15:57 UTC · original · requested changes
Two gaps remain in the proof that lets ExecuteIndirect leave nonconstant root parameters unset.
root_constant_registers()drops shader visibility. I compiled a valid root with mesh-only root constants atb0and a pixel-only CBV table also atb0. For a PS that readscb0,prove_constants_only()accepted the actual DXC dump ({(0, 0)}), although the PS binding resolves to the table that the runtime leaves unset. D3D12 allows overlapping register namespaces for disjoint shader visibility. Please check each dump against the constants visible to that stage, or restrict the proof toSHADER_VISIBILITY_ALL. Add a control for this split binding. https://learn.microsoft.com/en-us/windows/win32/direct3d12/creating-a-root-signature#shader-visibilityA wide root still accepts the same profile 3 marker that #3601 could publish before it checked ordinary bindings. Its hash fields identify the blobs but do not distinguish whether the new proof ran. Please require a new proof marker version or flag before using the widened runtime path. A legacy marker for a wide root should remain refused until republished; an existing narrow profile can retain its old behavior.
@mumba17 on GitHub · 2026-11-30 16:07 UTC · original
Both fixed in
0a0dc40b.root_constant_registers()now keeps each parameter's visibility, andprove_constants_only()checks each stage's cbuffers against constants withALLor that stage's visibility (MS 7, PS 5). Controls: the CLI check has mesh-only constants atb0with a pixel-only CBV table atb0(refused), plus the reverse with pixel-visible constants (accepted).run_heapalso runs the proof on the fixture's real DXC pixel dump (cb0):ALLand pixel visibility pass, mesh-only is refused.constants-only. A wide heap root (0x800, or any parameter other than constants) requires it and refuses an older marker withwide heap root requires a constants-only heap-buffer window. A root of constants only still accepts the older marker.heap_widechecks the refusal, and the narrowheaptest draws with the older marker.Mutation check: accepting constants of any visibility fails both
runtime_mesh86_cache_cli_checkandstartup_indirect_mesh_cache_heap_warp. All 25 slot 86 tests pass on an RTX 3090 and WARP.@R0Y00 on GitHub · 2026-11-30 17:13 UTC · original · approved these changes
Verified the two findings from my earlier review on this revision. The publisher now checks root-constant visibility against each actual shader stage, and wide roots require the new proof marker while narrow legacy caches still draw. Local Windows Debug: 5/5 via
ctest --preset pr --no-tests=error --output-on-failure -j 1 -R '^(runtime_mesh86_cache_cli_check|startup_indirect_mesh_cache_heap_(wide_)?(warp|hardware))$'. A separate source-built DXC split-visibility fixture was refused for the pixel stage and accepted by the pixel-visible positive control.