GPU: run submissions asynchronously on a host fence timeline #595
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!595
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-595"
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?
@wbkepler on GitHub · 2026-11-24 05:18 UTC · original
wbkepler:gpu/async-submissions→main· +2102 −295 · 15 files · 1 commits · openSummary
Host::executeused to submit, signal, thenWaitForSingleObject(INFINITE)on every submission before copying shader-written ranges back and doing the bottom-of-pipe writes. Each world frame has about 150 submissions, all fully serialized, so the CPU and GPU never overlapped. This PR runs them on an asynchronous GPU timeline.Timeline (
timeline.rs): each submission signals the next host fence value and is pushed with its work and the title memory its GPU work touches:Submissions are finished strictly in order, one thread at a time. Finishing a submission means: copy-back, then its bottom-of-pipe writes, then the title fence signals queued behind it. Signals run under the entries lock, so a signal queued later can never overtake them.
Completion thread (
victory-gpu-finisher): waits on the host fence for the oldest submission and finishes it. Title fences and bottom-of-pipe memory therefore move on their own, which covers titles that wait on events or poll memory.Queue
Signal/Signal2X: the fence is AddRef'd and set once every earlier submission has finished, or at once if none is in flight.Lists reset while they run (D3D12 allows a reset right after submission; titles record the next frame into their lists while the GPU runs this one): the reset no longer waits.
Retired,SPARE_*).Sync points. The thread that needs a submission finished waits for that one only:
A later submission's CPU-side steps (
Batch::settle):Fill,Copysource, rectangle expansion, texture staging refresh, and theGpuWritesnapshot;Copydestination,CopyMemoryToMemoryX;Refreshoverlapping an in-flight submission's shader writes through the same copy waits only if the write journal shows a title write in the overlap since the copy took it (Timeline::refresh_conflict,Shadow::stale). Overlaps with bottom-of-pipe targets or with shader writes through another copy always wait.In-flight shader-write ranges on one copy never overlap, which keeps the per-copy snapshot/
pendingbookkeeping sound.Resubmitting a recording that is still running, page-mapping batches, swap-chain resizes, a blocking (null-event)
SetEventOnCompletion, capture readbacks, and more than 16 submissions in flight.Device removal is detected when a submission is finished. The DRED report covers the lists of every submission still in flight. A failed
Signalends the run instead of leaving a wait that never returns.VICTORY_GPU_TIMING(diagnostics) stays synchronous: each list is waited for and timed.What stays synchronous, and why
// shortcut:inHost::present). A title may treat a present as the GPU being done with the frame. In the world the GPU has usually finished by then (about 0 ms waited at present), so this costs little now; letting one frame run on is a follow-up.Test evidence
timeline: submissions finish in order and signals follow their work; conflicts pick the newest overlapping submission; a refresh waits only for title-written overlaps, with labels and other copies always counting.host(on the host device): a list reset while it runs records into fresh memory and both bottom-of-pipe writes land; a queued signal sees an earlier submission's write; a later submission's fill of memory an earlier one writes sees the written value.cargo clippy --workspace --all-targets,cargo clippy -p victory --features diagnostics --all-targets(no new warnings),cargo test --workspaceandcargo xtask policyall pass. New and changed code is rustfmt-clean.VICTORY_D3D12_DRED=1, 7-minute runs (menus → about 60 s loading → world). Each build is #578 (refuse wave64 programs on 32-lane hosts, which ends the NVIDIA device removals) with or without this PR:upstream/main, menus also became steady (22–42 fps with dips to 4–10 became a steady 30). The world was dominated by the wave64 hangs then.🤖 Generated with Claude Code
@Nixitov on GitHub · 2026-11-24 06:28 UTC · original
Tested stacked on the RTX 5070 after #493 + #483 + #581 (the pair that stops the world hang here), and it runs: 2.0-2.5 fps in the world, no device removal.
Setup: Windows 11 Pro 26200.9974, RTX 5070, driver 617.14, in-box D3D12 10.0.26100.9818;
d2a4bae+ #493 + #483 + #581 + this PR, merged in that order (clean), release build.The frame line now reads
381.8 preparing: copies 254.9 ms 231.5 MB, textures 17.6 ms 142.9 MB; 12.5 on the GPU; 92.5 copying back, so after this PR the world is limited by the copies into and out of title memory (the one-address-space work in the roadmap), not by the GPU or by submission serialisation. Nothing else regressed in the run.No game files; only timings and counts.
AI-assisted (DeepSeek V4.1 Flash coding agent).
@aycow on GitHub · 2026-11-24 06:50 UTC · original
@wbkepler I ran a native-fence-gated #595 + #562 integration. Reset dropped the draw state while its native work was still pending. Without the fix, WARP reported all 65,536 descriptor slots available before the fence. Transferring the shared and list-local leases to the retired recording preserved both GPU outputs. A separate two-submission test showed that later CPU detiling could rewrite shared texture staging while an earlier GPU copy still needed it. Waiting before rewriting the changed staging kept both outputs correct. Both fixes passed AMD, NVIDIA and WARP with full GPU validation. The deliberate WARP mutations failed both regressions.
The integration branch carries the fixes separately at
bc49373and70628ddand finishes at5b11a40. SetVICTORY_TABLE_TEST_ADAPTERto amd, nvidia or warp, setVICTORY_TABLE_TEST_AGILITYto the Agility x64 DLL directory andVICTORY_TABLE_TEST_DXCto dxc.exe. Runcargo test -p victory-gpu --features diagnostics reset_holds_descriptor_ranges_until_native_fence -- --ignored --nocaptureand repeat forchanged_texture_upload_waits_for_older_gpu_readerwith legacy GPU timing off.The #185 composition at
4ef3dddpasses its direct-SRV checks on all three adapters when that work stays synchronous. For #387, the existing producer → copy → CPU staging → GPU reader fixture passes atdf2276b. Removing only the intermediate CPU handoff makes the consumer read 13 instead of 500, even though final copyback still reaches 500. This is a separate intra-submission boundary to preserve when resolving the merge. I'd be glad to fold the two validated fixes into your branch with you.@wbkepler on GitHub · 2026-11-24 07:08 UTC · original
Thanks @aycow for the thorough AMD/NVIDIA/WARP validation and both fixes! Folded both into
gpu/async-submissions(adapted to#595standalone without#562'sSharedTable/DynamicRange, with co-author credit):bc49373): moved dynamic slot leases out ofdraw::StateintoHostList'sDeferred(DynamicLeaseviaHostList::keep_dynamic), so resetting an in-flight list hands its leased descriptor slots toRetiredand only releases them once the submission finishes on the native host fence. Addedsubmissions::dynamic_descriptor_leases_stay_held_until_async_submission_finishes.70628dd): trackedTouches::stagingintimeline.rswithTimeline::staging_conflict, addedBatch::settle_staging, and updatedtexture::Staging::refreshto snapshot changed bytes and invokebefore_writeright beforedetile(). Addedstaging_conflictcoverage intimeline::tests.Gate:
cargo clippy -p victory-gpu --all-targets(0 new warnings),cargo test -p victory-gpu --lib, andcargo xtask policy(151 files ok).@aycow on GitHub · 2026-11-24 07:31 UTC · original
@wbkepler Thanks for carrying the lifetime fixes into
c89f08fand for the credit. I published the tested #595/#387 composition at3847bf0with that revision in its ancestry. CPU-dependent intermediate copies wait and copy back before the next staging fill. The last GPU-only batch can stay asynchronous. Its native fence owns continuations, descriptor leases, and staging through completion.The 21 ordered-copy cases and inherited retirement/staging controls passed on AMD, RTX 5070 Laptop and WARP with full GBV. I also fixed the wait helper's handling of Win32
WAIT_FAILEDand an early event. The code checks actual fence progress, with the existing DRED path on removal. The native held-fence test passed on all three adapters. The mutation reproduced early return on WARP.For #185, exact selected slots could go asynchronous once native heap/slot generations are leased under the descriptor mutation lock and backing ranges stay protected through the fence. Current direct-SRV refresh records alone don't hold that proof. Composition and reproduction
@Nixitov on GitHub · 2026-11-24 08:22 UTC · original
Follow-up on the same machine after two CPU-side changes stacked on this PR (not part of it), world scene, release build:
copiescopying backThe single submission is now the thing the frame waits on: the main thread prepares, submits, then waits for this PR's completion (which includes the shader results copied back into title memory) before preparing the next one. Nothing here reads wrong; the wait is just the pipeline's length now.
No game files; only timings.
AI-assisted (DeepSeek V4.1 Flash coding agent).
@Slaktarn700 on GitHub · 2026-11-24 14:36 UTC · original
Tested this on Linux: RX 9070 XT, RADV / Mesa 26.3.1, Proton Experimental (vkd3d-proton 3.2), diagnostics build. Base was
mainffe310eplusproton-fixesand #454, with the watchdog disabled.It works: GPU time per world frame dropped from 200–350 ms (synchronous) to a few ms.
But on its own it hangs the GPU about 6–9 s into the world. That happened three times out of three. Each time it was
ring gfx_0.0.0 timeoutwith no VM fault, and submissions grew from 0.45 s to 1.1 s to 2 s before the kernel reset. RADV's hang report showed a mesh + pixel pipeline bound and no fault. The cause is shader loops spinning on data the asynchronous path hasn't made available yet. They run toLOOP_LIMIT(2^20) in every lane:VICTORY_SHADER_LOOP_LIMIT=4096, the same build ran 2+ minutes with no hang.So #595 likely needs #452 to land first, or with it.
One thing to retire when this meets #282: #282 adds a per-list
argumentsbuffer (Arguments, for the rectangle expansion), whichresetreuses (filled/used= 0). With submissions in flight, a list reset while it runs would rewrite arguments its running submission still reads. On my merge I moved it intoRetirednext toscratchand the budget, and reset it in place only when the list isn't running.Two smaller notes from the merge:
dynamic_descriptor_leases_stay_held_until_async_submission_finishesassumes 2^16 dynamic slots, butmainnow has 2^18 where the heap fits (#336/e8d3b64). I made it lease in 2^16 chunks until none are left.execute(the indirect ones) need ahost.drain().AI-assisted (Claude Code).
@aycow on GitHub · 2026-11-24 16:34 UTC · original · edited 2026-11-24 16:50 UTC
@wbkepler I tested a current-main #595/#562 composition at
e8dbc98, usingba55d3c, #56205c3757, and #336's actual pool size. Both shared and list-local descriptor ownership retire on the proven fence. The four native gated cases plus the disjoint shadow snapshot case passed in default Windows adapter mode and WARP. These runs used validation off. The full #185/#387 composition remains separate. For #509, reset must detach each recording's query page and operation metadata together so pending collection reads the old generation after its fence.Follow-up on the same production head: the five cases passed on explicitly selected AMD Radeon Graphics, RTX 5070 Laptop, and WARP with Agility 1.620.2, full GPU-based validation and state tracking, and zero warning/error callbacks. Test-only adapter harness. Run the ignored
host::submissions::full_gbv_async_gate_suitewith diagnostics enabled,VICTORY_ASYNC_TEST_GBV=1, the Agility DLL path inVICTORY_TABLE_TEST_AGILITY, andVICTORY_TABLE_TEST_ADAPTERset toamd,nvidia, orwarp.The ordered-copy follow-up now includes #387
489c9bfand #5629ca0533. All 21 ordered-copy cases, the held-fence wait check, and the CBV/mixed-table readbacks at widths 1, 16, 178 and 256 passed on explicit AMD, NVIDIA and WARP with full GPU-based validation. The WARP mutation showed why the CBV key must include native recording segment identity. An ordered copy can move the later draw to a new continuation whose local count is also zero. #185's directly indexed descriptor generations still need fence-owned snapshots before its async path can be validated.@aycow on GitHub · 2026-11-24 17:26 UTC · original
@wbkepler A held-fence reader regression on current main plus
ba55d3cfound an independent backing-lifetime issue: a later CPU refresh changed an earlier queued read from 11 to 29. The narrow control waits for overlapping readers before refreshing. It preserved 11 and 29 and passed the disjoint-writer replay on AMD, NVIDIA and WARP with full GPU validation. Explicit adapter harness. The mark-clean source samples its generation before reading title memory. #185 still needs complete direct descriptor coverage and native slot ownership through the fence.@aycow on GitHub · 2026-11-24 18:13 UTC · original
The new synthetic CPU-inside-UAV reproductions for #185/#387 exercise a CPU update after list recording, a real UAV write, and a different CPU write after the snapshot. Synchronous fixes landed on those branches. At exact ba55d3c, this cannot be ported as removal of pending ranges: older in-flight writers still need those exclusions, and the held-reader regression reported above demonstrates why older readers need protection too. The safe integration point is after refresh preparation for the current declarations, separately from completion-owned earlier intervals. Direct descriptor/heap generations and backing bytes still need fence ownership before a composition can be validated.
@aycow on GitHub · 2026-11-24 18:43 UTC · original
The prior timestamp-generation work is now an independently validated #509 composition with exact #509 and current #595 plus the confirmed-fence guard, free of #387/#562 dependencies. The held-fence/replay regression and one-submit smoke pass AMD/NVIDIA/WARP with full GBV. This isolates census lifetime work from the shadow data/descriptor ownership cases.
@wbkepler on GitHub · 2026-11-24 20:33 UTC · original
@mercuryVM thanks for the careful review (written against
c89f08f). The branch is now rebased onto currentmain(ffe310e) ase6694e4; the only conflict wasdraw.rs(kept upstream'stable_failed, the dynamic leases stay on the host list asDynamicLease), andhost.rs/texture.rsmerged cleanly, including upstream's newdefer_fillfor texture-region staging and the CPU-written texture uploads beforeCopyResource/CopyTextureRegion.Where each finding stands at the rebased head:
Shadow::writingnow re-takes[from, to)from the copy even when the hull did not grow, andcopy_backupdates the snapshot for every piece it syncs, so a disjoint submission keepingbeforealive no longer holds pre-S1 bytes.shadow::tests::snapshot_stays_fresh_across_disjoint_in_flight_submissionsis your S1/S2/S3 scenario.read_into, so a title write during the read gets a later stamp and is recopied.Host::execute_gatedarms the gate inside the submission lock right beforeExecuteCommandLists, gated tests share aGATE_LOCK, theGateguard always signals on drop, and nothing a gated test does beforerelease()takessubmitted.list.running()).writing = truealso waits for in-flight GPU reads: agreed, that is conservative. It costs a wait but can't be wrong, so I'd like to narrow it in a follow-up rather than here.DynamicLeasematched by heap address: fixed. Heaps get a monotonic id (NEXT_HEAP_ID),SHADER_HEAPSrecords it, andrelease_dynamicmatches by id, so a heap replaced at the same address isn't touched.New in the rebase (
e6694e4): upstream now gives view heaps 2^18 dynamic slots where the host allows it, so the lease test now leases every 2^16 run until none is left, rather than assuming one run fills the heap.Verified:
cargo clippy -p victory-gpu --all-targets -D warnings,cargo clippy -p victory --features diagnostics --all-targets -D warnings,cargo test -p victory-gpu(57 passed, 0 failed, 1 ignored, run in parallel with no hang) andcargo xtask policy.AI-assisted (Claude Code); checked on Windows 11 / RTX 5090.
@wbkepler on GitHub · 2026-11-24 20:54 UTC · original
Pushed
7465030, which fixes the repeated-list prelude hazard on the async path. Credit to @ESAT586: #1414 has the analysis of the bug onmain. When the sameHostListappears twice in oneHost::execute, the second prelude recording resets the allocator and list that the first, not yet executed, prelude still uses.#1414 fixes
main's synchronous loop with a fence wait between duplicate-free chunks. That CPU wait would undo the async design here, so #595 handles it differently:SPARE_PRELUDESpool (fresh_prelude). ThePendingsubmission keeps that spare.complete()resets it and returns it to the pool once the fence has passed. Each run gets its own barriers (real → start for the first, end → start for the repeat).ExecuteCommandLists: the repeat starts a newExecuteCommandListscall on the same queue, so queue order serializes the two runs. There is no CPU wait.executestill settles only that list's ownlastfence value, and a list reset while running swaps in a fresh prelude throughRetired. There is still no global wait per submission.a_list_named_twice_in_a_submission_has_two_preludessubmits[&list, &list]behind a gate fence (execute_gated) so it stays in flight. It checks that the pending submission holds exactly one spare prelude. After draining, it checks that the texture ends inCOPY_SOURCEand that the device was not removed.Gate:
cargo clippy -p victory-gpu --all-targets -D warnings,cargo clippy -p victory --features diagnostics --all-targets -D warnings,cargo test -p victory-gpu(58 passed) andcargo xtask policyall pass.AI-assisted (Claude Code); checked on Windows 11 / RTX 5090.
@Jitheswar on GitHub · 2026-11-24 22:04 UTC · original
A review of
7465030against what the title's submission thread does (traced in #1118, comment), plus a few correctness points. File:line refers to7465030.Why it matters for the Prestream watchdog (#1118). The title submits from one thread (
+0x2481e90). For each batch it callsExecuteX, thenPresentX, thenSignal, and only then gives ring slots back to the producers that main waits on. Onmain,ExecuteXblocks until the GPU finishes. With this PR it doesn't, but:Host::presentcallsself.drain()right afterPresent(host.rs:2246), so the same thread now waits for the whole frame's GPU work insidePresentX. The comment there anticipates relaxing this "once titles are known to wait for their fences instead". This title does: it signals its fences (queue slot 16) from that thread and polls them.IN_FLIGHT = 16(host.rs:511,757-761),ExecuteXsettles the oldest submission on the title's thread. World frames make far more than 16 submissions, so a slow one still blocks that thread.So the stall moves from
ExecuteXtoPresentX. Letting one frame run on (waiting at present for frame N-1, not N), and keeping the cap's wait off the title's thread, would let this PR address #1118.Correctness points:
timeline.rs:169-200(refresh_conflict) checkslabelsandshadersbut notreads. A later submission'sStep::Refreshcan rewrite a host copy (Shadow::update,shadow.rs:284-316) while an in-flight submission's GPU work still reads it.host.rs:925-935(wait_gpu) ignores theWaitForSingleObjectresult. OnWAIT_FAILED,settlereturns withoutcopy_back, and the title reads stale memory.host.rs:1010-1012,fence.rs:88-134: bottom-of-pipe writes store the fence value with a non-atomicwrite_unaligned, which races CPU polls, and they don't wakeSetEventOnCompletionwaiters (onlyFence::Signaldoes). #32 covers the same wake; a merged fix would need one of the two.fence.rs:88-110: a null-eventSetEventOnCompletiondrains once and then returnsE_NOTIMPLif the value is still short (for example, waiting for a later CPU signal).Tests: on an RTX 3050 6 GB (Linux, Proton 11, vkd3d-proton) with a real device,
victory-gpugives 56 passed / 2 failed on this PR and 48 / 2 onffe310e, with the same two failures. So there are no regressions, and the async host tests do run there. They don't under plain wine (no device: they return early). The PR now conflicts with70564aeindescriptor.rs,draw.rs,host.rs,lib.rs,shadow.rsandtexture.rs.Would a rebase onto
70564aethat includes the one-frame present and an off-thread cap help? We can open it as a PR against your branch.AI-assisted review (Claude Code, Codex, Antigravity). No game data.
@aycow on GitHub · 2026-11-24 22:09 UTC · original
The held-fence reader control in our earlier integration independently reproduced the refresh-conflict issue on 7465030: an earlier queued read of 11 saw the later CPU refresh to 29 until the reader was protected. The historical census composition 6e79490 also checks reset/replay and counts repeated recordings with ambiguous timestamp spans suppressed. With the current renderer conflicts and the rebase offered here, I will keep #509 independently mergeable and use those controls against a new submission integration when available. The checks should use actual fence completion before mapping old readback.
AI-assisted using Codex.
@wbkepler on GitHub · 2026-11-24 22:10 UTC · original
Rebased onto
70564aeas one commit,dfac3b4. Upstream still waits for every submission on the CPU, so the timeline design still applies.Conflicts that needed more than a merge
Deferred::afterandmissedclosures now run when a submission completes. They are stored asArcs so they stay valid if the list is reset.missedis still checked per run, and a range goes back only if no run that declared it read uncopied memory; otherwise it is kept withkeep_writes.Shadow::submission_done), because several submissions can share one snapshot.stale()now asks the newTrackedchange set (Tracked::any_changed).upload_changed): title-memory read and staging rewrite;Step::HeapandStep::Memoryrefreshes, which are also recorded as reads;release_retired()after each submission.keep_dynamic. This includes slots on our own memory heap (memory::OURS_ID).Repeated list in one submission: upload memory and budget
A second occurrence's steps no longer write into the list's own memory (Fill destinations, scratch written by host steps, the budget word). The bytes go into an upload buffer that belongs to the pending submission, and the repeat's prelude copies them in with
CopyBufferRegion. That copy runs in queue order after the first run, so there is no CPU wait. List upload and scratch memory now lives in a CPU-visible custom heap (write-combine, L0,COMMON) so the GPU can copy into it.defer_hostnow also declares the list memory it writes.New test
a_repeated_list_reads_its_own_upload_memory: a list, then a list whose step changes the uploaded title word, then the first list again. The GPU sees the first value between the two runs and the second value after the repeat. A list in two in-flight submissions was already waited for inexecute.Verification
cargo clippy(victory-gpu, and victory withdiagnostics) passes with-D warnings.cargo test -p victory-gpu: 85 passed. Two tests fail identically on plainupstream/mainon this host because the view heap here is smaller than they assume:dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views.cargo xtask policypasses.AI-assisted (Claude Code); checked on Windows 11 / RTX 5090.
@aycow on GitHub · 2026-11-24 22:30 UTC · original · edited 2026-11-24 22:52 UTC
@wbkepler I independently checked the current-main rebase
dfac3b4on local AMD Radeon Graphics32.0.22042.1and WARP. With the census disabled,host::submissions::a_repeated_list_reads_its_own_upload_memoryreproducibly returns[0, 0x22222222]on AMD, where the expected first word is0x11111111. WARP returns both expected words. The result is the same on standalone #595 and a local #509 composition, with the same standalone startup-probe correction. The composition’s census-specific 100 ms held-fence, reset/resubmit and repeated-recording attribution tests separately pass on AMD and WARP with full GBV and keep the same native submission counts.AI-assisted using Codex.
Follow-up on the AMD replay reproduction. With native inbox D3D12, the failure persisted with standard readback, independent outputs, an explicit source transition, and a held fence. Omitting replay passed. Waiting for confirmed native fence completion immediately before a group reuses the command-list recording restored both words. Local
af0acb0keeps ordinary submissions and the final group asynchronous, polls when the event does not confirm completion, and treats device removal as failure. All six submission tests passed on AMD and WARP. Agility 1.620.2 full GBV accepted the original and corrected held replay, so the observable wrong result is specific to the inbox AMD comparison. D3D12 recording reuse contract@Jitheswar on GitHub · 2026-11-24 23:01 UTC · original
Thanks for the rebase. The present point from my review is now a one-commit PR against
gpu/async-submissionson top ofdfac3b4: https://github.com/wbkepler/VIctory/pull/5. A present waits for the previous frame's submissions, the copy list keeps the presented texture, and the black-frame probe is read one present later. It includes a gated synthetic test and was checked on an RTX 3050 with a real device (same 10 failures as plain70564ae; per-frame GPU wait on the title's thread ~2-3 ms → <0.5 ms in the menus). Therefresh_conflictreads hole (which @aycow also reproduced) is not in it. AI-assisted (Claude Code).@Marvisak on GitHub · 2026-11-25 00:29 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-gpu/src/descriptor.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
@slatefield on GitHub · 2026-11-25 01:03 UTC · original
Rebased this onto current
main(4118f33) since it has the needs-rebase label: the commit kept with your authorship and message, five conflict regions resolved (the inlinedshader_slotindescriptor.rs, the scratch-chunk shape and spare pool inhost.rs,update_busybesidestale/submission_doneinshadow.rs), main's added tests adapted tohost.drain(). One design call: scratch stays on yourlist_buffer(L0 custom heap) rather than main'supload_buffer, since a repeated list's prelude copies into it and an upload-heap resource cannot be a copy destination. Windows-target clippy clean both feature sets, native tests green,timeline.rscompiled and its tests pass natively.It is open as #1923 so the maintainer can take a ready branch. If you would rather update this PR yourself, reset
gpu/async-submissionsto4f1228c1fd62cb9836927d262d7049b7b3e889eeand I will close mine.Two things from the review thread I carried into #1923's description rather than fixing here:
refresh_conflictignoring in-flight GPU reads, and the AMD inboxa_repeated_list_reads_its_own_upload_memoryfailure. Also worth pairing this with #32 (ID3D12CommandQueue::Waitis a no-op onmain, and the synchronous wait is what hides it today).View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.