Repository navigation
Conversation
…S5_PIPELINED_DRAWS) With APS5_PIPELINED_DRAWS=1, queue 0's worker decodes, captures and recompiles a draw and hands it to a committer thread that records it (Graphics::Draw under the GPU lock), so the two run in parallel instead of one after the other. Work the committer has not reached yet is tracked by the guest ranges it will write; a later packet that reads or writes them, or one the pipeline cannot order, drains it. Ordered as commit items instead of drains: - labels (WRITE_DATA, RELEASE_MEM) and same-queue waits on them; APS5_PIPELINE_DRAIN_LABELS=1 drains; - the end of a queue-0 submission and a released REWIND tail; APS5_PIPELINE_DRAIN_SUBMISSIONS=1 drains; - the title's buffer fill kernels; APS5_PIPELINE_DRAIN_FILLS=1 drains; - DMA_DATA immediates and copies (APS5_PIPELINE_DMA=1). A draw's write ranges include the storage images it writes and its exact color and depth target ranges (APS5_EXACT_DRAW_WRITES=1), not estimates. Draw-path costs the pipeline exposed: - ShaderMemory moves, so a commit owns its capture's pages; - a submission made before the worker's current collect epoch began keeps the epoch, so a worker behind a queue of submissions walks a surface once per catch-up (APS5_SUBMISSION_EPOCH_EACH=1 bumps at every submission); a thread remembers the ranges it walked for the whole epoch; - the pipeline signals only threads that wait; the pending-image and unit-shadow registries take a spinning slim lock instead of std::mutex (winpthreads contention was kernel events); ScanPending skips the registry walk when no pending image can overlap; - fewer heap allocations per recorded draw (reused descriptor sets and scratch vectors, buffer pool size classes kept). GTA V Performance mode, prologue bank interior, RTX 5080: 11.7 -> about 20 fps together with the cheaper captures below it. Off by default here; the follow-up turns it on. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-Authored-By: Gjon Gojcevic <7807870+gjonn@users.noreply.github.com>
DrawWriteRanges decoded every written storage image element, and DecodeTextureResource refuses a zero base address, so a draw with a null storage image bound failed (PPSA01317) instead of skipping it. The element is now skipped by the binder's own null rule (base address words zero) before it is decoded. agc_driver_draw_write_ranges binds a null image next to a written one. Co-Authored-By: Gjon Gojcevic <7807870+gjonn@users.noreply.github.com> Co-Authored-By: SleglJan <90033145+SleglJan@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The pipelined label path treated every nonzero RELEASE_MEM INT_SEL as an end-of-pipe interrupt;
main's PacketMemory excludes 3 (send data after write confirm). agc_driver failed on it with
APS5_PIPELINED_DRAWS=1 ("release with INT_SEL send data after write confirm raised an interrupt").
Co-Authored-By: TheAggie <67454+TheAggie@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
Closing as a duplicate of #1201: Also: this PR conflicts with If you have a fix or measurement for the pipelined path, please post it on #1201 (or as a branch there), and feel free to reopen with a distinct change. |
|
The fixes from this review (BufferPool, stage lifetimes, ReportFailure, CMASK, fill drains, pipelined test variants) are now on #1201, rebased on main without #1191: #1201 (comment). #6208 can build on #1201. |
What
Queue 0 can decode and capture a draw on the packet worker while a committer thread records it. Work the committer has not reached is tracked by the guest ranges it will write; a later packet that reads or writes them, or one the pipeline cannot order, drains it.
Off unless
APS5_PIPELINED_DRAWSis set. Labels, the end of a queue-0 submission, and buffer fills stay ordered as commit items (APS5_PIPELINE_DRAIN_LABELS,APS5_PIPELINE_DRAIN_SUBMISSIONS,APS5_PIPELINE_DRAIN_FILLSdrain them instead). A null storage image in a draw's written set writes nothing, and a pipelined release withINT_SEL3 raises no interrupt.Rebased onto current
main. UpstreamShaderMemoryalready moves, so this does not add a separate move constructor. Descriptor-set recycling forwards the update-after-bind and variable-count argumentsAllocatetakes here.Tested
The pipeline behavior is what the fork runs. Hello Neighbor 2 title and gameplay were exercised on this machine with pipelined draws enabled. This rebase onto current
mainwas not run as its own title session.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)