perf(shader): keep the BDA byte loops rolled #21131

Merged
Ketz7 merged 1 commit from upstream-pr/21131 into main 2026-11-16 14:46:04 +00:00
Ketz7 commented 2026-11-15 20:59:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ketz7 on 2026-11-15T20:59:48Z.


What

  • read_bda_dword_bytes* (the byte path of a guest read) and write_bda_bytes* (the byte path of a guest write) loop over the bytes of an access, and every iteration looks the byte up in the BDA range table. Both loops now carry DontUnroll; the code they run is unchanged.
  • AMD's Windows compiler (LLPC) unrolls these short loops. Because it also inlines every BDA helper (it ignores DontInline), each unrolled iteration gets its own copy of the range lookup, at every call site.
  • In vkQuake's ray-traced shadow compute shader (PPSA99010, program 0x20c60f400, 152,566 SPIR-V words), that makes the pipeline take over a minute to create on an RX 7900 XT. vkQuake shows no frame until it is done.
  • ShaderMemory's BDA read-function check and BdaContracts' runtime V# write check now fail if either loop loses DontUnroll.

Tested

  • How the loops were found: the shadow shader was captured with APS5_DUMP_COMPUTE_PIPELINES and edited by hand. Each variant was timed with agc_compute_pipeline_replay, with AMD's driver cache moved aside before every compile. The edited variants differ from the capture only in loop-control operands:
    • DontUnroll on all 18 loops of the BDA helpers: 26.1 s and 28.0 s, against 55.8 s and 53.4 s unchanged.
    • One group at a time against a 51.6 s control:
      • the byte loops: 26.9 s;
      • the lookups' single-pass loops: 49.8 s;
      • the range-table binary searches: 54.1 s;
      • note_bda_write's loop: 52.7 s;
      • the span read's dword loop alone: 52.4 s and 53.8 s.
  • In game, vkQuake (PPSA99010 1.0, r_rtshadows 1), AMD's driver cache moved aside, APS5_PROFILE_DRAW=1, the driver's line for the shadow pipeline:
    • main 7085a08145: [dispatch] created a pipeline for 152566 SPIR-V words in 100822 ms
    • this PR 3a78eef0e8: [dispatch] created a pipeline for 152566 SPIR-V words in 35475 ms
    • On both builds vkQuake exits with code 0 after this pipeline without presenting, which is unrelated to this change. It gives no summary line, and a summary window opens at the first present, after this compile, anyway.
  • Surround Sound Studio (PPSA99051 01.000.003), cold, one run each: on main the title exited by itself after 7.8 s with no present (guest-exit, exit code 1). On this PR it rendered (1,795 presents in 40 s). On this machine, main rendered that cold start in earlier runs too, so this is one observation, not a claim.
  • Warm frame times (Performance report form): Surround Sound Studio, 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: 16.678/16.917/17.009/17.110 ms on main and 16.678/16.926/16.997/17.064 ms here;
    • GPU busy per present: 5.352 ms and 5.409 ms, within run-to-run noise;
    • traces attached.
  • Vulkan tests with ANYPS5_REQUIRE_VULKAN=1, every test from agc_driver_bda_device_tests, agc_shader_memory_tests, agc_driver_graphics_tests, agc_rect_list_position_invariant_tests, agc_spirv_lds_atomic_lock_tests and agc_bda_atomics_tests:
    • AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Windows 11 Pro 26H2 (build 26300): 89 of 89 pass.
    • llvmpipe (Mesa) on Ubuntu 24.04: all 37 tests of the two changed test executables pass. Without the SpirvBdaRead.cpp change, the two new checks fail and name the unrolled loop.
  • tools/check_conventions.py passes.

main (7085a08145):

