perf(agc): pipeline queue-0 draw commits behind the packet worker #6203

Closed
ivica00 wants to merge 0 commits from upstream-pr/6203 into main
ivica00 commented 2026-10-15 02:52:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ivica00 on 2026-10-15T02:52:58Z.


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_DRAWS is 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_FILLS drain them instead). A null storage image in a draw's written set writes nothing, and a pipelined release with INT_SEL 3 raises no interrupt.

Rebased onto current main. Upstream ShaderMemory already moves, so this does not add a separate move constructor. Descriptor-set recycling forwards the update-after-bind and variable-count arguments Allocate takes 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 main was not run as its own title session.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 9070 XT, Adrenalin 32.0.32015.2008, Windows 10 (fork build with this pipeline; this rebase was not run separately)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4867494499 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6203). Originally posted by [ivica00](https://github.com/ivica00) on 2026-10-15T02:52:58Z. --- ### 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_DRAWS` is 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_FILLS` drain them instead). A null storage image in a draw's written set writes nothing, and a pipelined release with `INT_SEL` 3 raises no interrupt. Rebased onto current `main`. Upstream `ShaderMemory` already moves, so this does not add a separate move constructor. Descriptor-set recycling forwards the update-after-bind and variable-count arguments `Allocate` takes 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 `main` was not run as its own title session. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 9070 XT, Adrenalin 32.0.32015.2008, Windows 10 (fork build with this pipeline; this rebase was not run separately) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-15 03:31:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T03:31:40Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
#1201 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp
core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp
#1202 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp
core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp
#1747 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp
core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp
#1896 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp
core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp
#5867 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp
core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6183764398 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6203#issuecomment-6183764398). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T03:31:40Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1201 | | | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp` | | #1202 | | | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp` | | #1747 | | | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp` | | #1896 | | | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp` | | #5867 | | | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Memory/DrawWriteRanges.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/SlimMutex.hpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/DrawWriteRanges.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/PipelinedDma.cpp` |
adriadam10 commented 2026-10-15 09:23:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T09:23:30Z.


Closing as a duplicate of #1201: DrawPipeline.cpp, DrawPipeline.hpp and DrawWriteRanges.hpp here are byte-identical to #1201's head, and the commits are its authors' (Michon, gjonn, TheAggie). #1201 is still open and has an active review thread (ordering fixes from @Raghav314 and @eliyarson, A/B data on several titles), so a second copy of the same change would only split that discussion and conflict with it.

Also: this PR conflicts with main, declares Depends on: none while sitting on top of #1201, #1202, #1747, #1896 and #5867, and the body says the rebase was not run on any title.

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6188819731 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6203#issuecomment-6188819731). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-15T09:23:30Z. --- Closing as a duplicate of #1201: `DrawPipeline.cpp`, `DrawPipeline.hpp` and `DrawWriteRanges.hpp` here are byte-identical to #1201's head, and the commits are its authors' (Michon, gjonn, TheAggie). #1201 is still open and has an active review thread (ordering fixes from @Raghav314 and @eliyarson, A/B data on several titles), so a second copy of the same change would only split that discussion and conflict with it. Also: this PR conflicts with `main`, declares `Depends on: none` while sitting on top of #1201, #1202, #1747, #1896 and #5867, and the body says the rebase was not run on any title. 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.
adriadam10 commented 2026-10-15 09:40:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T09:40:44Z.


The fixes from this review (BufferPool, stage lifetimes, ReportFailure, CMASK, fill drains, pipelined test variants) are now on #1201, rebased on main without #1191: https://github.com/boykopovar/AnyPS5/pull/1201#issuecomment-6189118381. #6208 can build on #1201.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6189120062 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6203#issuecomment-6189120062). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-15T09:40:44Z. --- The fixes from this review (BufferPool, stage lifetimes, ReportFailure, CMASK, fill drains, pipelined test variants) are now on #1201, rebased on main without #1191: https://github.com/boykopovar/AnyPS5/pull/1201#issuecomment-6189118381. #6208 can build on #1201.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!6203
No description provided.