perf(agc): build a dispatch's compute pipeline off the submit thread #21708

Merged
Ketz7 merged 5 commits from upstream-pr/21708 into main 2026-11-21 11:01:23 +00:00
Ketz7 commented 2026-11-16 16:26:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ketz7 on 2026-11-16T16:26:57Z.


What

  • With APS5_ASYNC_DRAW_COMPILE set, a dispatch is already skipped while its shader is prepared or specialized on the library prebuild pool (a9259f8865). The Vulkan compute pipeline for the result is still created on the submit thread, though, and on AMD's Windows compiler (LLPC) a large one takes 1–4 minutes. A title that waits for that submission gives up first.
  • Now, with the same switch, a dispatch whose compute pipeline has at least APS5_ASYNC_COMPUTE_WORDS SPIR-V words (32768 by default; 0 for every pipeline) and is not built yet is also skipped. VulkanDevice::ComputePipelineAhead reports where the pipeline stands (built, building, start it, or not buildable ahead). On "start", the dispatch hands PrebuildComputePipeline to the library prebuild pool, and a later dispatch of the same shader uses the pipeline.
  • A smaller pipeline is built by the dispatch, as without the switch. A skipped dispatch loses its output: that costs a frame for work redone every frame, but stays lost for work a title records once. vkQuake prepares model data once at level load with small compute shaders; with every pipeline skipped, enemies and projectiles stayed invisible for a whole 7-minute run after every pipeline was ready. Small pipelines build in milliseconds, so building them in the dispatch costs nothing visible.
  • A pipeline that cannot be built ahead (no descriptor cache, too few push-constant bytes, no pipeline identity), or whose build ahead failed, is built by the dispatch itself, so a failing shader still reports its error instead of being skipped for good. PrebuildComputePipeline settles the queued mark on every exit (any exception, SPIR-V it cannot build, a device that cannot build ahead), the dispatch's task catches every exception, and a hand-off to the pool that throws abandons the mark (VulkanDevice::AbandonComputePipelineAhead). Queued and failed pipelines are tracked per device and cleared with its other compute pipelines.
  • VulkanDevice::ComputePipelineCounts gains ahead, the compute pipelines created by a build ahead. With APS5_PROFILE_DRAW, the driver prints one line when it starts skipping a shader's dispatches and one when its pipeline is ready, with the number skipped.
  • Unset, every dispatch builds its pipeline before it records, as before. docs/dev/ENVIRONMENT.md describes the switch's new part and APS5_ASYNC_COMPUTE_WORDS.
  • Neighbouring PRs:
    • #19119 does the same for graphics pipelines, from a SPIR-V size set by its own switch APS5_ASYNC_PIPELINE_WORDS, and adds its line to docs/dev/ENVIRONMENT.md next to the APS5_ASYNC_DRAW_COMPILE line changed here; #22190 adds a line at the same place. The PRs do not touch the same code; whichever merges second keeps both lines. If one switch should cover both, I can follow #19119's.
    • #18369 adds constants at the start of the same anonymous namespace in Dispatch.cpp where this PR adds the skip-logging helpers. Whichever merges second keeps both.

Tested

  • vkQuake (PPSA99010 1.0, r_rtshadows 1), AMD's driver cache moved aside, APS5_ASYNC_DRAW_COMPILE=1 and APS5_PROFILE_DRAW=1 on both builds, 180 s, RX 7900 XT:
    • main 1df8b3234b: demo1 starts, then the submission that dispatches the ray-traced shadow shader waits on its pipeline. vkQuake reports the GPU has not reached submission 18 (at 17) in 10 s three times, then Quake Error: vkWaitForFences failed with code -4, and exits after 49 s with no presents counted.
    • this PR 50749eb5fc: still rendering at 180 s, 7,897 presents, through demo1, demo2 and demo3. Only pipelines of 57,233 to 169,011 words were skipped; every smaller one was built in its dispatch. One wait times out at the 180 s cut-off, as the process is stopped.
  • What a skipped dispatch still costs on a first launch: until a large pipeline is ready, what its dispatches produce is missing. The level is dark for the first seconds until its lightmap pipelines arrive, ray-traced shadows arrive over the first two minutes, and vkQuake's status bar, recorded once at level load by a 60,600-word shader, stays missing for that run. On the next launch the pipeline cache and journal build every pipeline at startup and nothing is missing (a warm 120 s run showed enemies, projectiles and the status bar). Two pipelines (126k and 160k words) do not finish within 7 minutes on this branch; with the BDA byte-loop change on top both finish.
  • Warm frame times (Performance report form), switch unset, as the form asks: Surround Sound Studio (PPSA99051 01.000.003), caches warm, APS5_TRACE_SECONDS=10:20 and no other APS5_TRACE_* or APS5_PROFILE_* switch, 1,199 presents each at 60 Hz. Frame p50/p90/p99/max is 16.674/16.921/16.985/17.033 ms on main and 16.684/16.914/16.982/17.010 ms here; GPU busy per present 4.569 and 4.774 ms. Traces attached.
  • Tests:
    • agc_driver_async_draw_compile_enabled (APS5_ASYNC_COMPUTE_WORDS=0) requires that every compute pipeline created during the test was built ahead. Without the Dispatch.cpp change it fails with "a dispatch with APS5_ASYNC_DRAW_COMPILE created its compute pipeline itself (1 created, 0 on the library prebuild pool)".
    • agc_driver_async_draw_compile_small_pipeline (default threshold) requires that the test's small pipeline is built in its dispatch and never ahead; agc_driver_async_draw_compile_disabled runs with the switch unset.
    • agc_driver_async_draw_compile queues a pipeline whose build ahead fails (an incompatible runtime ABI version, which throws before any Vulkan call) and requires Unavailable afterwards, then does the same for an abandoned one. Without the failure-path cleanup it fails with "a build ahead that failed left its compute pipeline queued, so every dispatch of it would be skipped".
  • Vulkan tests with ANYPS5_REQUIRE_VULKAN=1:
    • AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Windows 11 Pro 26H2 (build 26300): every test of agc_driver_async_draw_compile_tests, agc_driver_compute_pipeline_outside_gpu_mutex_tests, agc_driver_pipelined_dispatch_tests, agc_driver_dispatch_ahead_adopt_check_tests, agc_driver_prepared_shaders_tests and agc_driver_graphics_tests: 36 of 36 pass. (The three agc_driver_graphics_dump_* tests matched by the same filter run agc_driver_draw_cache_reuse_tests, which was not built, and report Not Run.)
    • llvmpipe (Mesa) on Ubuntu 24.04: the async and compute-pipeline tests pass; earlier on this branch the dispatch, pipelined, prepared-shader, graphics and BDA device tests passed with the switch unset. With APS5_ASYNC_DRAW_COMPILE=1 forced on every test, agc_driver_prepared_shaders_lazy_budget_zero, _abi_deferred_concurrent_lazy and _abi_deferred_compute_lazy fail the same way on main (they expect the first dispatch to run).
  • tools/check_conventions.py passes. tools/pr_overlap.py --branch: #19119, #18369 and #22190 are the line overlaps, described above; the PRs it could not compare are older ones that conflict with main and share VulkanDevice.cpp, Dispatch.cpp, ShaderRegistry.cpp or docs/dev/ENVIRONMENT.md.