{"commit":"7085a08145ae","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":570,"ms":20003.322},"presents":1199,"frame_ms":{"p50":16.678,"p90":16.917,"p99":17.009,"max":17.110},"gpu_busy_ms_per_present":5.352,"worker_busy_pct":{"queue worker 0x0":4.573},"phase_totals_ms":{"Driver.Completion":1.074,"Driver.Draw":297.870,"Driver.Draw.device_setup":13.921,"Driver.Draw.draw_enqueued":34.952,"Driver.Draw.post_compile_prepare":1.455,"Driver.Draw.prepare":40.700,"Driver.Draw.shader_compile_and_link":202.452,"Driver.EndSubmission":1.323,"Driver.Packet":911.897,"Driver.Packet.device_lock":3.310,"Driver.Packet.draw":301.284,"Driver.Packet.execute":22.053,"Driver.Packet.flip_flush":74.124,"Driver.Packet.flush_between_packets":4.779,"Driver.Packet.pipeline_drain":465.526,"Driver.Packet.pipeline_prepare":5.504,"Driver.Packet.prepare_memory":6.115,"Driver.Present":1308.783,"Driver.Present.acquire_image":705.894,"Driver.Present.device_setup":0.669,"Driver.Present.gpu_mutex_wait":2.581,"Driver.Present.inflight_wait":3.202,"Driver.Present.present_display_buffer":172.375,"Driver.Present.queue_present":336.358,"Driver.Present.release_and_callback":1.175,"Driver.Present.render_fence_wait":82.715,"Driver.Present.resize":2.708,"Driver.Present.validate":0.462,"Driver.Suspend":0.379,"GpuMutex.wait.draw":0.000,"GpuMutex.wait.flush":0.025,"GpuMutex.wait.wait":0.732,"Graphics.Draw":757.981,"Graphics.Draw.draw_and_resource_release":732.487,"Graphics.Draw.index_upload":0.617,"Graphics.Draw.validate":18.938,"Graphics.Draw.vertex_upload":2.949,"Recorder.Reap":41.594,"Recorder.Submit":195.341,"Recorder.WaitSerial":20.803,"Resources.Complete":55.469,"Resources.Prepare":66.930,"Shader.DrawStage":171.948,"Shader.DrawStage.capture_resources":113.224,"Shader.DrawStage.materialize":30.070,"Shader.DrawStage.prepared_invocation":26.994,"VideoOut.Flip":18830.568,"VideoOut.Flip.completion_mutex_wait":1.107,"VideoOut.Flip.config_mutex_wait":0.114,"VideoOut.Flip.frame_limit":2.578,"VideoOut.Flip.notify_game":79.408,"VideoOut.Flip.present":1311.953,"VideoOut.Flip.validate":0.939,"VideoOut.Flip.vblank_wait":17391.445,"VideoOut.Flip.window_prepare":2.747,"VideoOut.Flip.window_title":53.929,"VideoOut.Readiness":1.728,"VideoOut.Readiness.locks_validate":0.425,"Vulkan.Acquire":704.556,"Vulkan.Acquire.acquire_fence_wait":610.827,"Vulkan.Acquire.acquire_image":89.233,"Vulkan.Acquire.fence_reset":2.245,"Vulkan.Acquire.retired_swapchains":1.769,"Vulkan.Present":95.801,"Vulkan.Present.command_record_scale":38.162,"Vulkan.Present.pixel_upload":2.399,"Vulkan.Present.queue_submit":54.388,"Vulkan.QueuePresent":334.409,"Vulkan.QueuePresent.queue_present":332.557,"Vulkan.Retire":82.677,"Vulkan.Retire.wait":74.684},"top_phases_ms_per_frame":{"VideoOut.Flip":15.705,"VideoOut.Flip.vblank_wait":14.505,"VideoOut.Flip.present":1.094,"Driver.Present":1.092,"Driver.Packet":0.761,"Graphics.Draw":0.632,"Graphics.Draw.draw_and_resource_release":0.611,"Driver.Present.acquire_image":0.589},"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-7085a08145ae-18568.json.gz"}

This PR (3a78eef0e8):

