perf(agc): share one render pass between mesh-path draws run as compute #15548

Open
Gonic0 wants to merge 30 commits from upstream-pr/15548 into main
Gonic0 commented 2026-11-03 18:37:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gonic0 on 2026-11-03T18:37:48Z.


What

Stacked on #17611, which supersedes #9356. This branch is #17611's current head 70015a5ccf and this pull request's commit e17b4986d1. That commit is the previous head's 91d892a10b cherry-picked onto 70015a5ccf without conflicts and without changes. It adds no request serialization or shader disk cache version of its own; it uses #17611's shader disk cache format 78. The conflicts with main are #17611's: #17611 alone conflicts with main in the same files, and this commit applies cleanly on top of it.

Builds on #17611. A mesh-path draw run as a compute pass forces its own render pass today, because its dispatch must be recorded outside one. Consecutive mesh-path draws into the same attachments therefore cost a pass each, and on a tile-based GPU each pass loads and stores the attachments again.

With this change, the recorder splits the batch when a mesh-path draw begins a pass: the work before the pass, a prologue command buffer, and the pass. The draw records its dispatch into the prologue. A later mesh-path draw that continues the pass under the existing hazard check (PassHazards::Check) records its dispatch into the same prologue and its draw into the open pass. The three command buffers are submitted together, in order, in the batch's one vkQueueSubmit.

  • The prologue starts with a barrier from ALL_COMMANDS memory writes to COMPUTE_SHADER, DRAW_INDIRECT and TRANSFER reads and writes, so its dispatches see everything recorded before the pass. Each dispatch keeps its own trailing barrier to DRAW_INDIRECT and VERTEX_SHADER, which orders it before the draws in the pass.
  • A dispatch moved ahead of earlier draws in the pass reads only what the hazard check already proved those draws do not write. Its writes go to the draw's own fresh output buffer.
  • Occlusion counting in segment mode keeps working: each segment query begins and ends inside the pass command buffer. With one query per batch (not segment mode), or for an indirect, captured or GPU-indirect mesh-path draw, the draw still breaks the pass as before. So does a mesh-path draw that reads a tessellation capture, has staged clears or uses the pixel function LDS: main records the work its dispatch depends on into the pass command buffer, which runs after the prologue.
  • DrawPassStart carries main's pass break reason next to the prologue. A draw that closes an open pass to start a prologue reports forced.
  • A pass that a non-mesh draw opened has no prologue, so a mesh-path draw after it begins a new pass, as before.

Tested

macOS 27.3, Apple M5 Pro, Apple clang, x86-64 Release under Rosetta 2. #17611's head does not build on macOS without #16591, #16593, #17532, #17767 and #17425, so both trees below are 70015a5ccf with those five applied on a separate test branch that is not part of this pull request. Seven test targets outside the mesh path still fail to compile on macOS on that tree (agc_driver_table_index_validation, guest_ces_gbsetters, guest_ces_gbsetters_module, nkwebkit_resourcerequest, guest_webrtc_key_params, guest_webrtc_rtcp_transport_feedback, guest_exception_fault), the same with and without this commit.

ctest --test-dir build -R '^(request_serializer|shader_cache_file_read|agc_shader_memory|agc_mesh_output_budget|agc_driver_(graphics|layered_[a-z_]+|mesh[a-z_]*|pass_break_reasons|pass_input_hazard))$' -V on MoltenVK from Vulkan SDK 1.4.363.0, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer and APS5_NO_MESH_SHADER=1:

#17611 70015a5ccf this pull request e17b4986d1
tests 21: 13 pass, 8 skip 22: 14 pass, 8 skip
agc_driver_mesh_compute_shared_pass not present passes ("Consecutive mesh-path draws run as compute shared one render pass")
loader inserted VK_LAYER_KHRONOS_validation in every Vulkan test in every Vulkan test
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- messages 0 0

The eight skipped tests need VK_EXT_mesh_shader, which MoltenVK does not expose. KosmicKrisp and Linux and Windows were not run on this head. tools/check_conventions.py passes.

