startup: bind default sampler heap for sampler-heap-indexed roots #1685
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!1685
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1685/head"
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?
@tedin7 on GitHub · 2026-11-24 17:02 UTC · original
tedin7:x2w-frontier-id1419-sampler→main· +299 −1 · 7 files · 2 commits · closed without mergingSets a default sampler heap on the desktop list before a title root signature that indexes the sampler heap is set (debug layer message ID 1419).
What and why
D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXEDwas set by slot 34 with no sampler heap bound.CreateRootSignaturenow records the root signature flags. When slot 34 sets a flagged root signature on a list with no sampler heap bound, one shared one-entry shader-visible sampler heap per device is bound first (keeping the view heap a translated draw already bound). A sampler heap already bound is never replaced, andReset()/Close()clear the per-listPassstate so subsequent frames re-bind cleanly. One rate-limited log line (at most 4).docs/startup-runtime.mdanddocs/experiments.md.Not covered
Verification
5dbd2711ba5af3f592ce83e4f4456a61fc0c5e06):git diff --check origin/main...HEAD: passpython -B tests/docs_links_check.py: pass (17 Markdown files, 364 links)python -B tests/bidi_controls_check.py: pass (1281 tracked files)5dbd2711ba5af3f592ce83e4f4456a61fc0c5e06:--preset dev):cmake --build --preset dev --target d3d12_xs_shim startup_root_sampler_heap offscreen_check startup_stream_consumer startup_stub_consumer startup_translated_sampler_bindings_check -- -j 6(28.79s)ctest --preset dev -R '^(startup_root_sampler_heap_warp|startup_sampler_heap_warp|startup_sampler_heap_wrapped_warp|startup_sampler_x_warp|startup_inline_sampler_warp|startup_stream_draw_warp|startup_stubs|startup_translated_sampler_bindings|startup_translated_sampler_bindings_shared_axis_control)$' --parallel 4 --no-tests=error --output-on-failure: 8/9 passed, 1 skipped (startup_root_sampler_heap_warp, exit 77: no debug layer capability on this Windows Server 2025 host)./O2(--preset release):cmake --build --preset release --target d3d12_xs_shim startup_root_sampler_heap offscreen_check startup_stream_consumer startup_stub_consumer startup_translated_sampler_bindings_check -- -j 6(53.72s)ctest --preset release -R '^(startup_root_sampler_heap_warp|startup_sampler_heap_warp|startup_sampler_heap_wrapped_warp|startup_sampler_x_warp|startup_inline_sampler_warp|startup_stream_draw_warp|startup_stubs|startup_translated_sampler_bindings|startup_translated_sampler_bindings_shared_axis_control)$' --parallel 4 --no-tests=error --output-on-failure: 8/9 passed, 1 skipped (startup_root_sampler_heap_warp, exit 77: no debug layer capability on this Windows Server 2025 host).Overlap
git merge-treeagainst #1567, #1641, #1657, #1658 and #1277: clean. #1441 and #1469 already conflict with main by themselves; with this branch their source files auto-merge and onlyCMakeLists.txtconflicts (adjacent test blocks).AI-assisted; commands listed were executed locally.
@MasterDomino on GitHub · 2026-11-24 17:13 UTC · original
@tedin7, R0Y00 asked us to keep this as one implementation (see the go-ahead on #870) and preferred a different shape from the default sampler heap:
I have a prototype of the deferral running on Windows: RX 9070 XT,
X2W_D3D12_DEBUG=1, 75 s on the main executable, id 1419 went from 394 to 0 with unchanged draw counts. Your test's message-callback counter and plain-list control are exactly the fail-first case R0Y00 asked for.Two options, whichever you prefer:
startup_root_sampler_heaptest, extended to the flag matrix and the real-path refusal. You're credited as co-author, and this draft closes.I'll start on option 1 locally, but I won't push until you've answered.
AI-assisted.
@tedin7 on GitHub · 2026-11-24 17:15 UTC · original
Sounds great, @MasterDomino — closing this draft so you have a clean runway for the single implementation @R0Y00 preferred on #870. Happy to review and run Windows Debug + Release /O2 verification as soon as your PR is open!
AI-assisted.
Pull request closed