{"commit":"3a78eef0e890","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.383},"presents":1199,"frame_ms":{"p50":16.678,"p90":16.926,"p99":16.997,"max":17.064},"gpu_busy_ms_per_present":5.409,"worker_busy_pct":{"queue worker 0x0":4.449},"phase_totals_ms":{"Driver.Completion":1.028,"Driver.Draw":293.987,"Driver.Draw.device_setup":13.548,"Driver.Draw.draw_enqueued":34.574,"Driver.Draw.post_compile_prepare":1.491,"Driver.Draw.prepare":38.801,"Driver.Draw.shader_compile_and_link":201.156,"Driver.EndSubmission":1.200,"Driver.Packet":887.411,"Driver.Packet.device_lock":3.619,"Driver.Packet.draw":297.428,"Driver.Packet.execute":20.736,"Driver.Packet.flip_flush":73.850,"Driver.Packet.flush_between_packets":4.444,"Driver.Packet.pipeline_drain":447.383,"Driver.Packet.pipeline_prepare":5.077,"Driver.Packet.prepare_memory":5.723,"Driver.Present":1297.698,"Driver.Present.acquire_image":704.568,"Driver.Present.device_setup":0.607,"Driver.Present.gpu_mutex_wait":2.416,"Driver.Present.inflight_wait":3.425,"Driver.Present.present_display_buffer":171.870,"Driver.Present.queue_present":334.837,"Driver.Present.release_and_callback":1.114,"Driver.Present.render_fence_wait":75.262,"Driver.Present.resize":2.450,"Driver.Present.validate":0.536,"Driver.Suspend":0.364,"GpuMutex.wait.draw":0.001,"GpuMutex.wait.flush":0.034,"GpuMutex.wait.wait":0.551,"Graphics.Draw":747.132,"Graphics.Draw.draw_and_resource_release":721.094,"Graphics.Draw.index_upload":0.491,"Graphics.Draw.validate":19.383,"Graphics.Draw.vertex_upload":2.873,"Recorder.Reap":40.825,"Recorder.Submit":197.861,"Recorder.WaitSerial":17.163,"Resources.Complete":55.198,"Resources.Prepare":65.651,"Shader.DrawStage":171.887,"Shader.DrawStage.capture_resources":111.688,"Shader.DrawStage.materialize":31.384,"Shader.DrawStage.prepared_invocation":27.073,"VideoOut.Flip":18862.401,"VideoOut.Flip.completion_mutex_wait":1.088,"VideoOut.Flip.config_mutex_wait":0.104,"VideoOut.Flip.frame_limit":2.617,"VideoOut.Flip.notify_game":27.413,"VideoOut.Flip.present":1300.948,"VideoOut.Flip.validate":0.940,"VideoOut.Flip.vblank_wait":17486.982,"VideoOut.Flip.window_prepare":2.463,"VideoOut.Flip.window_title":54.085,"VideoOut.Readiness":1.872,"VideoOut.Readiness.locks_validate":0.437,"Vulkan.Acquire":703.288,"Vulkan.Acquire.acquire_fence_wait":611.288,"Vulkan.Acquire.acquire_image":87.474,"Vulkan.Acquire.fence_reset":2.308,"Vulkan.Acquire.retired_swapchains":1.728,"Vulkan.Present":95.638,"Vulkan.Present.command_record_scale":37.527,"Vulkan.Present.pixel_upload":2.413,"Vulkan.Present.queue_submit":54.844,"Vulkan.QueuePresent":332.928,"Vulkan.QueuePresent.queue_present":331.178,"Vulkan.Retire":75.179,"Vulkan.Retire.wait":67.242},"top_phases_ms_per_frame":{"VideoOut.Flip":15.732,"VideoOut.Flip.vblank_wait":14.585,"VideoOut.Flip.present":1.085,"Driver.Present":1.082,"Driver.Packet":0.740,"Graphics.Draw":0.623,"Graphics.Draw.draw_and_resource_release":0.601,"Driver.Present.acquire_image":0.588},"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-3a78eef0e890-27012.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: none (vkQuake still exits before its first present)
  • 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:5327137540 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21131). Originally posted by [Ketz7](https://github.com/Ketz7) on 2026-11-15T20:59:48Z. --- ### What - `read_bda_dword_bytes*` (the byte path of a guest read) and `write_bda_bytes*` (the byte path of a guest write) loop over the bytes of an access, and every iteration looks the byte up in the BDA range table. Both loops now carry `DontUnroll`; the code they run is unchanged. - AMD's Windows compiler (LLPC) unrolls these short loops. Because it also inlines every BDA helper (it ignores `DontInline`), each unrolled iteration gets its own copy of the range lookup, at every call site. - In vkQuake's ray-traced shadow compute shader (PPSA99010, program `0x20c60f400`, 152,566 SPIR-V words), that makes the pipeline take over a minute to create on an RX 7900 XT. vkQuake shows no frame until it is done. - `ShaderMemory`'s BDA read-function check and `BdaContracts`' runtime V# write check now fail if either loop loses `DontUnroll`. ### Tested - How the loops were found: the shadow shader was captured with `APS5_DUMP_COMPUTE_PIPELINES` and edited by hand. Each variant was timed with `agc_compute_pipeline_replay`, with AMD's driver cache moved aside before every compile. The edited variants differ from the capture only in loop-control operands: - `DontUnroll` on all 18 loops of the BDA helpers: 26.1 s and 28.0 s, against 55.8 s and 53.4 s unchanged. - One group at a time against a 51.6 s control: - the byte loops: 26.9 s; - the lookups' single-pass loops: 49.8 s; - the range-table binary searches: 54.1 s; - `note_bda_write`'s loop: 52.7 s; - the span read's dword loop alone: 52.4 s and 53.8 s. - In game, vkQuake (PPSA99010 1.0, `r_rtshadows 1`), AMD's driver cache moved aside, `APS5_PROFILE_DRAW=1`, the driver's line for the shadow pipeline: - `main` 7085a08145: `[dispatch] created a pipeline for 152566 SPIR-V words in 100822 ms` - this PR 3a78eef0e8: `[dispatch] created a pipeline for 152566 SPIR-V words in 35475 ms` - On both builds vkQuake exits with code 0 after this pipeline without presenting, which is unrelated to this change. It gives no summary line, and a summary window opens at the first present, after this compile, anyway. - Surround Sound Studio (PPSA99051 01.000.003), cold, one run each: on `main` the title exited by itself after 7.8 s with no present (`guest-exit`, exit code 1). On this PR it rendered (1,795 presents in 40 s). On this machine, `main` rendered that cold start in earlier runs too, so this is one observation, not a claim. - Warm frame times (Performance report form): Surround Sound Studio, 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: 16.678/16.917/17.009/17.110 ms on `main` and 16.678/16.926/16.997/17.064 ms here; - GPU busy per present: 5.352 ms and 5.409 ms, within run-to-run noise; - traces attached. - Vulkan tests with `ANYPS5_REQUIRE_VULKAN=1`, every test from `agc_driver_bda_device_tests`, `agc_shader_memory_tests`, `agc_driver_graphics_tests`, `agc_rect_list_position_invariant_tests`, `agc_spirv_lds_atomic_lock_tests` and `agc_bda_atomics_tests`: - AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Windows 11 Pro 26H2 (build 26300): 89 of 89 pass. - llvmpipe (Mesa) on Ubuntu 24.04: all 37 tests of the two changed test executables pass. Without the `SpirvBdaRead.cpp` change, the two new checks fail and name the unrolled loop. - `tools/check_conventions.py` passes. `main` (7085a08145): ```json {"commit":"7085a08145ae","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":570,"ms":20003.322},"presents":1199,"frame_ms":{"p50":16.678,"p90":16.917,"p99":17.009,"max":17.110},"gpu_busy_ms_per_present":5.352,"worker_busy_pct":{"queue worker 0x0":4.573},"phase_totals_ms":{"Driver.Completion":1.074,"Driver.Draw":297.870,"Driver.Draw.device_setup":13.921,"Driver.Draw.draw_enqueued":34.952,"Driver.Draw.post_compile_prepare":1.455,"Driver.Draw.prepare":40.700,"Driver.Draw.shader_compile_and_link":202.452,"Driver.EndSubmission":1.323,"Driver.Packet":911.897,"Driver.Packet.device_lock":3.310,"Driver.Packet.draw":301.284,"Driver.Packet.execute":22.053,"Driver.Packet.flip_flush":74.124,"Driver.Packet.flush_between_packets":4.779,"Driver.Packet.pipeline_drain":465.526,"Driver.Packet.pipeline_prepare":5.504,"Driver.Packet.prepare_memory":6.115,"Driver.Present":1308.783,"Driver.Present.acquire_image":705.894,"Driver.Present.device_setup":0.669,"Driver.Present.gpu_mutex_wait":2.581,"Driver.Present.inflight_wait":3.202,"Driver.Present.present_display_buffer":172.375,"Driver.Present.queue_present":336.358,"Driver.Present.release_and_callback":1.175,"Driver.Present.render_fence_wait":82.715,"Driver.Present.resize":2.708,"Driver.Present.validate":0.462,"Driver.Suspend":0.379,"GpuMutex.wait.draw":0.000,"GpuMutex.wait.flush":0.025,"GpuMutex.wait.wait":0.732,"Graphics.Draw":757.981,"Graphics.Draw.draw_and_resource_release":732.487,"Graphics.Draw.index_upload":0.617,"Graphics.Draw.validate":18.938,"Graphics.Draw.vertex_upload":2.949,"Recorder.Reap":41.594,"Recorder.Submit":195.341,"Recorder.WaitSerial":20.803,"Resources.Complete":55.469,"Resources.Prepare":66.930,"Shader.DrawStage":171.948,"Shader.DrawStage.capture_resources":113.224,"Shader.DrawStage.materialize":30.070,"Shader.DrawStage.prepared_invocation":26.994,"VideoOut.Flip":18830.568,"VideoOut.Flip.completion_mutex_wait":1.107,"VideoOut.Flip.config_mutex_wait":0.114,"VideoOut.Flip.frame_limit":2.578,"VideoOut.Flip.notify_game":79.408,"VideoOut.Flip.present":1311.953,"VideoOut.Flip.validate":0.939,"VideoOut.Flip.vblank_wait":17391.445,"VideoOut.Flip.window_prepare":2.747,"VideoOut.Flip.window_title":53.929,"VideoOut.Readiness":1.728,"VideoOut.Readiness.locks_validate":0.425,"Vulkan.Acquire":704.556,"Vulkan.Acquire.acquire_fence_wait":610.827,"Vulkan.Acquire.acquire_image":89.233,"Vulkan.Acquire.fence_reset":2.245,"Vulkan.Acquire.retired_swapchains":1.769,"Vulkan.Present":95.801,"Vulkan.Present.command_record_scale":38.162,"Vulkan.Present.pixel_upload":2.399,"Vulkan.Present.queue_submit":54.388,"Vulkan.QueuePresent":334.409,"Vulkan.QueuePresent.queue_present":332.557,"Vulkan.Retire":82.677,"Vulkan.Retire.wait":74.684},"top_phases_ms_per_frame":{"VideoOut.Flip":15.705,"VideoOut.Flip.vblank_wait":14.505,"VideoOut.Flip.present":1.094,"Driver.Present":1.092,"Driver.Packet":0.761,"Graphics.Draw":0.632,"Graphics.Draw.draw_and_resource_release":0.611,"Driver.Present.acquire_image":0.589},"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-7085a08145ae-18568.json.gz"} ``` This PR (3a78eef0e8): ```json {"commit":"3a78eef0e890","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.383},"presents":1199,"frame_ms":{"p50":16.678,"p90":16.926,"p99":16.997,"max":17.064},"gpu_busy_ms_per_present":5.409,"worker_busy_pct":{"queue worker 0x0":4.449},"phase_totals_ms":{"Driver.Completion":1.028,"Driver.Draw":293.987,"Driver.Draw.device_setup":13.548,"Driver.Draw.draw_enqueued":34.574,"Driver.Draw.post_compile_prepare":1.491,"Driver.Draw.prepare":38.801,"Driver.Draw.shader_compile_and_link":201.156,"Driver.EndSubmission":1.200,"Driver.Packet":887.411,"Driver.Packet.device_lock":3.619,"Driver.Packet.draw":297.428,"Driver.Packet.execute":20.736,"Driver.Packet.flip_flush":73.850,"Driver.Packet.flush_between_packets":4.444,"Driver.Packet.pipeline_drain":447.383,"Driver.Packet.pipeline_prepare":5.077,"Driver.Packet.prepare_memory":5.723,"Driver.Present":1297.698,"Driver.Present.acquire_image":704.568,"Driver.Present.device_setup":0.607,"Driver.Present.gpu_mutex_wait":2.416,"Driver.Present.inflight_wait":3.425,"Driver.Present.present_display_buffer":171.870,"Driver.Present.queue_present":334.837,"Driver.Present.release_and_callback":1.114,"Driver.Present.render_fence_wait":75.262,"Driver.Present.resize":2.450,"Driver.Present.validate":0.536,"Driver.Suspend":0.364,"GpuMutex.wait.draw":0.001,"GpuMutex.wait.flush":0.034,"GpuMutex.wait.wait":0.551,"Graphics.Draw":747.132,"Graphics.Draw.draw_and_resource_release":721.094,"Graphics.Draw.index_upload":0.491,"Graphics.Draw.validate":19.383,"Graphics.Draw.vertex_upload":2.873,"Recorder.Reap":40.825,"Recorder.Submit":197.861,"Recorder.WaitSerial":17.163,"Resources.Complete":55.198,"Resources.Prepare":65.651,"Shader.DrawStage":171.887,"Shader.DrawStage.capture_resources":111.688,"Shader.DrawStage.materialize":31.384,"Shader.DrawStage.prepared_invocation":27.073,"VideoOut.Flip":18862.401,"VideoOut.Flip.completion_mutex_wait":1.088,"VideoOut.Flip.config_mutex_wait":0.104,"VideoOut.Flip.frame_limit":2.617,"VideoOut.Flip.notify_game":27.413,"VideoOut.Flip.present":1300.948,"VideoOut.Flip.validate":0.940,"VideoOut.Flip.vblank_wait":17486.982,"VideoOut.Flip.window_prepare":2.463,"VideoOut.Flip.window_title":54.085,"VideoOut.Readiness":1.872,"VideoOut.Readiness.locks_validate":0.437,"Vulkan.Acquire":703.288,"Vulkan.Acquire.acquire_fence_wait":611.288,"Vulkan.Acquire.acquire_image":87.474,"Vulkan.Acquire.fence_reset":2.308,"Vulkan.Acquire.retired_swapchains":1.728,"Vulkan.Present":95.638,"Vulkan.Present.command_record_scale":37.527,"Vulkan.Present.pixel_upload":2.413,"Vulkan.Present.queue_submit":54.844,"Vulkan.QueuePresent":332.928,"Vulkan.QueuePresent.queue_present":331.178,"Vulkan.Retire":75.179,"Vulkan.Retire.wait":67.242},"top_phases_ms_per_frame":{"VideoOut.Flip":15.732,"VideoOut.Flip.vblank_wait":14.585,"VideoOut.Flip.present":1.085,"Driver.Present":1.082,"Driver.Packet":0.740,"Graphics.Draw":0.623,"Graphics.Draw.draw_and_resource_release":0.601,"Driver.Present.acquire_image":0.588},"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-3a78eef0e890-27012.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: none (vkQuake still exits before its first present) - [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-15 21:03:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T21:03:50Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the inspected code and author-reported checks support merging.

What I ran

Reviewed head 3a78eef0e890a78c2bd9cd19c8632e56ee01d7f0. No commands or tests were run in this review. The author reports Vulkan test runs and a conventions check in description.md; those results were not independently run here.

Results

Check Result Note
Diff and changed code passed Three changed files inspected
Tests in this review not run Author-reported results only
Runtime and performance claims not verified No independent captures

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full text of core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was excluded from the review folder because it was too large; only lines 10877–10990 around the changed code were read through the repository reader. The other changed files, core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp and core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp, were read in relevant ranges. No files from files.json were excluded; that path was not available in the review folder. No tests, performance captures, physical-console behavior, or author-reported results were independently verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5912924257 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21131#pullrequestreview-5912924257). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T21:03:50Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the inspected code and author-reported checks support merging. ## What I ran Reviewed head `3a78eef0e890a78c2bd9cd19c8632e56ee01d7f0`. No commands or tests were run in this review. The author reports Vulkan test runs and a conventions check in `description.md`; those results were not independently run here. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | Three changed files inspected | | Tests in this review | not run | Author-reported results only | | Runtime and performance claims | not verified | No independent captures | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full text of `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was excluded from the review folder because it was too large; only lines 10877–10990 around the changed code were read through the repository reader. The other changed files, `core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp` and `core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp`, were read in relevant ranges. No files from `files.json` were excluded; that path was not available in the review folder. No tests, performance captures, physical-console behavior, or author-reported results were independently verified. ## To get this to a good state Nothing is required.
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!21131
No description provided.