D3D12.X: draws with untranslated pipelines get the title's root signature #144
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!144
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/144/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?
@tiagonleal on GitHub · 2026-11-23 15:12 UTC · original
tiagonleal:fix/untranslated-draws-root-signature→main· +47 −1 · 2 files · 1 commits · merged 2026-11-23 20:51 UTCFound while getting CI (#143) to run on a runner whose only GPU is WARP: the test title crashes inside
d3d10warp.dll. WithXCL_D3D12_DEBUG=1the debug layer shows why, and it shows the same on an RTX 5070 Ti, where the driver just tolerates it:13 times in one test-title run: 11×
DrawInstanced, 2×DrawIndexedInstanced.Why
bind::set_graphics_root_signature(console #34) only records the console layout and arguments. A translated draw then binds XCL's ABI root signature inbind_abi. A draw with an untranslated pipeline – PC shaders, a background build's stand-in, a fallback after the driver rejected the console shaders – went to the PC list as it was, with the comment "a PC pipeline: its own root signature and arguments". Nothing had ever bound that root signature on the PC list.Change
bind::Statekeeps the title's graphics root signature (a PC object:dev_create_root_signaturealways returns one, an empty fallback at worst). It is cleared onReset/ClearState.graphics_boundbinds it before a draw with an untranslated pipeline. Stand-ins and fallbacks are made from a copy of the title's desc,pRootSignatureincluded, so they match it. Translated draws are unchanged, and so is compute: untranslated dispatches are skipped already.Test
e2e::test_title_draws_with_a_root_signature_under_the_debug_layerruns the test title withXCL_D3D12_DEBUG=1and fails on any "No root signature has been set" in its log. Before:13 draws without a root signature. After: none. It skips withoutd3d12SDKLayers.dll(Graphics Tools) or the system XGameRuntime, so it skips on the CI runner.cargo test --workspace --no-fail-fastonmain484dd57(RTX 5070 Ti): 561 passed, 0 failed, 39 ignored.Not in this PR (seen in the same debug-layer run)
CreateReservedResource→E_OUTOFMEMORY), soIASetIndexBuffergets a console address that is no GPU address (0x20010000 does not belong to any existing Resource or Heap). No title draws anything right without unified memory, so I left it.CopyBufferRegionon a resource in the wrong state (id 538), on the RTX 5070 Ti too.AI-assisted.
🤖 Generated with Claude Code
@ivall on GitHub · 2026-11-23 20:52 UTC · original
Merged (main
2abc562). Checked on an RX 9070 (RDNA4) with the 11 PRs merged together on main38b05b7:cargo build --workspace && cargo test --workspace -- --test-threads=4- 547 unit tests passed, 0 failed (19 ignored); the integration and e2e tests passed too.@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-23 15:13 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.