startup: compute input snapshots are taken before the dispatch's outputs are validated, so refused dispatches use the snapshot pool #3481
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#3481
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Leyukaka on GitHub · 2026-11-29 16:54 UTC · original
Part of #870.
In the translated compute dispatch, one loop resolves the inputs and then the outputs (
src/startup_stubs/d3d12_compute_dispatch.inl:831onmainc4b8a41b; inputs come first inviews).indirect_table_bufferis called at:1029-1030. For an input that lives only in guest memory it copies the range into the 128 MiB snapshot pool at that point (src/startup_stubs/d3d12_draw.inl:2692-2702), andcompute_inputs_snapshotis incremented atd3d12_compute_dispatch.inl:1046-1048.:734), the copied-object UAV switch (:754), "an output buffer is also an input" (:1103,:1189) and zero records (:1172).A dispatch refused on an output has already reserved pool space for its inputs. That space is reused only once the recording's chunks complete.
One local run of the application (about 1,430 s, counts only):
Not measured: how much of the pool the refused dispatches used. The pool has no counters (see the diagnostics issue).
Change: resolve snapshot inputs as pending (address, bytes) and copy them after the output checks pass; count
compute_inputs_snapshotonly for recorded dispatches.I'm working on this.