A skipped dispatch also leaves stale data for later dispatches that read its output. In vkQuake, two of RADV’s BVH build passes (programs 0x20c612000 and 0x20c616e00) are among the skipped pipelines, while the small passes that read their output in the 8 MiB acceleration-structure scratch buffer run. Those passes take another build’s leftover triangle coordinates for node offsets and access unmapped memory, which AnyPS5’s BDA checks catch and report as BDA access failed … reason=1 (about 27,000 in a 420 s run). With the BDA byte-loop change on top, both pipelines finish: 307 faults follow the first, and none follow 0x20c612000 for the rest of the run, about 45% of its dispatches.

main (1df8b3234b):

{"commit":"1df8b3234b50","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"10:20"},"gpu":"AMD Radeon RX 7900 XT","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7900X 12-Core Processor","cpu_threads":24,"memory_mib":31904,"title_id":"PPSA99051","title":"Surround Sound Studio","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 10:20","first_present":595,"ms":20003.518},"presents":1199,"frame_ms":{"p50":16.674,"p90":16.921,"p99":16.985,"max":17.033},"gpu_busy_ms_per_present":4.569,"worker_busy_pct":{"queue worker 0x0":5.152},"phase_totals_ms":{"Driver.Completion":1.180,"Driver.Draw":328.467,"Driver.Draw.device_setup":16.254,"Driver.Draw.draw_enqueued":39.699,"Driver.Draw.post_compile_prepare":1.512,"Driver.Draw.prepare":44.527,"Driver.Draw.shader_compile_and_link":222.227,"Driver.EndSubmission":1.669,"Driver.Packet":1027.187,"Driver.Packet.device_lock":3.346,"Driver.Packet.draw":332.777,"Driver.Packet.execute":22.318,"Driver.Packet.flip_flush":75.439,"Driver.Packet.flush_between_packets":5.190,"Driver.Packet.pipeline_drain":542.953,"Driver.Packet.pipeline_prepare":5.530,"Driver.Packet.prepare_memory":6.347,"Driver.Present":1344.957,"Driver.Present.acquire_image":692.881,"Driver.Present.device_setup":0.726,"Driver.Present.gpu_mutex_wait":3.178,"Driver.Present.inflight_wait":4.407,"Driver.Present.present_display_buffer":192.992,"Driver.Present.queue_present":337.129,"Driver.Present.release_and_callback":1.240,"Driver.Present.render_fence_wait":107.770,"Driver.Present.resize":3.255,"Driver.Present.validate":0.658,"Driver.Suspend":0.487,"GpuMutex.wait.draw":0.000,"GpuMutex.wait.flush":0.028,"GpuMutex.wait.wait":2.276,"Graphics.Draw":845.411,"Graphics.Draw.draw_and_resource_release":813.841,"Graphics.Draw.index_upload":0.858,"Graphics.Draw.validate":23.983,"Graphics.Draw.vertex_upload":3.179,"Recorder.Reap":45.856,"Recorder.Submit":209.760,"Recorder.WaitSerial":19.503,"Resources.Complete":59.607,"Resources.Prepare":75.788,"Shader.DrawStage":188.361,"Shader.DrawStage.capture_resources":121.761,"Shader.DrawStage.materialize":33.931,"Shader.DrawStage.prepared_invocation":30.624,"VideoOut.Flip":18696.135,"VideoOut.Flip.completion_mutex_wait":1.210,"VideoOut.Flip.config_mutex_wait":0.112,"VideoOut.Flip.frame_limit":3.350,"VideoOut.Flip.notify_game":50.529,"VideoOut.Flip.present":1349.198,"VideoOut.Flip.validate":0.986,"VideoOut.Flip.vblank_wait":17239.998,"VideoOut.Flip.window_prepare":3.677,"VideoOut.Flip.window_title":61.246,"VideoOut.Readiness":1.866,"VideoOut.Readiness.locks_validate":0.443,"Vulkan.Acquire":691.551,"Vulkan.Acquire.acquire_fence_wait":590.223,"Vulkan.Acquire.acquire_image":95.739,"Vulkan.Acquire.fence_reset":3.102,"Vulkan.Acquire.retired_swapchains":1.968,"Vulkan.Present":110.546,"Vulkan.Present.command_record_scale":47.577,"Vulkan.Present.pixel_upload":2.870,"Vulkan.Present.queue_submit":59.203,"Vulkan.QueuePresent":335.145,"Vulkan.QueuePresent.queue_present":333.340,"Vulkan.Retire":108.296,"Vulkan.Retire.wait":98.794},"top_phases_ms_per_frame":{"VideoOut.Flip":15.593,"VideoOut.Flip.vblank_wait":14.379,"VideoOut.Flip.present":1.125,"Driver.Present":1.122,"Driver.Packet":0.857,"Graphics.Draw":0.705,"Graphics.Draw.draw_and_resource_release":0.679,"Driver.Present.acquire_image":0.578},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":4796,"Graphics.Barrier.label-run":7194,"Graphics.Barrier.present-blit":2398,"Graphics.RenderPass":2398,"Graphics.RenderPass.Close.new-batch":2398,"Graphics.RenderPass.Continued":5995},"trace_dropped":false,"trace":"aps5-trace-1df8b3234b50-31588.json.gz"}

This PR (50749eb5fc):

