AGC: since #25434, APS5_ASYNC_PIPELINE_WORDS no longer defers a slow first-visit pipeline; Afterglow (PPSA47770) exits again on NVIDIA #26186

Closed
opened 2026-11-23 12:27:49 +00:00 by Jazeupoi · 0 comments
Jazeupoi commented 2026-11-23 12:27:49 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Jazeupoi on 2026-11-23T12:27:49Z.


What happens

Since #25434, APS5_ASYNC_PIPELINE_WORDS no longer defers a slow first-visit graphics pipeline: commitDraw calls PrebuildGraphicsLibrariesOnFirstVisit on the draw-commit thread before the draw reaches the deferral check, so the driver compile runs there first. Afterglow (PPSA47770) on NVIDIA exits again with [ps5-agc] submission retirement failed; terminating application before cleanup.

Title, test or build step

Afterglow (PPSA47770), catalog 01.000.006, APS5_ASYNC_PIPELINE_WORDS=100000, with no NVIDIA shader cache entry for its large pixel shader (c6482fe5).

AnyPS5 commit

main f5b7e1d1ac. Comparison tree: the same commit with #25434's merge (9369da66f8) reverted (git revert --no-commit -m 1), and no other change.

System

Windows 11 Pro (build 26300), AMD Ryzen 5 3400G, NVIDIA GeForce RTX 2060 (driver 621.24, Vulkan 1.4.357), WinLibs GCC 15.2.0 r7, Release.

Host report

AnyPS5 host report (format 1)
commit: f5b7e1d1ac81
[system]
os: Windows 10.0.26300
cpu: AMD Ryzen 5 3400G with Radeon Vega Graphics
cpu_threads: 8
memory_mib: 16307
cpu_gate: passed
[gpu]
device: NVIDIA GeForce RTX 2060
type: discrete
vendor_id: 0x10de
device_id: 0x1f08
vulkan_api: 1.4.357
driver: NVIDIA
driver_version: 621.24.0.0
subgroup_size: 32

Steps to reproduce

  1. Move NVIDIA's shader cache aside (%LOCALAPPDATA%\NVIDIA\DXCache and GLCache), so the driver has not compiled the title's large pixel shader.
  2. Unwrap and convert the catalog build as in the compatibility thread.
  3. Run it with APS5_ASYNC_PIPELINE_WORDS=100000 and APS5_PROFILE_DRAW=1. On main it exits about 2 s after its first draw.

Log

On main, the title's own log (download0/hui/dev/app.log) ends with:

[ps5-gallium] compile-shader stage=5 primitive=4 provoking-last=0 smooth=0 variant-attrs=0 result=0 bytes=95468 hash=c6482fe5 user-sgprs=3 scratch=0/0 table=0
[ps5-agc] submission retirement failed; terminating application before cleanup

With #25434 reverted, AnyPS5's log shows the deferral, then frames:

[pipecache] deferred build 0x11fccc541fe21fb6 queued, its draws are skipped until it is resident
[present] 600 presents over 10 s (0 dropped: no free swapchain image; 1 may trail on the GPU); ...

What was checked

