d3d12: skip the work that reads a refused paged descriptor table instead of failing its list #463
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/463"
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 brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-29T10:51:31Z.
Summary
When the descriptor arena refuses a paged table (
gpu_tablereturnsE_INVALIDARG),SetGraphicsRootDescriptorTableandSetComputeRootDescriptorTableset the list's recording error.Closethen fails, and the whole list is dropped. The labels that list would have written never get written, so every queue waiting on them stops until the title's GPU watchdog ends the game.This change records the refused slot instead. Each draw or dispatch is skipped while a refused table is bound, and the record clears when that slot is set again. The rest of the list still runs, including its label writes.
Tested
lanesandd3d12-*suites haven't been run.a_refused_table_skips_work_until_its_slot_is_set_againintests/commands/compute_bindings.rs.GPU, driver and backend: RX 9060 XT, RADV (Mesa), GE-Proton11-14, vkd3d-proton.
Commands run and their results:
The unit test was compiled but not run: no
link.exeon this host.ProjectScarlett, first story mission (
main28717263with #389, #390, #436, #442, #443, #445 and #448):command list failed 0x80070057 (#1) in the command at runtime/d3d12/src/commands/descriptors.rs:168and oneClose rejected. Thenstalled label ... written by list ... submitted to a type 0 queue, and the watchdog stopped the game.Close rejected.Checks
No evidence JSON changed.
🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T11:01:02Z.
We have hit the same refusal (one list lost at
Close, then the labels it would have written) on an RTX 5090, and I had a parked branch with the same idea. I won't open mine, yours is here. From comparing the two by reading, things you may want:compute_root,graphics_rootandheapsclear the bound tables but notrefused_tables, so after a refusal, work under a new root that doesn't set that slot is skipped too, until the slot number is set again. Clearing the entries for that bind point in the first two, and all inheaps, where they clear the tables, would do it.ray_dispatch.rs,standard.rs). I didn't look atExecuteIndirectin either.I've queued the NVIDIA full check of
f96fb326on an RTX 5090, after my own, and will post the result. If any of my branch would help I can push it.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-29T11:31:32Z.
Thanks, all three are in
2e3e39c3(rebased onmaindf67a64f):compute_rootandgraphics_rootdrop that bind point's refusals when the root changes, andheapsdrops them all, alongside the bound tables. New unit test:new_descriptor_heaps_clear_refused_tables.adopt_bundlerefuses any with waits, so skipping one loses none.ExecuteIndirectwas already covered: it records throughcompute_dispatch/draw, which run the same check.Type check passes (
cargo check --locked --target x86_64-pc-windows-msvc -p tuxbox-d3d12 --tests). Thanks for queuing the 5090 run. Since the branch moved, it would need2e3e39c3rather thanf96fb326.Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T11:39:12Z.
NVIDIA run of
2e3e39c3merged ontomain(d2eb99ed), RTX 4070 Ti SUPER (620.73.04), GE-Proton11-14:lanes-selftest: 25/27.descriptor-reclaimanddescriptor-reclaim-splitfail withexpected E_OUTOFMEMORY on unsubmitted pin overflow, got 0x00000000.mainalone passes 27/27 on the same card, and the earlier head (before your three changes) failed the same two the same way.lanes-bindless-compute20/20,d3d12-tables1/1.--libunder Wine: 373 passed;failures::tests::a_failed_pipeline_reaches_the_filefailed once in the full run and passed twice on its own, so I read that as flaky rather than this change.The scenario pins more descriptors than an unsubmitted list can hold and expects its
Closeto reportE_OUTOFMEMORY. With this change the refused table no longer fails the list, which is the point of it, so either the scenario's expectation moves to the new rule (the list closes, and the draw that reads the refused table is skipped, which the test could check instead), or pin overflow keeps failing the list as a distinct case from the refusals this is aimed at. Which one fits is your call.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T11:49:38Z.
Thanks for taking all of that on so quickly. brcly's run of
2e3e39c3on a 4070 Ti SUPER covers what I'd queued, so I've dropped my own run, which hadn't started, until thedescriptor-reclaimexpectation is settled. I don't have a view on which way to go beyond what brcly said; I'd rerun on the 5090 once you've picked.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-29T12:40:26Z.
Thanks for the run. I went with the second option in
42d74c6f, rebased onmain6e2c5dab:gpu_tablerefusing withE_OUTOFMEMORYsets the recording error as before, soClosereports it anddescriptor-reclaim/descriptor-reclaim-splitkeep their expectation.E_INVALIDARG(0x80070057atdescriptors.rs:168), so the case this PR targets is unchanged.Pin overflow is a capacity limit the title is told about. The other refusals are the ones that silently lost a list's label writes.
The type check passes. I haven't run
lanes-selftesthere: on this host every Proton check opens a visible window on the desktop, so I've been leaving the suites to CI and to runs like yours.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T13:26:04Z.
Full check of
42d74c6fon an RTX 5090 (620.70.10, GE-Proton11-14): 187 pass, 0 fail, including bothdescriptor-reclaimcases. No game was running.