fix(libSceAgcDriver): skip queue-0 dispatch while compute pipeline builds #24815

Closed
rolling-codes wants to merge 1 commit from upstream-pr/24815 into main
rolling-codes commented 2026-11-21 04:13:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rolling-codes on 2026-11-21T04:13:01Z.


What

Cold NVIDIA Vulkan pipeline builds of 1.2–2.6 M-word SPIR-V block the queue-0 worker 106–506 s while nvgpucomp64.dll JIT-compiles the shader (CreateComputePipeline). The queue-0 worker is the only thread that processes GPU submissions, so stalling it stalls all GPU work.

Add ComputePipelineBuilt (checks only computePipelines, not the in-progress computePipelinesBuilding map) and a guard in Dispatch::dispatch that:

  • returns early (skipping the dispatch) when the pipeline is not yet fully built, and
  • submits an async SubmitComputePrebuild on the first miss so the pipeline builds off the queue-0 thread.

Subsequent dispatches for the same shader proceed normally once the entry appears in computePipelines.

Tested

Not tested — no GPU available to run the AGC test suite. The diagnostic data in issue #24525 was used to identify the root cause; the fix reuses the existing SubmitComputePrebuild and HasComputePipeline patterns already present in the driver.

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 and the licence notice of code adapted from upstream
  • 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
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: #24525
  • Unblocks: none
  • GPUs tested: not tested
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5424124031 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24815). Originally posted by [rolling-codes](https://github.com/rolling-codes) on 2026-11-21T04:13:01Z. --- ### What Cold NVIDIA Vulkan pipeline builds of 1.2–2.6 M-word SPIR-V block the queue-0 worker 106–506 s while `nvgpucomp64.dll` JIT-compiles the shader (`CreateComputePipeline`). The queue-0 worker is the only thread that processes GPU submissions, so stalling it stalls all GPU work. Add `ComputePipelineBuilt` (checks only `computePipelines`, not the in-progress `computePipelinesBuilding` map) and a guard in `Dispatch::dispatch` that: - returns early (skipping the dispatch) when the pipeline is not yet fully built, and - submits an async `SubmitComputePrebuild` on the first miss so the pipeline builds off the queue-0 thread. Subsequent dispatches for the same shader proceed normally once the entry appears in `computePipelines`. ### Tested Not tested — no GPU available to run the AGC test suite. The diagnostic data in issue #24525 was used to identify the root cause; the fix reuses the existing `SubmitComputePrebuild` and `HasComputePipeline` patterns already present in the driver. ### 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 and the licence notice of code adapted from upstream - [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 - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [ ] Depends on: none - [x] Fixes: #24525 - [ ] Unblocks: none - [ ] GPUs tested: not tested - [x] AI-assisted: yes

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!24815
No description provided.