tree (same machine, no NVIDIA shader cache entry for the title's large shader) runs result
main f5b7e1d1ac, APS5_ASYNC_PIPELINE_WORDS=100000 4 4 exit with submission retirement failed, 0 frames
same commit, #25434 reverted, APS5_ASYNC_PIPELINE_WORDS=100000 3 3 run for 95 s at 600 presents per 10 s; the title's "Flashing lights" notice is drawn

Without APS5_ASYNC_PIPELINE_WORDS, the title stops in the same way with and without #25434. #25434 does not cause the default stop. It breaks the switch that avoids it.

Where main waits:

  • A gdb backtrace 12 s into a main run shows the draw-commit thread inside nvgpucomp64.dll, called from AgcDriver::Graphics::LinkPipelineFromLibraries.
  • A temporary log line at the entry of LinkPipelineFromLibraries shows that call has partsOnly=1. Its caller resolves to Graphics::Pipeline::Pipeline, on the prebuilding path, which Pipeline::Prebuild reaches from PrebuildGraphicsLibraries.
  • PrebuildGraphicsLibrariesOnFirstVisit is called at the top of Driver::commitDraw (Execution/src/Driver/Draw/Draw.cpp), before the draw gets to DefersPipelineBuild in Graphics/src/Draw.cpp.
  • A temporary log line before the stencil-reference loop in Graphics/src/Draw.cpp shows that, on main, the draw with the 1,814,000-word pixel shader never reaches it before the exit. With a warm driver cache it does reach it, with defers=1.

How long the compile takes on this card: with the title's wait raised in a local copy of the executable, Vulkan.GraphicsPipelineLibrary took 40,185 ms (details in the thread).

Possibly relevant: #26084 also changes this part of commitDraw (it moves the final link out of the GPU mutex), but it still builds the pipeline on the draw-commit thread.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6559299385 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/26186). Originally posted by [Jazeupoi](https://github.com/Jazeupoi) on 2026-11-23T12:27:49Z. --- ### What happens Since #25434, `APS5_ASYNC_PIPELINE_WORDS` no longer defers a slow first-visit graphics pipeline: `commitDraw` calls `PrebuildGraphicsLibrariesOnFirstVisit` on the draw-commit thread before the draw reaches the deferral check, so the driver compile runs there first. Afterglow (PPSA47770) on NVIDIA exits again with `[ps5-agc] submission retirement failed; terminating application before cleanup`. ### Title, test or build step Afterglow (PPSA47770), catalog 01.000.006, `APS5_ASYNC_PIPELINE_WORDS=100000`, with no NVIDIA shader cache entry for its large pixel shader (`c6482fe5`). ### AnyPS5 commit `main` `f5b7e1d1ac`. Comparison tree: the same commit with #25434's merge (`9369da66f8`) reverted (`git revert --no-commit -m 1`), and no other change. ### System Windows 11 Pro (build 26300), AMD Ryzen 5 3400G, NVIDIA GeForce RTX 2060 (driver 621.24, Vulkan 1.4.357), WinLibs GCC 15.2.0 r7, Release. ### Host report ``` AnyPS5 host report (format 1) commit: f5b7e1d1ac81 [system] os: Windows 10.0.26300 cpu: AMD Ryzen 5 3400G with Radeon Vega Graphics cpu_threads: 8 memory_mib: 16307 cpu_gate: passed [gpu] device: NVIDIA GeForce RTX 2060 type: discrete vendor_id: 0x10de device_id: 0x1f08 vulkan_api: 1.4.357 driver: NVIDIA driver_version: 621.24.0.0 subgroup_size: 32 ``` ### Steps to reproduce 1. Move NVIDIA's shader cache aside (`%LOCALAPPDATA%\NVIDIA\DXCache` and `GLCache`), so the driver has not compiled the title's large pixel shader. 2. Unwrap and convert the catalog build as in the [compatibility thread](https://github.com/boykopovar/AnyPS5/discussions/13019). 3. Run it with `APS5_ASYNC_PIPELINE_WORDS=100000` and `APS5_PROFILE_DRAW=1`. On `main` it exits about 2 s after its first draw. ### Log On `main`, the title's own log (`download0/hui/dev/app.log`) ends with: ``` [ps5-gallium] compile-shader stage=5 primitive=4 provoking-last=0 smooth=0 variant-attrs=0 result=0 bytes=95468 hash=c6482fe5 user-sgprs=3 scratch=0/0 table=0 [ps5-agc] submission retirement failed; terminating application before cleanup ``` With #25434 reverted, AnyPS5's log shows the deferral, then frames: ``` [pipecache] deferred build 0x11fccc541fe21fb6 queued, its draws are skipped until it is resident [present] 600 presents over 10 s (0 dropped: no free swapchain image; 1 may trail on the GPU); ... ``` ### What was checked | tree (same machine, no NVIDIA shader cache entry for the title's large shader) | runs | result | | --- | --- | --- | | `main` `f5b7e1d1ac`, `APS5_ASYNC_PIPELINE_WORDS=100000` | 4 | 4 exit with `submission retirement failed`, 0 frames | | same commit, #25434 reverted, `APS5_ASYNC_PIPELINE_WORDS=100000` | 3 | 3 run for 95 s at 600 presents per 10 s; the title's "Flashing lights" notice is drawn | Without `APS5_ASYNC_PIPELINE_WORDS`, the title stops in the same way with and without #25434. #25434 does not cause the default stop. It breaks the switch that avoids it. Where `main` waits: - A gdb backtrace 12 s into a `main` run shows the `draw-commit` thread inside `nvgpucomp64.dll`, called from `AgcDriver::Graphics::LinkPipelineFromLibraries`. - A temporary log line at the entry of `LinkPipelineFromLibraries` shows that call has `partsOnly=1`. Its caller resolves to `Graphics::Pipeline::Pipeline`, on the `prebuilding` path, which `Pipeline::Prebuild` reaches from `PrebuildGraphicsLibraries`. - `PrebuildGraphicsLibrariesOnFirstVisit` is called at the top of `Driver::commitDraw` (`Execution/src/Driver/Draw/Draw.cpp`), before the draw gets to `DefersPipelineBuild` in `Graphics/src/Draw.cpp`. - A temporary log line before the stencil-reference loop in `Graphics/src/Draw.cpp` shows that, on `main`, the draw with the 1,814,000-word pixel shader never reaches it before the exit. With a warm driver cache it does reach it, with `defers=1`. How long the compile takes on this card: with the title's wait raised in a local copy of the executable, `Vulkan.GraphicsPipelineLibrary` took 40,185 ms (details in the [thread](https://github.com/boykopovar/AnyPS5/discussions/13019#discussioncomment-19830592)). Possibly relevant: #26084 also changes this part of `commitDraw` (it moves the final link out of the GPU mutex), but it still builds the pipeline on the draw-commit thread. AI-assisted: yes (Claude Code)
Sign in to join this conversation.
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#26186
No description provided.