Performance: the measurement below is from an earlier head (f49a25ae9f plus 3a3880e952, on main 4f41f4c375 with the macOS port pull requests) and was not repeated on this one, so the tools/trace_digest.py summaries of main and of this change from one machine and scene are still missing. PPSA21564 on KosmicKrisp (no VK_EXT_mesh_shader), APS5_PROFILE_GPU=1. Three rounds of 140 s runs, alternating base and this change. Only the heavy windows count: the 10 s windows with more than 3000 mesh-path draws, about 75 per present.

round 1 round 2 round 3
presents per window, base 62.1 86.0 81.7
presents per window, this change 89.6 94.0 94.8
draw class GPU time per present, base 70.5 ms 62.1 ms 65.2 ms
draw class GPU time per present, this change 50.7 ms 47.1 ms 48.6 ms
render passes per window, base 6847 8800 8553
render passes per window, this change 3840 3558 3733

On average, 21 % more presents and 26 % less draw GPU time in those windows. This head adds the captured, staged clear and pixel function LDS exclusions above; how many of PPSA21564's mesh-path draws they cover was not measured. Frames dumped in the same scene showed no missing or broken geometry. That the saving comes from attachment loads and stores of the merged passes is inferred from the tile-based design, not measured on its own.

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 (none added)
  • Generic behaviour, not specific to one title
  • Depends on: #17611
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Apple M5 Pro, MoltenVK from Vulkan SDK 1.4.363.0, macOS 27.3 (KosmicKrisp not run on this head)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5142603454 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15548). Originally posted by [Gonic0](https://github.com/Gonic0) on 2026-11-03T18:37:48Z. --- ### What Stacked on #17611, which supersedes #9356. This branch is #17611's current head `70015a5ccf` and this pull request's commit `e17b4986d1`. That commit is the previous head's `91d892a10b` cherry-picked onto `70015a5ccf` without conflicts and without changes. It adds no request serialization or shader disk cache version of its own; it uses #17611's shader disk cache format 78. The conflicts with `main` are #17611's: #17611 alone conflicts with `main` in the same files, and this commit applies cleanly on top of it. Builds on #17611. A mesh-path draw run as a compute pass forces its own render pass today, because its dispatch must be recorded outside one. Consecutive mesh-path draws into the same attachments therefore cost a pass each, and on a tile-based GPU each pass loads and stores the attachments again. With this change, the recorder splits the batch when a mesh-path draw begins a pass: the work before the pass, a prologue command buffer, and the pass. The draw records its dispatch into the prologue. A later mesh-path draw that continues the pass under the existing hazard check (`PassHazards::Check`) records its dispatch into the same prologue and its draw into the open pass. The three command buffers are submitted together, in order, in the batch's one `vkQueueSubmit`. - The prologue starts with a barrier from `ALL_COMMANDS` memory writes to `COMPUTE_SHADER`, `DRAW_INDIRECT` and `TRANSFER` reads and writes, so its dispatches see everything recorded before the pass. Each dispatch keeps its own trailing barrier to `DRAW_INDIRECT` and `VERTEX_SHADER`, which orders it before the draws in the pass. - A dispatch moved ahead of earlier draws in the pass reads only what the hazard check already proved those draws do not write. Its writes go to the draw's own fresh output buffer. - Occlusion counting in segment mode keeps working: each segment query begins and ends inside the pass command buffer. With one query per batch (not segment mode), or for an indirect, captured or GPU-indirect mesh-path draw, the draw still breaks the pass as before. So does a mesh-path draw that reads a tessellation capture, has staged clears or uses the pixel function LDS: `main` records the work its dispatch depends on into the pass command buffer, which runs after the prologue. - `DrawPassStart` carries `main`'s pass break reason next to the prologue. A draw that closes an open pass to start a prologue reports `forced`. - A pass that a non-mesh draw opened has no prologue, so a mesh-path draw after it begins a new pass, as before. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> macOS 27.3, Apple M5 Pro, Apple clang, x86-64 Release under Rosetta 2. #17611's head does not build on macOS without #16591, #16593, #17532, #17767 and #17425, so both trees below are `70015a5ccf` with those five applied on a separate test branch that is not part of this pull request. Seven test targets outside the mesh path still fail to compile on macOS on that tree (`agc_driver_table_index_validation`, `guest_ces_gbsetters`, `guest_ces_gbsetters_module`, `nkwebkit_resourcerequest`, `guest_webrtc_key_params`, `guest_webrtc_rtcp_transport_feedback`, `guest_exception_fault`), the same with and without this commit. `ctest --test-dir build -R '^(request_serializer|shader_cache_file_read|agc_shader_memory|agc_mesh_output_budget|agc_driver_(graphics|layered_[a-z_]+|mesh[a-z_]*|pass_break_reasons|pass_input_hazard))$' -V` on MoltenVK from Vulkan SDK 1.4.363.0, with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer` and `APS5_NO_MESH_SHADER=1`: | | #17611 `70015a5ccf` | this pull request `e17b4986d1` | |---|---|---| | tests | 21: 13 pass, 8 skip | 22: 14 pass, 8 skip | | `agc_driver_mesh_compute_shared_pass` | not present | passes ("Consecutive mesh-path draws run as compute shared one render pass") | | loader inserted `VK_LAYER_KHRONOS_validation` | in every Vulkan test | in every Vulkan test | | `was not found but was requested by env var VK_INSTANCE_LAYERS` | 0 | 0 | | `VUID-` messages | 0 | 0 | The eight skipped tests need `VK_EXT_mesh_shader`, which MoltenVK does not expose. KosmicKrisp and Linux and Windows were not run on this head. `tools/check_conventions.py` passes. Performance: the measurement below is from an earlier head (`f49a25ae9f` plus `3a3880e952`, on `main` `4f41f4c375` with the macOS port pull requests) and was not repeated on this one, so the `tools/trace_digest.py` summaries of `main` and of this change from one machine and scene are still missing. PPSA21564 on KosmicKrisp (no `VK_EXT_mesh_shader`), `APS5_PROFILE_GPU=1`. Three rounds of 140 s runs, alternating base and this change. Only the heavy windows count: the 10 s windows with more than 3000 mesh-path draws, about 75 per present. | | round 1 | round 2 | round 3 | |---|---|---|---| | presents per window, base | 62.1 | 86.0 | 81.7 | | presents per window, this change | 89.6 | 94.0 | 94.8 | | `draw` class GPU time per present, base | 70.5 ms | 62.1 ms | 65.2 ms | | `draw` class GPU time per present, this change | 50.7 ms | 47.1 ms | 48.6 ms | | render passes per window, base | 6847 | 8800 | 8553 | | render passes per window, this change | 3840 | 3558 | 3733 | On average, 21 % more presents and 26 % less `draw` GPU time in those windows. This head adds the captured, staged clear and pixel function LDS exclusions above; how many of PPSA21564's mesh-path draws they cover was not measured. Frames dumped in the same scene showed no missing or broken geometry. That the saving comes from attachment loads and stores of the merged passes is inferred from the tile-based design, not measured on its own. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/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 (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: #17611 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: Apple M5 Pro, MoltenVK from Vulkan SDK 1.4.363.0, macOS 27.3 (KosmicKrisp not run on this head) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-21 05:21:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:21:13Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: fix the CPU-resolved indirect mesh-compute records so each draw uses its own arguments and output buffer.

What I ran

Reviewed head 91d892a10bb3c58cb6c98d72c7d52ad3e710a860 using repo_read.py against the prepared diff; no build or tests were run by me. Read the description, commits, diff, manifest, and changed source files relevant to mesh argument resolution and draw recording. The full text of VulkanDevice.cpp, Graphics.cpp, and ShaderMemory.cpp was excluded from the review folder; I read targeted ranges of the first two through the reader. No ruling file was read, as instructed.

Results

Check Result Note
Diff and manifest review passed Prepared head matches the stated SHA
Targeted code review failed Indirect mesh-compute records share one argument and output buffer
Build and tests not run Author-reported runs are summarized in the description

Findings

Blocking

  • core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:4017: For indirect draws that cannot use the GPU path, recordPreparedDraw passes args != nullptr to recordMeshCompute, which CPU-resolves the first record into draw; however, the draw loop can contain multiple resolved records. The function then dispatches and draws using the same meshArguments and meshOutput for every record, and writes argumentBuffer to that shared output. This causes every fallback record to reuse the first record's mesh arguments and overwrite/read the same output allocation. Create per-record arguments and output, or otherwise batch and dispatch each resolved record with its own data.

Non-blocking

None.

Not verified

  • No build or test command was run, so the author-reported test results were not independently confirmed.
  • Full files excluded by the prepared folder: core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp, and core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp. Targeted relevant ranges of VulkanDevice.cpp and Graphics.cpp were read through repo_read.py; ShaderMemory.cpp was not read.
  • Hardware behavior, including native mesh-shader execution, was not verified.

To get this to a good state

  • Fix per-record argument and output handling for CPU-resolved indirect mesh-compute draws, then rerun the relevant graphics and mesh execution tests on the new head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:6003072596 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15548#pullrequestreview-6003072596). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T05:21:13Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: fix the CPU-resolved indirect mesh-compute records so each draw uses its own arguments and output buffer. ## What I ran Reviewed head `91d892a10bb3c58cb6c98d72c7d52ad3e710a860` using `repo_read.py` against the prepared diff; no build or tests were run by me. Read the description, commits, diff, manifest, and changed source files relevant to mesh argument resolution and draw recording. The full text of `VulkanDevice.cpp`, `Graphics.cpp`, and `ShaderMemory.cpp` was excluded from the review folder; I read targeted ranges of the first two through the reader. No ruling file was read, as instructed. ## Results | Check | Result | Note | |---|---|---| | Diff and manifest review | passed | Prepared head matches the stated SHA | | Targeted code review | failed | Indirect mesh-compute records share one argument and output buffer | | Build and tests | not run | Author-reported runs are summarized in the description | ## Findings ### Blocking - `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:4017`: For indirect draws that cannot use the GPU path, `recordPreparedDraw` passes `args != nullptr` to `recordMeshCompute`, which CPU-resolves the first record into `draw`; however, the draw loop can contain multiple resolved records. The function then dispatches and draws using the same `meshArguments` and `meshOutput` for every record, and writes `argumentBuffer` to that shared output. This causes every fallback record to reuse the first record's mesh arguments and overwrite/read the same output allocation. Create per-record arguments and output, or otherwise batch and dispatch each resolved record with its own data. ### Non-blocking None. ## Not verified - No build or test command was run, so the author-reported test results were not independently confirmed. - Full files excluded by the prepared folder: `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`, `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`, and `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`. Targeted relevant ranges of `VulkanDevice.cpp` and `Graphics.cpp` were read through `repo_read.py`; `ShaderMemory.cpp` was not read. - Hardware behavior, including native mesh-shader execution, was not verified. ## To get this to a good state - Fix per-record argument and output handling for CPU-resolved indirect mesh-compute draws, then rerun the relevant graphics and mesh execution tests on the new head.
MarcZX10 commented 2026-11-21 14:00:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T14:00:27Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: implement the documented layer-limit fallback in the compute-path decision so oversized layered draws use compute instead of exceeding native mesh output limits.

What I ran

Reviewed head e17b4986d1f0f395041f4ecc374363a4f2d2699d using the prepared diff and repo_read.py reader. No build or tests were run. The description reports a macOS/MoltenVK test run, but that is author-reported and used a separate test branch with additional commits. No merged-preview check was run.

Results

Check Result Note
Patch and source review failed Layer-limit fallback decision is incomplete
Build and tests not run No local execution
Author-reported checks not run Reported on a different test branch

Findings

Blocking

  • The change claims that mesh draws exceeding the device’s mesh output layer limit use the compute fallback, but the actual selection predicate ignores maxMeshOutputLayers: MeshDrawRunsAsCompute(bool meshShader, std::uint32_t, ...) only returns true when mesh shaders are unavailable (Draw.cpp:1297-1298). Its context overload delegates to that predicate, so on mesh-capable devices these layered draws stay on the native mesh path (Draw.cpp:1301-1303). The maxMeshOutputLayers argument is also discarded in the compile-time predicate, leaving shader compilation on the native path (DrawCapture.cpp:80-82). Implement the layer-count condition consistently for compilation and draw-time selection; otherwise layered draws beyond the device limit can fail instead of using the advertised fallback.

Non-blocking

None.

Not verified

No build or tests were run. The author reports testing on a separate branch with five additional commits; those checks do not establish results for this exact head. KosmicKrisp, Linux, Windows, and console behavior were not verified. The earlier performance measurement was from a previous head, and the description says current-head trace summaries are missing. files.json reports two changed source files excluded from the folder for size; their relevant ranges were read through repo_read.py. Other excluded and unchanged files were not read.

To get this to a good state

Implement and test the mesh output layer-limit decision for both shader compilation and draw-time path selection, including a layered draw beyond the device limit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6005740713 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15548#pullrequestreview-6005740713). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T14:00:27Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: implement the documented layer-limit fallback in the compute-path decision so oversized layered draws use compute instead of exceeding native mesh output limits. ## What I ran Reviewed head `e17b4986d1f0f395041f4ecc374363a4f2d2699d` using the prepared diff and `repo_read.py` reader. No build or tests were run. The description reports a macOS/MoltenVK test run, but that is author-reported and used a separate test branch with additional commits. No merged-preview check was run. ## Results | Check | Result | Note | |---|---|---| | Patch and source review | failed | Layer-limit fallback decision is incomplete | | Build and tests | not run | No local execution | | Author-reported checks | not run | Reported on a different test branch | ## Findings ### Blocking - The change claims that mesh draws exceeding the device’s mesh output layer limit use the compute fallback, but the actual selection predicate ignores `maxMeshOutputLayers`: `MeshDrawRunsAsCompute(bool meshShader, std::uint32_t, ...)` only returns true when mesh shaders are unavailable (`Draw.cpp:1297-1298`). Its context overload delegates to that predicate, so on mesh-capable devices these layered draws stay on the native mesh path (`Draw.cpp:1301-1303`). The `maxMeshOutputLayers` argument is also discarded in the compile-time predicate, leaving shader compilation on the native path (`DrawCapture.cpp:80-82`). Implement the layer-count condition consistently for compilation and draw-time selection; otherwise layered draws beyond the device limit can fail instead of using the advertised fallback. ### Non-blocking None. ## Not verified No build or tests were run. The author reports testing on a separate branch with five additional commits; those checks do not establish results for this exact head. KosmicKrisp, Linux, Windows, and console behavior were not verified. The earlier performance measurement was from a previous head, and the description says current-head trace summaries are missing. `files.json` reports two changed source files excluded from the folder for size; their relevant ranges were read through `repo_read.py`. Other excluded and unchanged files were not read. ## To get this to a good state Implement and test the mesh output layer-limit decision for both shader compilation and draw-time path selection, including a layered draw beyond the device limit.
MarcZX10 commented 2026-11-22 07:12:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T07:12:56Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: remove the conflict marker from .gitignore and correct the malformed README diff artifact.

What I ran

Reviewed head 3964c5914c7117eddad2e3f80ad7ef845b843e97 using repo_read.py review-folder and pinned-head readers. No build or tests were run.

Results

Check Result Note
Diff and manifest review passed Changed files and hunks inspected
Build and tests not run Relied on the author’s reported runs

Findings

Blocking

  • .gitignore:126 adds the literal merge-conflict marker >>>>>>> origin/main. This is an accidental repository artifact and should be removed.

Non-blocking

  • The review diff includes a malformed added line in docs/README.md (+ - [DB_RENDER_CONTROL ...), while the surrounding change adds debt entries. Verify and fix the source formatting if this line is present at the head.

Not verified

The code changes appear broadly consistent with the described compute fallback and shared-pass flow, but no build or tests were run here. Three changed files were excluded from full-text review by the review-folder size rule: core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp, core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp, and docs/dev/debt/shader.md. Relevant VulkanDevice.cpp sections were read through the pinned-head reader; the full excluded files and uninspected hunks were not verified. The author reports test runs and a performance measurement from an earlier head; these were not independently run or verified.

To get this to a good state

Remove the conflict marker from .gitignore and correct the malformed documentation line if confirmed in the source, then rerun the reported checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6011006782 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15548#pullrequestreview-6011006782). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T07:12:56Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: remove the conflict marker from `.gitignore` and correct the malformed README diff artifact. ## What I ran Reviewed head `3964c5914c7117eddad2e3f80ad7ef845b843e97` using `repo_read.py` review-folder and pinned-head readers. No build or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and manifest review | passed | Changed files and hunks inspected | | Build and tests | not run | Relied on the author’s reported runs | ## Findings ### Blocking - `.gitignore:126` adds the literal merge-conflict marker `>>>>>>> origin/main`. This is an accidental repository artifact and should be removed. ### Non-blocking - The review diff includes a malformed added line in `docs/README.md` (`+ - [DB_RENDER_CONTROL ...`), while the surrounding change adds debt entries. Verify and fix the source formatting if this line is present at the head. ## Not verified The code changes appear broadly consistent with the described compute fallback and shared-pass flow, but no build or tests were run here. Three changed files were excluded from full-text review by the review-folder size rule: `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`, `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`, `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`, and `docs/dev/debt/shader.md`. Relevant `VulkanDevice.cpp` sections were read through the pinned-head reader; the full excluded files and uninspected hunks were not verified. The author reports test runs and a performance measurement from an earlier head; these were not independently run or verified. ## To get this to a good state Remove the conflict marker from `.gitignore` and correct the malformed documentation line if confirmed in the source, then rerun the reported checks on the updated head.
MarcZX10 commented 2026-11-22 13:43:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T13:43:20Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: ensure every resolved indirect record is rendered by the mesh-compute fallback, including synchronous draws.

What I ran

Reviewed head f47177d66b5501effeee77bb4a4bc55848180e66 and the prepared diff. No build or tests were run; repo_read.py was not run because no shell command interface was available.

Results

Check Result Note
Diff and targeted source review passed Reviewed fallback and recorder paths
Build and tests not run Author-reported results only

Findings

Blocking

  • core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:4469 routes only GPU-resident indirect arguments to MeshCompute. When arguments are CPU-resolved, the synchronous fallback path uses recordMeshArguments, which resolves only indirect.records.front(), then recordMeshCompute dispatches once and recordDrawCommandsImpl issues one indirect draw. Additional nonempty records are silently dropped. The recorded path has a one-record guard at Draw.cpp:2688, but the synchronous path has no equivalent guard. Preserve all resolved records through dispatch and draw, or reject multi-record inputs before rendering.

Non-blocking

  • No additional verified findings.

Sources

Not verified

  • Build, test execution, Vulkan validation, and physical-console behavior were not independently verified. The author reports targeted macOS/MoltenVK tests passing on a separate tree with prerequisite changes; the performance capture is from an earlier head.
  • Read changed-line ranges from the diff and targeted source ranges in Draw.cpp, Pipeline.cpp, Recorder.cpp, VulkanDevice.cpp, and Draw.hpp. Changed files not fully read: VulkanDevice.cpp, Graphics.cpp, ShaderMemory.cpp, and docs/dev/debt/shader.md (excluded from the prepared full-text bundle). Other changed-line ranges were not all inspected in full.

To get this to a good state

  • Handle every resolved indirect record in the compute fallback or reject multi-record synchronous fallback inputs before any draw is recorded. Then rerun the targeted mesh fallback tests on the new head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:6012542782 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15548#pullrequestreview-6012542782). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T13:43:20Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: ensure every resolved indirect record is rendered by the mesh-compute fallback, including synchronous draws. ## What I ran Reviewed head `f47177d66b5501effeee77bb4a4bc55848180e66` and the prepared diff. No build or tests were run; `repo_read.py` was not run because no shell command interface was available. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Reviewed fallback and recorder paths | | Build and tests | not run | Author-reported results only | ## Findings ### Blocking - `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:4469` routes only GPU-resident indirect arguments to `MeshCompute`. When arguments are CPU-resolved, the synchronous fallback path uses `recordMeshArguments`, which resolves only `indirect.records.front()`, then `recordMeshCompute` dispatches once and `recordDrawCommandsImpl` issues one indirect draw. Additional nonempty records are silently dropped. The recorded path has a one-record guard at `Draw.cpp:2688`, but the synchronous path has no equivalent guard. Preserve all resolved records through dispatch and draw, or reject multi-record inputs before rendering. ### Non-blocking - No additional verified findings. ## Sources - [Draw.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/f47177d66b5501effeee77bb4a4bc55848180e66/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp) - [Recorder.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/f47177d66b5501effeee77bb4a4bc55848180e66/core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp) ## Not verified - Build, test execution, Vulkan validation, and physical-console behavior were not independently verified. The author reports targeted macOS/MoltenVK tests passing on a separate tree with prerequisite changes; the performance capture is from an earlier head. - Read changed-line ranges from the diff and targeted source ranges in `Draw.cpp`, `Pipeline.cpp`, `Recorder.cpp`, `VulkanDevice.cpp`, and `Draw.hpp`. Changed files not fully read: `VulkanDevice.cpp`, `Graphics.cpp`, `ShaderMemory.cpp`, and `docs/dev/debt/shader.md` (excluded from the prepared full-text bundle). Other changed-line ranges were not all inspected in full. ## To get this to a good state - Handle every resolved indirect record in the compute fallback or reject multi-record synchronous fallback inputs before any draw is recorded. Then rerun the targeted mesh fallback tests on the new head.
ligmaSec commented 2026-12-03 22:41:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:41:00Z.

Review: COMMENTED


I verified that the exact current #17611 head is an ancestor of this revision and that this branch trial-merges cleanly onto c1601e56d5. Keep the test that forces an attachment hazard between compute-backed mesh draws alongside the one that shares a render pass. It checks that an optimization for independent draws still closes the pass when a dependency requires it. This stack also inherits #17611’s request-format version collision, so the recorded traces and replay tests should identify the merged serializer revision. Paired lavapipe execution is pending.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6179885449 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15548#pullrequestreview-6179885449). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:41:00Z. **Review:** COMMENTED --- I verified that the exact current #17611 head is an ancestor of this revision and that this branch trial-merges cleanly onto `c1601e56d5`. Keep the test that forces an attachment hazard between compute-backed mesh draws alongside the one that shares a render pass. It checks that an optimization for independent draws still closes the pass when a dependency requires it. This stack also inherits #17611’s request-format version collision, so the recorded traces and replay tests should identify the merged serializer revision. Paired lavapipe execution is pending. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/15548:upstream-pr/15548'
git switch 'upstream-pr/15548'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/15548'
git switch 'upstream-pr/15548'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/15548'
git switch 'upstream-pr/15548'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/15548'
git switch 'main'
git merge --squash 'upstream-pr/15548'
git switch 'main'
git merge --ff-only 'upstream-pr/15548'
git switch 'main'
git merge 'upstream-pr/15548'
git push origin 'main'
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!15548
No description provided.