{"commit":"50749eb5fc0b","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"10:20"},"gpu":"AMD Radeon RX 7900 XT","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7900X 12-Core Processor","cpu_threads":24,"memory_mib":31904,"title_id":"PPSA99051","title":"Surround Sound Studio","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 10:20","first_present":598,"ms":20003.054},"presents":1199,"frame_ms":{"p50":16.684,"p90":16.914,"p99":16.982,"max":17.010},"gpu_busy_ms_per_present":4.774,"worker_busy_pct":{"queue worker 0x0":4.720},"phase_totals_ms":{"Driver.Completion":1.135,"Driver.Draw":313.093,"Driver.Draw.device_setup":15.383,"Driver.Draw.draw_enqueued":38.274,"Driver.Draw.post_compile_prepare":1.432,"Driver.Draw.prepare":42.298,"Driver.Draw.shader_compile_and_link":211.559,"Driver.EndSubmission":1.505,"Driver.Packet":941.181,"Driver.Packet.device_lock":3.625,"Driver.Packet.draw":316.856,"Driver.Packet.execute":21.100,"Driver.Packet.flip_flush":71.939,"Driver.Packet.flush_between_packets":4.600,"Driver.Packet.pipeline_drain":479.789,"Driver.Packet.pipeline_prepare":5.694,"Driver.Packet.prepare_memory":6.533,"Driver.Present":1312.598,"Driver.Present.acquire_image":691.160,"Driver.Present.device_setup":0.673,"Driver.Present.gpu_mutex_wait":2.812,"Driver.Present.inflight_wait":3.546,"Driver.Present.present_display_buffer":178.766,"Driver.Present.queue_present":315.113,"Driver.Present.release_and_callback":1.219,"Driver.Present.render_fence_wait":115.175,"Driver.Present.resize":2.833,"Driver.Present.validate":0.608,"Driver.Suspend":0.405,"GpuMutex.wait.flush":0.003,"GpuMutex.wait.present":0.108,"Graphics.Draw":791.855,"Graphics.Draw.draw_and_resource_release":762.919,"Graphics.Draw.index_upload":0.854,"Graphics.Draw.validate":21.471,"Graphics.Draw.vertex_upload":3.367,"Recorder.Reap":43.510,"Recorder.Submit":196.056,"Recorder.WaitSerial":16.209,"Resources.Complete":57.143,"Resources.Prepare":69.720,"Shader.DrawStage":179.589,"Shader.DrawStage.capture_resources":117.032,"Shader.DrawStage.materialize":31.341,"Shader.DrawStage.prepared_invocation":29.188,"VideoOut.Flip":18802.608,"VideoOut.Flip.completion_mutex_wait":1.129,"VideoOut.Flip.config_mutex_wait":0.094,"VideoOut.Flip.frame_limit":3.087,"VideoOut.Flip.notify_game":18.085,"VideoOut.Flip.present":1315.974,"VideoOut.Flip.validate":0.920,"VideoOut.Flip.vblank_wait":17418.470,"VideoOut.Flip.window_prepare":3.039,"VideoOut.Flip.window_title":55.659,"VideoOut.Readiness":1.894,"VideoOut.Readiness.locks_validate":0.441,"Vulkan.Acquire":689.898,"Vulkan.Acquire.acquire_fence_wait":597.254,"Vulkan.Acquire.acquire_image":87.304,"Vulkan.Acquire.fence_reset":2.802,"Vulkan.Acquire.retired_swapchains":2.043,"Vulkan.Present":102.192,"Vulkan.Present.command_record_scale":42.597,"Vulkan.Present.pixel_upload":2.654,"Vulkan.Present.queue_submit":56.120,"Vulkan.QueuePresent":313.230,"Vulkan.QueuePresent.queue_present":311.608,"Vulkan.Retire":115.350,"Vulkan.Retire.wait":106.391},"top_phases_ms_per_frame":{"VideoOut.Flip":15.682,"VideoOut.Flip.vblank_wait":14.527,"VideoOut.Flip.present":1.098,"Driver.Present":1.095,"Driver.Packet":0.785,"Graphics.Draw":0.660,"Graphics.Draw.draw_and_resource_release":0.636,"Driver.Present.acquire_image":0.576},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":4796,"Graphics.Barrier.label-run":7194,"Graphics.Barrier.present-blit":2398,"Graphics.RenderPass":2398,"Graphics.RenderPass.Close.new-batch":2398,"Graphics.RenderPass.Continued":5995},"trace_dropped":false,"trace":"aps5-trace-50749eb5fc0b-25292.json.gz"}

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 (see AGENTS.md)
  • 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
  • Fixes: none
  • Unblocks: vkQuake past its first ray-traced dispatch with APS5_ASYNC_DRAW_COMPILE=1 (on a first launch its status bar stays missing, and two large pipelines take over 7 minutes)
  • GPUs tested: AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Windows 11 Pro 26H2 (build 26300); llvmpipe (Mesa) on Ubuntu 24.04
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5340795827 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21708). Originally posted by [Ketz7](https://github.com/Ketz7) on 2026-11-16T16:26:57Z. --- ### What - With `APS5_ASYNC_DRAW_COMPILE` set, a dispatch is already skipped while its shader is prepared or specialized on the library prebuild pool (a9259f8865). The Vulkan compute pipeline for the result is still created on the submit thread, though, and on AMD's Windows compiler (LLPC) a large one takes 1–4 minutes. A title that waits for that submission gives up first. - Now, with the same switch, a dispatch whose compute pipeline has at least `APS5_ASYNC_COMPUTE_WORDS` SPIR-V words (32768 by default; 0 for every pipeline) and is not built yet is also skipped. `VulkanDevice::ComputePipelineAhead` reports where the pipeline stands (built, building, start it, or not buildable ahead). On "start", the dispatch hands `PrebuildComputePipeline` to the library prebuild pool, and a later dispatch of the same shader uses the pipeline. - A smaller pipeline is built by the dispatch, as without the switch. A skipped dispatch loses its output: that costs a frame for work redone every frame, but stays lost for work a title records once. vkQuake prepares model data once at level load with small compute shaders; with every pipeline skipped, enemies and projectiles stayed invisible for a whole 7-minute run after every pipeline was ready. Small pipelines build in milliseconds, so building them in the dispatch costs nothing visible. - A pipeline that cannot be built ahead (no descriptor cache, too few push-constant bytes, no pipeline identity), or whose build ahead failed, is built by the dispatch itself, so a failing shader still reports its error instead of being skipped for good. `PrebuildComputePipeline` settles the queued mark on every exit (any exception, SPIR-V it cannot build, a device that cannot build ahead), the dispatch's task catches every exception, and a hand-off to the pool that throws abandons the mark (`VulkanDevice::AbandonComputePipelineAhead`). Queued and failed pipelines are tracked per device and cleared with its other compute pipelines. - `VulkanDevice::ComputePipelineCounts` gains `ahead`, the compute pipelines created by a build ahead. With `APS5_PROFILE_DRAW`, the driver prints one line when it starts skipping a shader's dispatches and one when its pipeline is ready, with the number skipped. - Unset, every dispatch builds its pipeline before it records, as before. `docs/dev/ENVIRONMENT.md` describes the switch's new part and `APS5_ASYNC_COMPUTE_WORDS`. - Neighbouring PRs: - #19119 does the same for graphics pipelines, from a SPIR-V size set by its own switch `APS5_ASYNC_PIPELINE_WORDS`, and adds its line to `docs/dev/ENVIRONMENT.md` next to the `APS5_ASYNC_DRAW_COMPILE` line changed here; #22190 adds a line at the same place. The PRs do not touch the same code; whichever merges second keeps both lines. If one switch should cover both, I can follow #19119's. - #18369 adds constants at the start of the same anonymous namespace in `Dispatch.cpp` where this PR adds the skip-logging helpers. Whichever merges second keeps both. ### Tested - vkQuake (PPSA99010 1.0, `r_rtshadows 1`), AMD's driver cache moved aside, `APS5_ASYNC_DRAW_COMPILE=1` and `APS5_PROFILE_DRAW=1` on both builds, 180 s, RX 7900 XT: - `main` 1df8b3234b: demo1 starts, then the submission that dispatches the ray-traced shadow shader waits on its pipeline. vkQuake reports `the GPU has not reached submission 18 (at 17) in 10 s` three times, then `Quake Error: vkWaitForFences failed with code -4`, and exits after 49 s with no presents counted. - this PR 50749eb5fc: still rendering at 180 s, 7,897 presents, through demo1, demo2 and demo3. Only pipelines of 57,233 to 169,011 words were skipped; every smaller one was built in its dispatch. One wait times out at the 180 s cut-off, as the process is stopped. - What a skipped dispatch still costs on a first launch: until a large pipeline is ready, what its dispatches produce is missing. The level is dark for the first seconds until its lightmap pipelines arrive, ray-traced shadows arrive over the first two minutes, and vkQuake's status bar, recorded once at level load by a 60,600-word shader, stays missing for that run. On the next launch the pipeline cache and journal build every pipeline at startup and nothing is missing (a warm 120 s run showed enemies, projectiles and the status bar). Two pipelines (126k and 160k words) do not finish within 7 minutes on this branch; with the BDA byte-loop change on top both finish. - Warm frame times (Performance report form), switch unset, as the form asks: Surround Sound Studio (PPSA99051 01.000.003), caches warm, `APS5_TRACE_SECONDS=10:20` and no other `APS5_TRACE_*` or `APS5_PROFILE_*` switch, 1,199 presents each at 60 Hz. Frame p50/p90/p99/max is 16.674/16.921/16.985/17.033 ms on `main` and 16.684/16.914/16.982/17.010 ms here; GPU busy per present 4.569 and 4.774 ms. Traces attached. - Tests: - `agc_driver_async_draw_compile_enabled` (`APS5_ASYNC_COMPUTE_WORDS=0`) requires that every compute pipeline created during the test was built ahead. Without the `Dispatch.cpp` change it fails with "a dispatch with APS5_ASYNC_DRAW_COMPILE created its compute pipeline itself (1 created, 0 on the library prebuild pool)". - `agc_driver_async_draw_compile_small_pipeline` (default threshold) requires that the test's small pipeline is built in its dispatch and never ahead; `agc_driver_async_draw_compile_disabled` runs with the switch unset. - `agc_driver_async_draw_compile` queues a pipeline whose build ahead fails (an incompatible runtime ABI version, which throws before any Vulkan call) and requires `Unavailable` afterwards, then does the same for an abandoned one. Without the failure-path cleanup it fails with "a build ahead that failed left its compute pipeline queued, so every dispatch of it would be skipped". - Vulkan tests with `ANYPS5_REQUIRE_VULKAN=1`: - AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Windows 11 Pro 26H2 (build 26300): every test of `agc_driver_async_draw_compile_tests`, `agc_driver_compute_pipeline_outside_gpu_mutex_tests`, `agc_driver_pipelined_dispatch_tests`, `agc_driver_dispatch_ahead_adopt_check_tests`, `agc_driver_prepared_shaders_tests` and `agc_driver_graphics_tests`: 36 of 36 pass. (The three `agc_driver_graphics_dump_*` tests matched by the same filter run `agc_driver_draw_cache_reuse_tests`, which was not built, and report Not Run.) - llvmpipe (Mesa) on Ubuntu 24.04: the async and compute-pipeline tests pass; earlier on this branch the dispatch, pipelined, prepared-shader, graphics and BDA device tests passed with the switch unset. With `APS5_ASYNC_DRAW_COMPILE=1` forced on every test, `agc_driver_prepared_shaders_lazy_budget_zero`, `_abi_deferred_concurrent_lazy` and `_abi_deferred_compute_lazy` fail the same way on `main` (they expect the first dispatch to run). - `tools/check_conventions.py` passes. `tools/pr_overlap.py --branch`: #19119, #18369 and #22190 are the line overlaps, described above; the PRs it could not compare are older ones that conflict with `main` and share `VulkanDevice.cpp`, `Dispatch.cpp`, `ShaderRegistry.cpp` or `docs/dev/ENVIRONMENT.md`. A skipped dispatch also leaves stale data for later dispatches that read its output. In vkQuake, two of RADV’s BVH build passes (programs 0x20c612000 and 0x20c616e00) are among the skipped pipelines, while the small passes that read their output in the 8 MiB acceleration-structure scratch buffer run. Those passes take another build’s leftover triangle coordinates for node offsets and access unmapped memory, which AnyPS5’s BDA checks catch and report as BDA access failed … reason=1 (about 27,000 in a 420 s run). With the BDA byte-loop change on top, both pipelines finish: 307 faults follow the first, and none follow 0x20c612000 for the rest of the run, about 45% of its dispatches. `main` (1df8b3234b): ```json {"commit":"1df8b3234b50","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"10:20"},"gpu":"AMD Radeon RX 7900 XT","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7900X 12-Core Processor","cpu_threads":24,"memory_mib":31904,"title_id":"PPSA99051","title":"Surround Sound Studio","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 10:20","first_present":595,"ms":20003.518},"presents":1199,"frame_ms":{"p50":16.674,"p90":16.921,"p99":16.985,"max":17.033},"gpu_busy_ms_per_present":4.569,"worker_busy_pct":{"queue worker 0x0":5.152},"phase_totals_ms":{"Driver.Completion":1.180,"Driver.Draw":328.467,"Driver.Draw.device_setup":16.254,"Driver.Draw.draw_enqueued":39.699,"Driver.Draw.post_compile_prepare":1.512,"Driver.Draw.prepare":44.527,"Driver.Draw.shader_compile_and_link":222.227,"Driver.EndSubmission":1.669,"Driver.Packet":1027.187,"Driver.Packet.device_lock":3.346,"Driver.Packet.draw":332.777,"Driver.Packet.execute":22.318,"Driver.Packet.flip_flush":75.439,"Driver.Packet.flush_between_packets":5.190,"Driver.Packet.pipeline_drain":542.953,"Driver.Packet.pipeline_prepare":5.530,"Driver.Packet.prepare_memory":6.347,"Driver.Present":1344.957,"Driver.Present.acquire_image":692.881,"Driver.Present.device_setup":0.726,"Driver.Present.gpu_mutex_wait":3.178,"Driver.Present.inflight_wait":4.407,"Driver.Present.present_display_buffer":192.992,"Driver.Present.queue_present":337.129,"Driver.Present.release_and_callback":1.240,"Driver.Present.render_fence_wait":107.770,"Driver.Present.resize":3.255,"Driver.Present.validate":0.658,"Driver.Suspend":0.487,"GpuMutex.wait.draw":0.000,"GpuMutex.wait.flush":0.028,"GpuMutex.wait.wait":2.276,"Graphics.Draw":845.411,"Graphics.Draw.draw_and_resource_release":813.841,"Graphics.Draw.index_upload":0.858,"Graphics.Draw.validate":23.983,"Graphics.Draw.vertex_upload":3.179,"Recorder.Reap":45.856,"Recorder.Submit":209.760,"Recorder.WaitSerial":19.503,"Resources.Complete":59.607,"Resources.Prepare":75.788,"Shader.DrawStage":188.361,"Shader.DrawStage.capture_resources":121.761,"Shader.DrawStage.materialize":33.931,"Shader.DrawStage.prepared_invocation":30.624,"VideoOut.Flip":18696.135,"VideoOut.Flip.completion_mutex_wait":1.210,"VideoOut.Flip.config_mutex_wait":0.112,"VideoOut.Flip.frame_limit":3.350,"VideoOut.Flip.notify_game":50.529,"VideoOut.Flip.present":1349.198,"VideoOut.Flip.validate":0.986,"VideoOut.Flip.vblank_wait":17239.998,"VideoOut.Flip.window_prepare":3.677,"VideoOut.Flip.window_title":61.246,"VideoOut.Readiness":1.866,"VideoOut.Readiness.locks_validate":0.443,"Vulkan.Acquire":691.551,"Vulkan.Acquire.acquire_fence_wait":590.223,"Vulkan.Acquire.acquire_image":95.739,"Vulkan.Acquire.fence_reset":3.102,"Vulkan.Acquire.retired_swapchains":1.968,"Vulkan.Present":110.546,"Vulkan.Present.command_record_scale":47.577,"Vulkan.Present.pixel_upload":2.870,"Vulkan.Present.queue_submit":59.203,"Vulkan.QueuePresent":335.145,"Vulkan.QueuePresent.queue_present":333.340,"Vulkan.Retire":108.296,"Vulkan.Retire.wait":98.794},"top_phases_ms_per_frame":{"VideoOut.Flip":15.593,"VideoOut.Flip.vblank_wait":14.379,"VideoOut.Flip.present":1.125,"Driver.Present":1.122,"Driver.Packet":0.857,"Graphics.Draw":0.705,"Graphics.Draw.draw_and_resource_release":0.679,"Driver.Present.acquire_image":0.578},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":4796,"Graphics.Barrier.label-run":7194,"Graphics.Barrier.present-blit":2398,"Graphics.RenderPass":2398,"Graphics.RenderPass.Close.new-batch":2398,"Graphics.RenderPass.Continued":5995},"trace_dropped":false,"trace":"aps5-trace-1df8b3234b50-31588.json.gz"} ``` This PR (50749eb5fc): ```json {"commit":"50749eb5fc0b","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"10:20"},"gpu":"AMD Radeon RX 7900 XT","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7900X 12-Core Processor","cpu_threads":24,"memory_mib":31904,"title_id":"PPSA99051","title":"Surround Sound Studio","content_version":"01.000.003","resolution":"3840x2160","window":{"spec":"seconds 10:20","first_present":598,"ms":20003.054},"presents":1199,"frame_ms":{"p50":16.684,"p90":16.914,"p99":16.982,"max":17.010},"gpu_busy_ms_per_present":4.774,"worker_busy_pct":{"queue worker 0x0":4.720},"phase_totals_ms":{"Driver.Completion":1.135,"Driver.Draw":313.093,"Driver.Draw.device_setup":15.383,"Driver.Draw.draw_enqueued":38.274,"Driver.Draw.post_compile_prepare":1.432,"Driver.Draw.prepare":42.298,"Driver.Draw.shader_compile_and_link":211.559,"Driver.EndSubmission":1.505,"Driver.Packet":941.181,"Driver.Packet.device_lock":3.625,"Driver.Packet.draw":316.856,"Driver.Packet.execute":21.100,"Driver.Packet.flip_flush":71.939,"Driver.Packet.flush_between_packets":4.600,"Driver.Packet.pipeline_drain":479.789,"Driver.Packet.pipeline_prepare":5.694,"Driver.Packet.prepare_memory":6.533,"Driver.Present":1312.598,"Driver.Present.acquire_image":691.160,"Driver.Present.device_setup":0.673,"Driver.Present.gpu_mutex_wait":2.812,"Driver.Present.inflight_wait":3.546,"Driver.Present.present_display_buffer":178.766,"Driver.Present.queue_present":315.113,"Driver.Present.release_and_callback":1.219,"Driver.Present.render_fence_wait":115.175,"Driver.Present.resize":2.833,"Driver.Present.validate":0.608,"Driver.Suspend":0.405,"GpuMutex.wait.flush":0.003,"GpuMutex.wait.present":0.108,"Graphics.Draw":791.855,"Graphics.Draw.draw_and_resource_release":762.919,"Graphics.Draw.index_upload":0.854,"Graphics.Draw.validate":21.471,"Graphics.Draw.vertex_upload":3.367,"Recorder.Reap":43.510,"Recorder.Submit":196.056,"Recorder.WaitSerial":16.209,"Resources.Complete":57.143,"Resources.Prepare":69.720,"Shader.DrawStage":179.589,"Shader.DrawStage.capture_resources":117.032,"Shader.DrawStage.materialize":31.341,"Shader.DrawStage.prepared_invocation":29.188,"VideoOut.Flip":18802.608,"VideoOut.Flip.completion_mutex_wait":1.129,"VideoOut.Flip.config_mutex_wait":0.094,"VideoOut.Flip.frame_limit":3.087,"VideoOut.Flip.notify_game":18.085,"VideoOut.Flip.present":1315.974,"VideoOut.Flip.validate":0.920,"VideoOut.Flip.vblank_wait":17418.470,"VideoOut.Flip.window_prepare":3.039,"VideoOut.Flip.window_title":55.659,"VideoOut.Readiness":1.894,"VideoOut.Readiness.locks_validate":0.441,"Vulkan.Acquire":689.898,"Vulkan.Acquire.acquire_fence_wait":597.254,"Vulkan.Acquire.acquire_image":87.304,"Vulkan.Acquire.fence_reset":2.802,"Vulkan.Acquire.retired_swapchains":2.043,"Vulkan.Present":102.192,"Vulkan.Present.command_record_scale":42.597,"Vulkan.Present.pixel_upload":2.654,"Vulkan.Present.queue_submit":56.120,"Vulkan.QueuePresent":313.230,"Vulkan.QueuePresent.queue_present":311.608,"Vulkan.Retire":115.350,"Vulkan.Retire.wait":106.391},"top_phases_ms_per_frame":{"VideoOut.Flip":15.682,"VideoOut.Flip.vblank_wait":14.527,"VideoOut.Flip.present":1.098,"Driver.Present":1.095,"Driver.Packet":0.785,"Graphics.Draw":0.660,"Graphics.Draw.draw_and_resource_release":0.636,"Driver.Present.acquire_image":0.576},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":4796,"Graphics.Barrier.label-run":7194,"Graphics.Barrier.present-blit":2398,"Graphics.RenderPass":2398,"Graphics.RenderPass.Close.new-batch":2398,"Graphics.RenderPass.Continued":5995},"trace_dropped":false,"trace":"aps5-trace-50749eb5fc0b-25292.json.gz"} ``` ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: vkQuake past its first ray-traced dispatch with `APS5_ASYNC_DRAW_COMPILE=1` (on a first launch its status bar stays missing, and two large pipelines take over 7 minutes) - [x] GPUs tested: AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Windows 11 Pro 26H2 (build 26300); llvmpipe (Mesa) on Ubuntu 24.04 - [x] AI-assisted: yes
MarcZX10 commented 2026-11-16 20:01:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T20:01:07Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: ensure a failed or abandoned build-ahead attempt reaches the ordinary dispatch pipeline build path instead of leaving dispatches indefinitely skipped.

What I ran

Reviewed head 135fd6b2ce6e37716da7e9c8c064ef2ed31f25f4. Read the prepared description, commits, manifest, diff, all included changed files, and the changed regions of VulkanDevice.cpp, plus the targeted pipeline and compile-budget context via repo_read.py. No tests or build commands were run.

Results

Check Result Note
Diff and targeted code review failed Verified failure-state defect
Build and tests not run No execution performed
Changed file coverage passed All 10 changed files read

Findings

Blocking

  • VulkanDevice::PrebuildComputePipeline returns immediately for invalid SPIR-V before clearing the key from computePipelinesQueued or marking it failed. ComputePipelineAhead then continues returning Building for that key, so every dispatch is skipped indefinitely. This is reachable because ComputePipelineAhead returns Start based on SPIR-V validity, but does not establish that PrebuildComputePipeline will proceed; an exception swallowed by the dispatch task also leaves the queue state uncleared. Add cleanup on every early-return and failure path, or transition the key to a state that lets a dispatch build synchronously. Evidence: core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2951, core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2958, core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:3001; the relevant changed lines are core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2976 and core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2985, where cleanup is attempted only after build work starts or throws.

Non-blocking

None.

Not verified

No build, tests, or runtime checks were performed. Read all changed files listed as reviewed in the manifest. VulkanDevice.cpp was excluded from the prepared full-text bundle because of size; its changed and relevant surrounding ranges were read through repo_read.py.

To get this to a good state

Clear or resolve queued state on every path after ComputePipelineAhead marks a pipeline queued, including invalid input and all swallowed exceptions, then rerun the async compute pipeline tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5926639155 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21708#pullrequestreview-5926639155). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T20:01:07Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: ensure a failed or abandoned build-ahead attempt reaches the ordinary dispatch pipeline build path instead of leaving dispatches indefinitely skipped. ## What I ran Reviewed head `135fd6b2ce6e37716da7e9c8c064ef2ed31f25f4`. Read the prepared description, commits, manifest, diff, all included changed files, and the changed regions of `VulkanDevice.cpp`, plus the targeted pipeline and compile-budget context via `repo_read.py`. No tests or build commands were run. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted code review | failed | Verified failure-state defect | | Build and tests | not run | No execution performed | | Changed file coverage | passed | All 10 changed files read | ## Findings ### Blocking - `VulkanDevice::PrebuildComputePipeline` returns immediately for invalid SPIR-V before clearing the key from `computePipelinesQueued` or marking it failed. `ComputePipelineAhead` then continues returning `Building` for that key, so every dispatch is skipped indefinitely. This is reachable because `ComputePipelineAhead` returns `Start` based on SPIR-V validity, but does not establish that `PrebuildComputePipeline` will proceed; an exception swallowed by the dispatch task also leaves the queue state uncleared. Add cleanup on every early-return and failure path, or transition the key to a state that lets a dispatch build synchronously. Evidence: `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2951`, `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2958`, `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:3001`; the relevant changed lines are `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2976` and `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:2985`, where cleanup is attempted only after build work starts or throws. ### Non-blocking None. ## Not verified No build, tests, or runtime checks were performed. Read all changed files listed as reviewed in the manifest. `VulkanDevice.cpp` was excluded from the prepared full-text bundle because of size; its changed and relevant surrounding ranges were read through `repo_read.py`. ## To get this to a good state Clear or resolve queued state on every path after `ComputePipelineAhead` marks a pipeline queued, including invalid input and all swallowed exceptions, then rerun the async compute pipeline tests.
MarcZX10 commented 2026-11-17 11:22:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T11:22:33Z.

Review: COMMENTED


Reviewed the compute pipeline build-ahead change — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head reviewed: 50749eb5fc, base main.
  • Read the diff of all eight included files, the head text of Dispatch.cpp around the new dispatch skip (lines 500–545), and the head matches for the new names with repo_read.py search.
  • No build and no test run in this review. The test results in the description are the author's own runs and are not counted here.

Results

Check Result Note
Diff read passed All included files
Full text read not run VulkanDevice.cpp is too large for the folder; only its diff and search hits were read
Build and tests not run Not built in this review

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libSceAgcDriver/Execution/src/Driver/Diagnostics.cpp:110: AsyncComputePipelineWords parses the variable with strtoull, so a value that is not a number becomes 0. With 0, every compute pipeline is skipped, which is the widest setting. A malformed value gives the widest skip without any message. Parsing with a check for a number, or logging the fallback, would avoid that.

Not verified

  • VulkanDevice.cpp, listed under reviewed in the file list: I read its diff and the search hits for the new names, not its full text. The queue and settle logic in PrebuildComputePipeline, ComputePipelineAhead and AbandonComputePipelineAhead is reviewed from the diff only.
  • What happens to a queued key if the prebuild pool drops a task at shutdown. SubmitComputePrebuild is defined in core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp and was not read. If a task is dropped, that shader's dispatches stay skipped for the rest of the run.
  • The author's measurements (vkQuake, Surround Sound Studio frame times, the test runs on the AMD and llvmpipe machines): not reproduced here.

To get this to a good state

Nothing is required.

Optional:

  • Reject a non-numeric APS5_ASYNC_COMPUTE_WORDS value, or log the fallback, as noted above.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5937528449 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21708#pullrequestreview-5937528449). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T11:22:33Z. **Review:** COMMENTED --- # Reviewed the compute pipeline build-ahead change — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Head reviewed: 50749eb5fc0b33601b44c5f7219c51c233acff53, base main. - Read the diff of all eight included files, the head text of `Dispatch.cpp` around the new dispatch skip (lines 500–545), and the head matches for the new names with `repo_read.py search`. - No build and no test run in this review. The test results in the description are the author's own runs and are not counted here. ## Results | Check | Result | Note | | --- | --- | --- | | Diff read | passed | All included files | | Full text read | not run | `VulkanDevice.cpp` is too large for the folder; only its diff and search hits were read | | Build and tests | not run | Not built in this review | ## Findings ### Blocking None. ### Non-blocking - `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Diagnostics.cpp:110`: `AsyncComputePipelineWords` parses the variable with `strtoull`, so a value that is not a number becomes 0. With 0, every compute pipeline is skipped, which is the widest setting. A malformed value gives the widest skip without any message. Parsing with a check for a number, or logging the fallback, would avoid that. ## Not verified - `VulkanDevice.cpp`, listed under `reviewed` in the file list: I read its diff and the search hits for the new names, not its full text. The queue and settle logic in `PrebuildComputePipeline`, `ComputePipelineAhead` and `AbandonComputePipelineAhead` is reviewed from the diff only. - What happens to a queued key if the prebuild pool drops a task at shutdown. `SubmitComputePrebuild` is defined in `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` and was not read. If a task is dropped, that shader's dispatches stay skipped for the rest of the run. - The author's measurements (vkQuake, Surround Sound Studio frame times, the test runs on the AMD and llvmpipe machines): not reproduced here. ## To get this to a good state Nothing is required. Optional: - Reject a non-numeric `APS5_ASYNC_COMPUTE_WORDS` value, or log the fallback, as noted above.
Jazeupoi commented 2026-11-18 12:27:23 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Tested on NVIDIA, since the description's title runs are on AMD.

Setup: Windows 11 Pro (build 26300), AMD Ryzen 5 3400G, NVIDIA GeForce RTX 2060 (driver 621.24), WinLibs GCC 15.2.0, Release. main 648ba19b3e with #22373 (a test-build fix only), and the same tree with head 50749eb5fc merged (clean). vkQuake PPSA99010 01.000.000 with the shareware pak0.pak, converted with --windows --registry by each build. APS5_ASYNC_DRAW_COMPILE=1 and APS5_PROFILE_DRAW=1 on both runs, AnyPS5's shader_cache/ emptied before each run, no pad input, one run each with a 180 s cap.

main this PR
Presents 12, all in the first seconds 5,311 in 170 s
Presents per 10 s none after the start 27, 128, then 263 to 430
End the title exits by itself at 157 s (exit: clean, code 0 in the run report) still rendering at 180 s, stopped by the cap
On screen black window the level loads and plays

On main the log stops growing about 40 s in. An earlier run of the same main build without the switch ended the same way: 12 presents, [gpu] worker at 44 s: dispatch 43.2 s, then a clean exit at 47 s.

So the PR also gets vkQuake past the large compute pipelines on NVIDIA's Windows driver.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5956522777 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21708#pullrequestreview-5956522777). Originally posted by [Jazeupoi](https://github.com/Jazeupoi) on 2026-11-18T12:27:23Z. **Review:** COMMENTED --- Tested on NVIDIA, since the description's title runs are on AMD. **Setup:** Windows 11 Pro (build 26300), AMD Ryzen 5 3400G, NVIDIA GeForce RTX 2060 (driver 621.24), WinLibs GCC 15.2.0, Release. `main` `648ba19b3e` with #22373 (a test-build fix only), and the same tree with head `50749eb5fc` merged (clean). vkQuake PPSA99010 01.000.000 with the shareware `pak0.pak`, converted with `--windows --registry` by each build. `APS5_ASYNC_DRAW_COMPILE=1` and `APS5_PROFILE_DRAW=1` on both runs, AnyPS5's `shader_cache/` emptied before each run, no pad input, one run each with a 180 s cap. | | `main` | this PR | |---|---|---| | Presents | 12, all in the first seconds | 5,311 in 170 s | | Presents per 10 s | none after the start | 27, 128, then 263 to 430 | | End | the title exits by itself at 157 s (`exit: clean`, code 0 in the run report) | still rendering at 180 s, stopped by the cap | | On screen | black window | the level loads and plays | On `main` the log stops growing about 40 s in. An earlier run of the same `main` build without the switch ended the same way: 12 presents, `[gpu] worker at 44 s: dispatch 43.2 s`, then a clean exit at 47 s. So the PR also gets vkQuake past the large compute pipelines on NVIDIA's Windows driver. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-11-20 11:33:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T11:33:45Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the reviewed implementation has no verified blocking defects, and the supplied test and performance reports support its intended behavior.

What I ran

Reviewed head f8844e96787cdc7c3ab0ce97a023ddca388ee106 against the prepared diff.patch; no commands or tests were run. I read description.md, commits.md, manifest.json, and diff.patch, then inspected the changed dispatch path, pipeline key and queue lifecycle, prebuild pool submission, and related code in VulkanDevice.cpp and ShaderRegistry.cpp.

Results

Check Result Note
Diff and changed paths passed Reviewed all changed hunks
Targeted code review passed Queued work settles on success and failure
Tests and build not run Results in the PR description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not run tests, build the project, or verify the reported hardware runs, traces, or CI. The supplied review artifacts contain full text for every changed file except core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp; I inspected its changed hunks and targeted context using repo_read.py. files.json was not available as a review document; the changed-file listing confirms all eight changed paths, with only that large source file excluded from the full-text bundle.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5992021118 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21708#pullrequestreview-5992021118). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T11:33:45Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the reviewed implementation has no verified blocking defects, and the supplied test and performance reports support its intended behavior. ## What I ran Reviewed head `f8844e96787cdc7c3ab0ce97a023ddca388ee106` against the prepared `diff.patch`; no commands or tests were run. I read `description.md`, `commits.md`, `manifest.json`, and `diff.patch`, then inspected the changed dispatch path, pipeline key and queue lifecycle, prebuild pool submission, and related code in `VulkanDevice.cpp` and `ShaderRegistry.cpp`. ## Results | Check | Result | Note | |---|---|---| | Diff and changed paths | passed | Reviewed all changed hunks | | Targeted code review | passed | Queued work settles on success and failure | | Tests and build | not run | Results in the PR description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I did not run tests, build the project, or verify the reported hardware runs, traces, or CI. The supplied review artifacts contain full text for every changed file except `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`; I inspected its changed hunks and targeted context using `repo_read.py`. `files.json` was not available as a review document; the changed-file listing confirms all eight changed paths, with only that large source file excluded from the full-text bundle. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-21 06:38:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T06:38:49Z.

Review: COMMENTED


Reviewed — comments

Nothing blocks this change, but a correctness issue in the test setup should be addressed before relying on the reported failure-path coverage.

What I ran

Reviewed head cf2a368078e384580d09901ef335e85e0d083451 using the prepared review bundle and repo_read.py. No build or tests were run. The author reports Windows Vulkan tests, llvmpipe tests, and tools/check_conventions.py in the PR description; these were not run as part of this review.

Results

Check Result Note
Changed-file review passed All eight changed files read
Build and tests not run Author reports runs in the description

Findings

Blocking

None.

Non-blocking

  • AsyncDrawCompile.cpp:52 — CheckFailedBuildAhead() returns early when ComputePipelineAhead(failing) is Unavailable, which also skips the abandoned-queue case. This means the test can silently omit both checks on devices that cannot build ahead, while the PR description presents this test as covering failure-path cleanup. Consider reporting the test as skipped when ahead builds are unavailable, or splitting the abandonment check so its result is still exercised independently.

Not verified

  • No commands, build, or tests were run in this review.
  • The review bundle excluded no changed files. All eight changed files listed in the manifest were read; VulkanDevice.cpp was read through repo_read.py because its full text was not included in the bundle.
  • Hardware behavior and the author-reported performance measurements were not independently verified.

To get this to a good state

Nothing is required. The test coverage point above is optional.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6003564625 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21708#pullrequestreview-6003564625). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T06:38:49Z. **Review:** COMMENTED --- # Reviewed — comments Nothing blocks this change, but a correctness issue in the test setup should be addressed before relying on the reported failure-path coverage. ## What I ran Reviewed head `cf2a368078e384580d09901ef335e85e0d083451` using the prepared review bundle and `repo_read.py`. No build or tests were run. The author reports Windows Vulkan tests, llvmpipe tests, and `tools/check_conventions.py` in the PR description; these were not run as part of this review. ## Results | Check | Result | Note | |---|---|---| | Changed-file review | passed | All eight changed files read | | Build and tests | not run | Author reports runs in the description | ## Findings ### Blocking None. ### Non-blocking - `AsyncDrawCompile.cpp:52` — `CheckFailedBuildAhead()` returns early when `ComputePipelineAhead(failing)` is `Unavailable`, which also skips the abandoned-queue case. This means the test can silently omit both checks on devices that cannot build ahead, while the PR description presents this test as covering failure-path cleanup. Consider reporting the test as skipped when ahead builds are unavailable, or splitting the abandonment check so its result is still exercised independently. ## Not verified - No commands, build, or tests were run in this review. - The review bundle excluded no changed files. All eight changed files listed in the manifest were read; `VulkanDevice.cpp` was read through `repo_read.py` because its full text was not included in the bundle. - Hardware behavior and the author-reported performance measurements were not independently verified. ## To get this to a good state Nothing is required. The test coverage point above is optional.
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!21708
No description provided.