perf(shader): emit one wide store for multi-dword and 8-byte typed buffer stores #22071

Open
nicolasabosch wants to merge 7 commits from upstream-pr/22071 into main
nicolasabosch commented 2026-11-17 03:55:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nicolasabosch on 2026-11-17T03:55:09Z.


What

A compute shader's buffer_store_dwordx2/x4 was emitted as separate u32 stores, and a typed store of an 8- or 16-byte format (for example 16_16_16_16) or of a 4-byte format with several components as one store per component through the byte view.

When the V# base is dword aligned, the address is aligned to the store size, the V# is not swizzled and every word is inside the range, the words are now written with one u64, uvec4 or dword store through an aliased buffers_u64 / buffers_u32x4 view of the same binding. Every other lane takes the existing per-component path, chosen at run time, so out-of-bounds, misaligned and swizzled stores behave as before; the stored bytes are the same, no instruction semantics change.

  • Compute stages only; coherent, address-based (GPU descriptor) and x3 stores keep per-component stores, and loads are unchanged.
  • SpirvTarget::wideBufferStores is set when minStorageBufferOffsetAlignment is a multiple of 16; the u64 view also needs Int64. The flag is part of the shader cache key.
  • APS5_NO_WIDE_BUFFER_STORES=1 keeps the per-component stores; agc_shader_replay --wide-buffer-stores replays with the flag set.
  • The remaining gaps are recorded through a docs/dev/debt/changes fragment for shader.

A coherent dwordx2 store takes the 64-bit atomic path only when the module requires the atomic U64 view (bufferU64View), so the view an ordinary wide pair store creates on a target with Int64 but no Int64Atomics does not turn a later coherent pair store into a 64-bit atomic store. RequestSerializer writes wideBufferStores in request format 63 and reads it from 63 on, so a captured request replays with the wide stores it was compiled with; older captures read it as off, and agc_shader_replay --wide-buffer-stores stays for them. The format number is a placeholder for the maintainers to confirm against other open PRs that bump it.

agc_driver_buffer_wide_stores (45 cases, plus a dwordx2 store followed by a coherent one compiled for a target without Int64Atomics, which must emit no atomic store; dwordx2, dwordx3, dwordx4 and typed stores at aligned and unaligned offsets, strides and V# bases, with lanes partly or wholly past the records, and dwordx2 and dwordx4 stores over a swizzled V#, which must take the per-component path) compares the stored bytes with the expected ones, with the flag on and, as agc_driver_buffer_wide_stores_opt_out, off.

Tested

Windows 11 Pro, MinGW-w64 GCC (WinLibs), Release, no title. Focused tests passed (37/37 at 4cd14a81ed, with request_serializer_tests; 34/34 at d6d4d0c481 after merging main a72186d3cf; agc_shader_replay* included). With the coherent-pair gate reverted to checking only that the U64 view exists, the new case fails (a coherent dwordx2 store emitted an atomic store through the wide view on a target without Int64Atomics): agc_driver_buffer_wide_stores, agc_driver_buffer_wide_stores_opt_out, agc_driver_runtime_buffer_spans*, agc_driver_formatted_store*, agc_driver_runtime_formatted_store*, agc_driver_format_d16_store, agc_driver_tbuffer_format_d16, agc_driver_d16_memory, agc_driver_buffer_atomics*, agc_driver_buffer_atomic_unaligned, agc_formatted_buffer_byte_stores, agc_formatted_buffer_once and agc_shader_disk_cache, which checks that the flag changes the cache key.

Validation layer: the same tests on main (be4613dd73, the base before this branch was rebased) and on this branch with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1 through ctest -V (Khronos validation layer 1.4.363.1): every log shows Insert instance layer "VK_LAYER_KHRONOS_validation", none reports was not found but was requested by env var VK_INSTANCE_LAYERS, and neither run logs a VUID- error. agc_driver_buffer_wide_stores and its opt-out, with the swizzled-V# cases, were run again the same way at d6d4d0c481: no VUID- error. With the swizzle check removed from the wide-store condition, the dwordx2, swizzled V# case fails (the wide module's memory differs from the narrow module's).

Performance: one 60 s capture each with APS5_TRACE_SECONDS=660:60, same machine and session (NVIDIA GeForce RTX 4070 Laptop GPU, driver 616.92, Intel Core i9-14900HX, Windows 11 Pro 26300), warm shader caches, in the same scripted scene of EA SPORTS UFC 6 (PPSA23566, 01.004.000): the first practice fight of the tutorial ("LAND 5 PUNCHES"), reached through the menus with APS5_PAD_SCRIPT. Both builds are main 2a8a0d1fc3 plus the pad-script commit of #22064, which only injects the scripted input; that build is 241bfd31f250, the commit in the main summary line. The change build adds this PR's first commit on top (66ef00667064). The later review follow-up only drops duplicated address code from the per-component fallback and was not captured again.

main this change
summary line seconds 660:60 from present 11012: 55 presents, frame p50 1004.2 / p90 1086.4 / p99 5716.0 / max 5716.0 ms, GPU busy 288.6 ms per present seconds 660:60 from present 11801: 65 presents, frame p50 937.4 / p90 967.0 / p99 980.2 / max 980.2 ms, GPU busy 164.1 ms per present

GPU busy time per present falls by 43 % and presents rise by 18 %; the frame stays bound by queue 0 on the CPU, so frame time falls less than GPU time. Both traces report trace_dropped after the queue-worker event buffer fills; the summary lines are complete. Traces and trace_digest.py outputs: main: trace, digest; this change: trace, digest.

aps5-summary.jsonl lines

main:

{"commit":"241bfd31f250","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_PAD_SCRIPT":"<path>","APS5_TRACE_SECONDS":"660:60"},"gpu":"NVIDIA GeForce RTX 4070 Laptop GPU","driver":"NVIDIA 616.92","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-14900HX","cpu_threads":32,"memory_mib":32543,"title_id":"PPSA23566","title":"EA SPORTS™ UFC® 6","content_version":"01.004.000","resolution":"1920x1080","window":{"spec":"seconds 660:60","first_present":11012,"ms":60290.998},"presents":55,"frame_ms":{"p50":1004.223,"p90":1086.447,"p99":5716.009,"max":5716.009},"gpu_busy_ms_per_present":288.557,"worker_busy_pct":{"queue worker 0x0":98.497,"queue worker 0x29":9.422,"queue worker 0x2a":9.638,"queue worker 0x2b":9.261,"queue worker 0x2c":9.156,"queue worker 0x2d":9.287,"queue worker 0x2e":9.069,"queue worker 0x2f":9.205,"queue worker 0x28":14.485},"phase_totals_ms":{"Driver.Completion":1.369,"Driver.Dispatch":46604.504,"Driver.Dispatch.capture_resources":329.533,"Driver.Dispatch.decode_key_device_setup":1032.629,"Driver.Dispatch.lookup_cache":25.702,"Driver.Dispatch.materialize":85.816,"Driver.Dispatch.prepared_invocation":200.01,"Driver.Draw":43300.605,"Driver.Draw.device_setup":176.166,"Driver.Draw.draw_enqueued":39186.962,"Driver.Draw.post_compile_prepare":29.268,"Driver.Draw.prepare":542.715,"Driver.Draw.shader_compile_and_link":3092.764,"Driver.EndSubmission":131.14,"Driver.Packet":107197.022,"Driver.Packet.device_lock":90.675,"Driver.Packet.dispatch":46238.381,"Driver.Packet.draw":43359.308,"Driver.Packet.execute":4144.494,"Driver.Packet.flip_flush":1.678,"Driver.Packet.flush_between_packets":279.296,"Driver.Packet.memory_wait":12276.403,"Driver.Packet.pipeline_drain":135.683,"Driver.Packet.pipeline_prepare":119.436,"Driver.Packet.prepare_memory":147.483,"Driver.Packet.rendering_wait":0.044,"Driver.Present":160.045,"Driver.Present.acquire_image":0.671,"Driver.Present.device_setup":0.036,"Driver.Present.gpu_mutex_wait":0.397,"Driver.Present.inflight_wait":0.152,"Driver.Present.present_display_buffer":6.623,"Driver.Present.queue_present":23.361,"Driver.Present.release_and_callback":0.099,"Driver.Present.render_fence_wait":128.474,"Driver.Present.resize":0.17,"Driver.Present.validate":0.021,"Driver.Suspend":0.007,"GpuMutex.wait.dispatch":579.319,"GpuMutex.wait.draw":34467.577,"GpuMutex.wait.end":193.154,"GpuMutex.wait.fill":0.144,"GpuMutex.wait.flush":8.82,"GpuMutex.wait.hook":87.515,"GpuMutex.wait.indirect":1.69,"GpuMutex.wait.label":257.307,"GpuMutex.wait.other":17.339,"GpuMutex.wait.present":0.275,"GpuMutex.wait.wait":0.082,"Graphics.Draw":8776.731,"Graphics.Draw.draw_and_resource_release":8097.741,"Graphics.Draw.index_upload":349.797,"Graphics.Draw.validate":255.887,"Graphics.Draw.vertex_upload":30.893,"Graphics.DrawWithRecipe":24.054,"Graphics.DrawWithRecipe.draw_and_resource_release":23.52,"Graphics.DrawWithRecipe.index_upload":0.033,"Graphics.DrawWithRecipe.validate":0.247,"Graphics.DrawWithRecipe.vertex_upload":0.164,"Recorder.Reap":480.593,"Recorder.Submit":349.225,"Recorder.Sync":18536.37,"Recorder.WaitSerial":173.32,"Resources.Complete":41250.476,"Resources.Prepare":357.457,"Shader.DrawStage":2721.353,"Shader.DrawStage.capture_resources":1865.394,"Shader.DrawStage.materialize":529.432,"Shader.DrawStage.prepared_invocation":301.8,"Shader.PrepareArtifact":99.091,"Shader.ResolveAbi":11.236,"Shader.ResolveGraphicsAbi":15.284,"Shader.ResolveGraphicsStagesAbi":68.194,"VideoOut.Flip":162.068,"VideoOut.Flip.completion_mutex_wait":0.057,"VideoOut.Flip.config_mutex_wait":0.013,"VideoOut.Flip.frame_limit":0.049,"VideoOut.Flip.notify_game":0.773,"VideoOut.Flip.present":157.94,"VideoOut.Flip.validate":0.1,"VideoOut.Flip.vblank_wait":0.049,"VideoOut.Flip.window_prepare":0.107,"VideoOut.Flip.window_title":2.949,"VideoOut.Readiness":0.111,"VideoOut.Readiness.locks_validate":0.052,"Vulkan.Acquire":0.609,"Vulkan.Acquire.acquire_fence_wait":0.104,"Vulkan.Acquire.acquire_image":0.345,"Vulkan.Acquire.fence_reset":0.118,"Vulkan.Acquire.retired_swapchains":0.023,"Vulkan.ComputePipeline":1178.179,"Vulkan.Dispatch":41751.997,"Vulkan.Dispatch.command_record":302.137,"Vulkan.Dispatch.shader_resources":41440.951,"Vulkan.DispatchRecipe":49.353,"Vulkan.DispatchRecipe.command_record":49.075,"Vulkan.DrawFromRecipe":24.222,"Vulkan.GraphicsPipeline":3884.937,"Vulkan.GraphicsPipeline.create":3720.114,"Vulkan.GraphicsPipeline.modules_and_state":5.692,"Vulkan.GraphicsPipelineLibrary":3699.446,"Vulkan.GraphicsPipelineLink":0.068,"Vulkan.GraphicsPipelinePrebuild":160.695,"Vulkan.Present":5.044,"Vulkan.Present.command_record_scale":1.813,"Vulkan.Present.pixel_upload":0.189,"Vulkan.Present.queue_submit":3.0,"Vulkan.QueuePresent":23.274,"Vulkan.QueuePresent.queue_present":23.187,"Vulkan.Retire":128.451,"Vulkan.Retire.wait":127.082},"top_phases_ms_per_frame":{"Driver.Packet":1949.037,"Driver.Dispatch":847.355,"Driver.Packet.dispatch":840.698,"Driver.Packet.draw":788.351,"Driver.Draw":787.284,"Vulkan.Dispatch":759.127,"Vulkan.Dispatch.shader_resources":753.472,"Resources.Complete":750.009},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":275,"Graphics.Barrier.dispatch-lead":37292,"Graphics.Barrier.dispatch-trail":41021,"Graphics.Barrier.draw":63780,"Graphics.Barrier.fill":1370,"Graphics.Barrier.indirect-args":5775,"Graphics.Barrier.input-mirror":12722,"Graphics.Barrier.label-run":31300,"Graphics.Barrier.present-blit":110,"Graphics.Barrier.shadow-publish":2684,"Graphics.Barrier.staging-in":19227,"Graphics.Barrier.staging-out":10104,"Graphics.Barrier.storage-upload":6220,"Graphics.Barrier.storage-writeback":15193,"Graphics.Barrier.template-refresh":112,"Graphics.BarrierMerged.dispatch-lead":15279,"Graphics.BarrierMerged.fill":280,"Graphics.BarrierMerged.label-run":46,"Graphics.BarrierMerged.shadow-publish":2598,"Graphics.BarrierMerged.staging-in":12750,"Graphics.BarrierMerged.staging-out":10104,"Graphics.BarrierMerged.storage-writeback":5707,"Graphics.Copy":49189,"Graphics.Copy.bytes":4693849204,"Graphics.RenderPass":29821,"Graphics.RenderPass.Close.command":24136,"Graphics.RenderPass.Close.image":207,"Graphics.RenderPass.Close.key":694,"Graphics.RenderPass.Close.label":46,"Graphics.RenderPass.Close.new-batch":4738,"Graphics.RenderPass.Continued":214387},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":43.573,"events_lost":105056,"totals_full":false}},"trace":"aps5-trace-241bfd31f250-56360.json.gz"}

this change:

{"commit":"66ef00667064","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_PAD_SCRIPT":"<path>","APS5_TRACE_SECONDS":"660:60"},"gpu":"NVIDIA GeForce RTX 4070 Laptop GPU","driver":"NVIDIA 616.92","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-14900HX","cpu_threads":32,"memory_mib":32543,"title_id":"PPSA23566","title":"EA SPORTS™ UFC® 6","content_version":"01.004.000","resolution":"1920x1080","window":{"spec":"seconds 660:60","first_present":11801,"ms":60558.54},"presents":65,"frame_ms":{"p50":937.425,"p90":967.03,"p99":980.167,"max":980.167},"gpu_busy_ms_per_present":164.051,"worker_busy_pct":{"queue worker 0x0":98.72,"queue worker 0x29":10.24,"queue worker 0x2a":10.09,"queue worker 0x2b":10.123,"queue worker 0x2c":11.407,"queue worker 0x2d":10.265,"queue worker 0x2e":10.149,"queue worker 0x2f":10.101,"queue worker 0x28":10.158},"phase_totals_ms":{"Driver.Completion":1.972,"Driver.Dispatch":50955.571,"Driver.Dispatch.capture_resources":415.639,"Driver.Dispatch.decode_key_device_setup":449.622,"Driver.Dispatch.lookup_cache":40.855,"Driver.Dispatch.materialize":79.537,"Driver.Dispatch.prepared_invocation":52.062,"Driver.Draw":46951.387,"Driver.Draw.device_setup":211.049,"Driver.Draw.draw_enqueued":42460.126,"Driver.Draw.post_compile_prepare":36.679,"Driver.Draw.prepare":582.892,"Driver.Draw.shader_compile_and_link":3511.485,"Driver.EndSubmission":401.701,"Driver.Packet":109360.9,"Driver.Packet.device_lock":108.799,"Driver.Packet.dispatch":50440.604,"Driver.Packet.draw":47018.514,"Driver.Packet.execute":2833.148,"Driver.Packet.flip_flush":1.907,"Driver.Packet.flush_between_packets":316.659,"Driver.Packet.memory_wait":7462.847,"Driver.Packet.pipeline_drain":155.593,"Driver.Packet.pipeline_prepare":141.587,"Driver.Packet.prepare_memory":174.206,"Driver.Packet.rendering_wait":0.064,"Driver.Present":312.851,"Driver.Present.acquire_image":0.876,"Driver.Present.device_setup":0.042,"Driver.Present.gpu_mutex_wait":0.413,"Driver.Present.inflight_wait":0.2,"Driver.Present.present_display_buffer":8.068,"Driver.Present.queue_present":27.841,"Driver.Present.release_and_callback":0.121,"Driver.Present.render_fence_wait":275.071,"Driver.Present.resize":0.139,"Driver.Present.validate":0.027,"Driver.Suspend":0.007,"GpuMutex.wait.dispatch":709.219,"GpuMutex.wait.draw":40850.819,"GpuMutex.wait.end":332.594,"GpuMutex.wait.fill":0.231,"GpuMutex.wait.flush":5.754,"GpuMutex.wait.hook":26.684,"GpuMutex.wait.indirect":3.217,"GpuMutex.wait.label":236.945,"GpuMutex.wait.present":0.267,"GpuMutex.wait.wait":0.112,"Graphics.Draw":5660.539,"Graphics.Draw.draw_and_resource_release":4901.369,"Graphics.Draw.index_upload":359.071,"Graphics.Draw.validate":315.147,"Graphics.Draw.vertex_upload":34.523,"Graphics.DrawWithRecipe":26.853,"Graphics.DrawWithRecipe.draw_and_resource_release":26.246,"Graphics.DrawWithRecipe.index_upload":0.035,"Graphics.DrawWithRecipe.validate":0.263,"Graphics.DrawWithRecipe.vertex_upload":0.212,"Recorder.Reap":559.036,"Recorder.Submit":417.114,"Recorder.Sync":18089.566,"Recorder.WaitSerial":222.215,"Resources.Complete":46487.718,"Resources.Prepare":462.474,"Shader.DrawStage":3066.374,"Shader.DrawStage.capture_resources":2289.839,"Shader.DrawStage.materialize":460.314,"Shader.DrawStage.prepared_invocation":286.413,"Shader.ResolveAbi":3.528,"Shader.ResolveGraphicsAbi":1.692,"Shader.ResolveGraphicsStagesAbi":11.122,"VideoOut.Flip":313.549,"VideoOut.Flip.completion_mutex_wait":0.115,"VideoOut.Flip.config_mutex_wait":0.015,"VideoOut.Flip.frame_limit":0.041,"VideoOut.Flip.notify_game":1.042,"VideoOut.Flip.present":308.62,"VideoOut.Flip.validate":0.1,"VideoOut.Flip.vblank_wait":0.051,"VideoOut.Flip.window_prepare":0.127,"VideoOut.Flip.window_title":3.413,"VideoOut.Readiness":0.134,"VideoOut.Readiness.locks_validate":0.063,"Vulkan.Acquire":0.791,"Vulkan.Acquire.acquire_fence_wait":0.122,"Vulkan.Acquire.acquire_image":0.44,"Vulkan.Acquire.fence_reset":0.148,"Vulkan.Acquire.retired_swapchains":0.056,"Vulkan.Dispatch":47343.977,"Vulkan.Dispatch.command_record":361.553,"Vulkan.Dispatch.shader_resources":46970.296,"Vulkan.DispatchRecipe":61.777,"Vulkan.DispatchRecipe.command_record":61.477,"Vulkan.DrawFromRecipe":27.046,"Vulkan.Present":6.101,"Vulkan.Present.command_record_scale":2.255,"Vulkan.Present.pixel_upload":0.203,"Vulkan.Present.queue_submit":3.589,"Vulkan.QueuePresent":27.751,"Vulkan.QueuePresent.queue_present":27.636,"Vulkan.Retire":275.028,"Vulkan.Retire.wait":272.896},"top_phases_ms_per_frame":{"Driver.Packet":1682.475,"Driver.Dispatch":783.932,"Driver.Packet.dispatch":776.009,"Vulkan.Dispatch":728.369,"Driver.Packet.draw":723.362,"Vulkan.Dispatch.shader_resources":722.62,"Driver.Draw":722.329,"Resources.Complete":715.196},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":325,"Graphics.Barrier.dispatch-lead":39676,"Graphics.Barrier.dispatch-trail":49314,"Graphics.Barrier.draw":59282,"Graphics.Barrier.fill":1626,"Graphics.Barrier.indirect-args":7215,"Graphics.Barrier.input-mirror":6417,"Graphics.Barrier.label-run":28398,"Graphics.Barrier.present-blit":130,"Graphics.Barrier.shadow-publish":2695,"Graphics.Barrier.staging-in":37189,"Graphics.Barrier.staging-out":17370,"Graphics.Barrier.storage-upload":6370,"Graphics.Barrier.storage-writeback":13643,"Graphics.Barrier.template-refresh":82,"Graphics.BarrierMerged.dispatch-lead":24068,"Graphics.BarrierMerged.fill":324,"Graphics.BarrierMerged.label-run":143,"Graphics.BarrierMerged.shadow-publish":2675,"Graphics.BarrierMerged.staging-in":24242,"Graphics.BarrierMerged.staging-out":17370,"Graphics.BarrierMerged.storage-writeback":5366,"Graphics.Copy":74641,"Graphics.Copy.bytes":8326194579,"Graphics.RenderPass":27283,"Graphics.RenderPass.Close.command":20235,"Graphics.RenderPass.Close.image":187,"Graphics.RenderPass.Close.key":916,"Graphics.RenderPass.Close.label":143,"Graphics.RenderPass.Close.new-batch":5802,"Graphics.RenderPass.Continued":270578},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":35.459,"events_lost":179084,"totals_full":false}},"trace":"aps5-trace-66ef00667064-2764.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
  • GPUs tested: NVIDIA GeForce RTX 4070 Laptop GPU, driver 616.92, Windows 11 Pro 26300
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5350291540 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22071). Originally posted by [nicolasabosch](https://github.com/nicolasabosch) on 2026-11-17T03:55:09Z. --- ### What A compute shader's `buffer_store_dwordx2`/`x4` was emitted as separate `u32` stores, and a typed store of an 8- or 16-byte format (for example 16_16_16_16) or of a 4-byte format with several components as one store per component through the byte view. When the V# base is dword aligned, the address is aligned to the store size, the V# is not swizzled and every word is inside the range, the words are now written with one `u64`, `uvec4` or dword store through an aliased `buffers_u64` / `buffers_u32x4` view of the same binding. Every other lane takes the existing per-component path, chosen at run time, so out-of-bounds, misaligned and swizzled stores behave as before; the stored bytes are the same, no instruction semantics change. - Compute stages only; coherent, address-based (GPU descriptor) and `x3` stores keep per-component stores, and loads are unchanged. - `SpirvTarget::wideBufferStores` is set when `minStorageBufferOffsetAlignment` is a multiple of 16; the `u64` view also needs `Int64`. The flag is part of the shader cache key. - `APS5_NO_WIDE_BUFFER_STORES=1` keeps the per-component stores; `agc_shader_replay --wide-buffer-stores` replays with the flag set. - The remaining gaps are recorded through a `docs/dev/debt/changes` fragment for `shader`. A coherent `dwordx2` store takes the 64-bit atomic path only when the module requires the atomic U64 view (`bufferU64View`), so the view an ordinary wide pair store creates on a target with `Int64` but no `Int64Atomics` does not turn a later coherent pair store into a 64-bit atomic store. `RequestSerializer` writes `wideBufferStores` in request format 63 and reads it from 63 on, so a captured request replays with the wide stores it was compiled with; older captures read it as off, and `agc_shader_replay --wide-buffer-stores` stays for them. The format number is a placeholder for the maintainers to confirm against other open PRs that bump it. `agc_driver_buffer_wide_stores` (45 cases, plus a `dwordx2` store followed by a coherent one compiled for a target without `Int64Atomics`, which must emit no atomic store; `dwordx2`, `dwordx3`, `dwordx4` and typed stores at aligned and unaligned offsets, strides and V# bases, with lanes partly or wholly past the records, and `dwordx2` and `dwordx4` stores over a swizzled V#, which must take the per-component path) compares the stored bytes with the expected ones, with the flag on and, as `agc_driver_buffer_wide_stores_opt_out`, off. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11 Pro, MinGW-w64 GCC (WinLibs), Release, no title. Focused tests passed (37/37 at 4cd14a81ed1, with `request_serializer_tests`; 34/34 at d6d4d0c481b after merging `main` a72186d3cfd; `agc_shader_replay*` included). With the coherent-pair gate reverted to checking only that the U64 view exists, the new case fails (`a coherent dwordx2 store emitted an atomic store through the wide view on a target without Int64Atomics`): `agc_driver_buffer_wide_stores`, `agc_driver_buffer_wide_stores_opt_out`, `agc_driver_runtime_buffer_spans*`, `agc_driver_formatted_store*`, `agc_driver_runtime_formatted_store*`, `agc_driver_format_d16_store`, `agc_driver_tbuffer_format_d16`, `agc_driver_d16_memory`, `agc_driver_buffer_atomics*`, `agc_driver_buffer_atomic_unaligned`, `agc_formatted_buffer_byte_stores`, `agc_formatted_buffer_once` and `agc_shader_disk_cache`, which checks that the flag changes the cache key. Validation layer: the same tests on `main` (be4613dd73, the base before this branch was rebased) and on this branch with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1` through `ctest -V` (Khronos validation layer 1.4.363.1): every log shows `Insert instance layer "VK_LAYER_KHRONOS_validation"`, none reports `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither run logs a `VUID-` error. `agc_driver_buffer_wide_stores` and its opt-out, with the swizzled-V# cases, were run again the same way at d6d4d0c481b: no `VUID-` error. With the swizzle check removed from the wide-store condition, the `dwordx2, swizzled V#` case fails (`the wide module's memory differs from the narrow module's`). Performance: one 60 s capture each with `APS5_TRACE_SECONDS=660:60`, same machine and session (NVIDIA GeForce RTX 4070 Laptop GPU, driver 616.92, Intel Core i9-14900HX, Windows 11 Pro 26300), warm shader caches, in the same scripted scene of EA SPORTS UFC 6 (PPSA23566, 01.004.000): the first practice fight of the tutorial ("LAND 5 PUNCHES"), reached through the menus with `APS5_PAD_SCRIPT`. Both builds are `main` 2a8a0d1fc33 plus the pad-script commit of #22064, which only injects the scripted input; that build is 241bfd31f250, the commit in the `main` summary line. The change build adds this PR's first commit on top (66ef00667064). The later review follow-up only drops duplicated address code from the per-component fallback and was not captured again. | | `main` | this change | | --- | ---: | ---: | | summary line | `seconds 660:60 from present 11012: 55 presents, frame p50 1004.2 / p90 1086.4 / p99 5716.0 / max 5716.0 ms, GPU busy 288.6 ms per present` | `seconds 660:60 from present 11801: 65 presents, frame p50 937.4 / p90 967.0 / p99 980.2 / max 980.2 ms, GPU busy 164.1 ms per present` | GPU busy time per present falls by 43 % and presents rise by 18 %; the frame stays bound by queue 0 on the CPU, so frame time falls less than GPU time. Both traces report `trace_dropped` after the queue-worker event buffer fills; the summary lines are complete. Traces and `trace_digest.py` outputs: `main`: [trace](https://github.com/nicolasabosch/AnyPS5/releases/download/perf-traces-2026-11-17/main-m1.json.gz), [digest](https://github.com/nicolasabosch/AnyPS5/releases/download/perf-traces-2026-11-17/main-m1.digest.md); this change: [trace](https://github.com/nicolasabosch/AnyPS5/releases/download/perf-traces-2026-11-17/wide-m1.json.gz), [digest](https://github.com/nicolasabosch/AnyPS5/releases/download/perf-traces-2026-11-17/wide-m1.digest.md). <details><summary><code>aps5-summary.jsonl</code> lines</summary> main: ```json {"commit":"241bfd31f250","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_PAD_SCRIPT":"<path>","APS5_TRACE_SECONDS":"660:60"},"gpu":"NVIDIA GeForce RTX 4070 Laptop GPU","driver":"NVIDIA 616.92","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-14900HX","cpu_threads":32,"memory_mib":32543,"title_id":"PPSA23566","title":"EA SPORTS™ UFC® 6","content_version":"01.004.000","resolution":"1920x1080","window":{"spec":"seconds 660:60","first_present":11012,"ms":60290.998},"presents":55,"frame_ms":{"p50":1004.223,"p90":1086.447,"p99":5716.009,"max":5716.009},"gpu_busy_ms_per_present":288.557,"worker_busy_pct":{"queue worker 0x0":98.497,"queue worker 0x29":9.422,"queue worker 0x2a":9.638,"queue worker 0x2b":9.261,"queue worker 0x2c":9.156,"queue worker 0x2d":9.287,"queue worker 0x2e":9.069,"queue worker 0x2f":9.205,"queue worker 0x28":14.485},"phase_totals_ms":{"Driver.Completion":1.369,"Driver.Dispatch":46604.504,"Driver.Dispatch.capture_resources":329.533,"Driver.Dispatch.decode_key_device_setup":1032.629,"Driver.Dispatch.lookup_cache":25.702,"Driver.Dispatch.materialize":85.816,"Driver.Dispatch.prepared_invocation":200.01,"Driver.Draw":43300.605,"Driver.Draw.device_setup":176.166,"Driver.Draw.draw_enqueued":39186.962,"Driver.Draw.post_compile_prepare":29.268,"Driver.Draw.prepare":542.715,"Driver.Draw.shader_compile_and_link":3092.764,"Driver.EndSubmission":131.14,"Driver.Packet":107197.022,"Driver.Packet.device_lock":90.675,"Driver.Packet.dispatch":46238.381,"Driver.Packet.draw":43359.308,"Driver.Packet.execute":4144.494,"Driver.Packet.flip_flush":1.678,"Driver.Packet.flush_between_packets":279.296,"Driver.Packet.memory_wait":12276.403,"Driver.Packet.pipeline_drain":135.683,"Driver.Packet.pipeline_prepare":119.436,"Driver.Packet.prepare_memory":147.483,"Driver.Packet.rendering_wait":0.044,"Driver.Present":160.045,"Driver.Present.acquire_image":0.671,"Driver.Present.device_setup":0.036,"Driver.Present.gpu_mutex_wait":0.397,"Driver.Present.inflight_wait":0.152,"Driver.Present.present_display_buffer":6.623,"Driver.Present.queue_present":23.361,"Driver.Present.release_and_callback":0.099,"Driver.Present.render_fence_wait":128.474,"Driver.Present.resize":0.17,"Driver.Present.validate":0.021,"Driver.Suspend":0.007,"GpuMutex.wait.dispatch":579.319,"GpuMutex.wait.draw":34467.577,"GpuMutex.wait.end":193.154,"GpuMutex.wait.fill":0.144,"GpuMutex.wait.flush":8.82,"GpuMutex.wait.hook":87.515,"GpuMutex.wait.indirect":1.69,"GpuMutex.wait.label":257.307,"GpuMutex.wait.other":17.339,"GpuMutex.wait.present":0.275,"GpuMutex.wait.wait":0.082,"Graphics.Draw":8776.731,"Graphics.Draw.draw_and_resource_release":8097.741,"Graphics.Draw.index_upload":349.797,"Graphics.Draw.validate":255.887,"Graphics.Draw.vertex_upload":30.893,"Graphics.DrawWithRecipe":24.054,"Graphics.DrawWithRecipe.draw_and_resource_release":23.52,"Graphics.DrawWithRecipe.index_upload":0.033,"Graphics.DrawWithRecipe.validate":0.247,"Graphics.DrawWithRecipe.vertex_upload":0.164,"Recorder.Reap":480.593,"Recorder.Submit":349.225,"Recorder.Sync":18536.37,"Recorder.WaitSerial":173.32,"Resources.Complete":41250.476,"Resources.Prepare":357.457,"Shader.DrawStage":2721.353,"Shader.DrawStage.capture_resources":1865.394,"Shader.DrawStage.materialize":529.432,"Shader.DrawStage.prepared_invocation":301.8,"Shader.PrepareArtifact":99.091,"Shader.ResolveAbi":11.236,"Shader.ResolveGraphicsAbi":15.284,"Shader.ResolveGraphicsStagesAbi":68.194,"VideoOut.Flip":162.068,"VideoOut.Flip.completion_mutex_wait":0.057,"VideoOut.Flip.config_mutex_wait":0.013,"VideoOut.Flip.frame_limit":0.049,"VideoOut.Flip.notify_game":0.773,"VideoOut.Flip.present":157.94,"VideoOut.Flip.validate":0.1,"VideoOut.Flip.vblank_wait":0.049,"VideoOut.Flip.window_prepare":0.107,"VideoOut.Flip.window_title":2.949,"VideoOut.Readiness":0.111,"VideoOut.Readiness.locks_validate":0.052,"Vulkan.Acquire":0.609,"Vulkan.Acquire.acquire_fence_wait":0.104,"Vulkan.Acquire.acquire_image":0.345,"Vulkan.Acquire.fence_reset":0.118,"Vulkan.Acquire.retired_swapchains":0.023,"Vulkan.ComputePipeline":1178.179,"Vulkan.Dispatch":41751.997,"Vulkan.Dispatch.command_record":302.137,"Vulkan.Dispatch.shader_resources":41440.951,"Vulkan.DispatchRecipe":49.353,"Vulkan.DispatchRecipe.command_record":49.075,"Vulkan.DrawFromRecipe":24.222,"Vulkan.GraphicsPipeline":3884.937,"Vulkan.GraphicsPipeline.create":3720.114,"Vulkan.GraphicsPipeline.modules_and_state":5.692,"Vulkan.GraphicsPipelineLibrary":3699.446,"Vulkan.GraphicsPipelineLink":0.068,"Vulkan.GraphicsPipelinePrebuild":160.695,"Vulkan.Present":5.044,"Vulkan.Present.command_record_scale":1.813,"Vulkan.Present.pixel_upload":0.189,"Vulkan.Present.queue_submit":3.0,"Vulkan.QueuePresent":23.274,"Vulkan.QueuePresent.queue_present":23.187,"Vulkan.Retire":128.451,"Vulkan.Retire.wait":127.082},"top_phases_ms_per_frame":{"Driver.Packet":1949.037,"Driver.Dispatch":847.355,"Driver.Packet.dispatch":840.698,"Driver.Packet.draw":788.351,"Driver.Draw":787.284,"Vulkan.Dispatch":759.127,"Vulkan.Dispatch.shader_resources":753.472,"Resources.Complete":750.009},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":275,"Graphics.Barrier.dispatch-lead":37292,"Graphics.Barrier.dispatch-trail":41021,"Graphics.Barrier.draw":63780,"Graphics.Barrier.fill":1370,"Graphics.Barrier.indirect-args":5775,"Graphics.Barrier.input-mirror":12722,"Graphics.Barrier.label-run":31300,"Graphics.Barrier.present-blit":110,"Graphics.Barrier.shadow-publish":2684,"Graphics.Barrier.staging-in":19227,"Graphics.Barrier.staging-out":10104,"Graphics.Barrier.storage-upload":6220,"Graphics.Barrier.storage-writeback":15193,"Graphics.Barrier.template-refresh":112,"Graphics.BarrierMerged.dispatch-lead":15279,"Graphics.BarrierMerged.fill":280,"Graphics.BarrierMerged.label-run":46,"Graphics.BarrierMerged.shadow-publish":2598,"Graphics.BarrierMerged.staging-in":12750,"Graphics.BarrierMerged.staging-out":10104,"Graphics.BarrierMerged.storage-writeback":5707,"Graphics.Copy":49189,"Graphics.Copy.bytes":4693849204,"Graphics.RenderPass":29821,"Graphics.RenderPass.Close.command":24136,"Graphics.RenderPass.Close.image":207,"Graphics.RenderPass.Close.key":694,"Graphics.RenderPass.Close.label":46,"Graphics.RenderPass.Close.new-batch":4738,"Graphics.RenderPass.Continued":214387},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":43.573,"events_lost":105056,"totals_full":false}},"trace":"aps5-trace-241bfd31f250-56360.json.gz"} ``` this change: ```json {"commit":"66ef00667064","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_PAD_SCRIPT":"<path>","APS5_TRACE_SECONDS":"660:60"},"gpu":"NVIDIA GeForce RTX 4070 Laptop GPU","driver":"NVIDIA 616.92","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-14900HX","cpu_threads":32,"memory_mib":32543,"title_id":"PPSA23566","title":"EA SPORTS™ UFC® 6","content_version":"01.004.000","resolution":"1920x1080","window":{"spec":"seconds 660:60","first_present":11801,"ms":60558.54},"presents":65,"frame_ms":{"p50":937.425,"p90":967.03,"p99":980.167,"max":980.167},"gpu_busy_ms_per_present":164.051,"worker_busy_pct":{"queue worker 0x0":98.72,"queue worker 0x29":10.24,"queue worker 0x2a":10.09,"queue worker 0x2b":10.123,"queue worker 0x2c":11.407,"queue worker 0x2d":10.265,"queue worker 0x2e":10.149,"queue worker 0x2f":10.101,"queue worker 0x28":10.158},"phase_totals_ms":{"Driver.Completion":1.972,"Driver.Dispatch":50955.571,"Driver.Dispatch.capture_resources":415.639,"Driver.Dispatch.decode_key_device_setup":449.622,"Driver.Dispatch.lookup_cache":40.855,"Driver.Dispatch.materialize":79.537,"Driver.Dispatch.prepared_invocation":52.062,"Driver.Draw":46951.387,"Driver.Draw.device_setup":211.049,"Driver.Draw.draw_enqueued":42460.126,"Driver.Draw.post_compile_prepare":36.679,"Driver.Draw.prepare":582.892,"Driver.Draw.shader_compile_and_link":3511.485,"Driver.EndSubmission":401.701,"Driver.Packet":109360.9,"Driver.Packet.device_lock":108.799,"Driver.Packet.dispatch":50440.604,"Driver.Packet.draw":47018.514,"Driver.Packet.execute":2833.148,"Driver.Packet.flip_flush":1.907,"Driver.Packet.flush_between_packets":316.659,"Driver.Packet.memory_wait":7462.847,"Driver.Packet.pipeline_drain":155.593,"Driver.Packet.pipeline_prepare":141.587,"Driver.Packet.prepare_memory":174.206,"Driver.Packet.rendering_wait":0.064,"Driver.Present":312.851,"Driver.Present.acquire_image":0.876,"Driver.Present.device_setup":0.042,"Driver.Present.gpu_mutex_wait":0.413,"Driver.Present.inflight_wait":0.2,"Driver.Present.present_display_buffer":8.068,"Driver.Present.queue_present":27.841,"Driver.Present.release_and_callback":0.121,"Driver.Present.render_fence_wait":275.071,"Driver.Present.resize":0.139,"Driver.Present.validate":0.027,"Driver.Suspend":0.007,"GpuMutex.wait.dispatch":709.219,"GpuMutex.wait.draw":40850.819,"GpuMutex.wait.end":332.594,"GpuMutex.wait.fill":0.231,"GpuMutex.wait.flush":5.754,"GpuMutex.wait.hook":26.684,"GpuMutex.wait.indirect":3.217,"GpuMutex.wait.label":236.945,"GpuMutex.wait.present":0.267,"GpuMutex.wait.wait":0.112,"Graphics.Draw":5660.539,"Graphics.Draw.draw_and_resource_release":4901.369,"Graphics.Draw.index_upload":359.071,"Graphics.Draw.validate":315.147,"Graphics.Draw.vertex_upload":34.523,"Graphics.DrawWithRecipe":26.853,"Graphics.DrawWithRecipe.draw_and_resource_release":26.246,"Graphics.DrawWithRecipe.index_upload":0.035,"Graphics.DrawWithRecipe.validate":0.263,"Graphics.DrawWithRecipe.vertex_upload":0.212,"Recorder.Reap":559.036,"Recorder.Submit":417.114,"Recorder.Sync":18089.566,"Recorder.WaitSerial":222.215,"Resources.Complete":46487.718,"Resources.Prepare":462.474,"Shader.DrawStage":3066.374,"Shader.DrawStage.capture_resources":2289.839,"Shader.DrawStage.materialize":460.314,"Shader.DrawStage.prepared_invocation":286.413,"Shader.ResolveAbi":3.528,"Shader.ResolveGraphicsAbi":1.692,"Shader.ResolveGraphicsStagesAbi":11.122,"VideoOut.Flip":313.549,"VideoOut.Flip.completion_mutex_wait":0.115,"VideoOut.Flip.config_mutex_wait":0.015,"VideoOut.Flip.frame_limit":0.041,"VideoOut.Flip.notify_game":1.042,"VideoOut.Flip.present":308.62,"VideoOut.Flip.validate":0.1,"VideoOut.Flip.vblank_wait":0.051,"VideoOut.Flip.window_prepare":0.127,"VideoOut.Flip.window_title":3.413,"VideoOut.Readiness":0.134,"VideoOut.Readiness.locks_validate":0.063,"Vulkan.Acquire":0.791,"Vulkan.Acquire.acquire_fence_wait":0.122,"Vulkan.Acquire.acquire_image":0.44,"Vulkan.Acquire.fence_reset":0.148,"Vulkan.Acquire.retired_swapchains":0.056,"Vulkan.Dispatch":47343.977,"Vulkan.Dispatch.command_record":361.553,"Vulkan.Dispatch.shader_resources":46970.296,"Vulkan.DispatchRecipe":61.777,"Vulkan.DispatchRecipe.command_record":61.477,"Vulkan.DrawFromRecipe":27.046,"Vulkan.Present":6.101,"Vulkan.Present.command_record_scale":2.255,"Vulkan.Present.pixel_upload":0.203,"Vulkan.Present.queue_submit":3.589,"Vulkan.QueuePresent":27.751,"Vulkan.QueuePresent.queue_present":27.636,"Vulkan.Retire":275.028,"Vulkan.Retire.wait":272.896},"top_phases_ms_per_frame":{"Driver.Packet":1682.475,"Driver.Dispatch":783.932,"Driver.Packet.dispatch":776.009,"Vulkan.Dispatch":728.369,"Driver.Packet.draw":723.362,"Vulkan.Dispatch.shader_resources":722.62,"Driver.Draw":722.329,"Resources.Complete":715.196},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":325,"Graphics.Barrier.dispatch-lead":39676,"Graphics.Barrier.dispatch-trail":49314,"Graphics.Barrier.draw":59282,"Graphics.Barrier.fill":1626,"Graphics.Barrier.indirect-args":7215,"Graphics.Barrier.input-mirror":6417,"Graphics.Barrier.label-run":28398,"Graphics.Barrier.present-blit":130,"Graphics.Barrier.shadow-publish":2695,"Graphics.Barrier.staging-in":37189,"Graphics.Barrier.staging-out":17370,"Graphics.Barrier.storage-upload":6370,"Graphics.Barrier.storage-writeback":13643,"Graphics.Barrier.template-refresh":82,"Graphics.BarrierMerged.dispatch-lead":24068,"Graphics.BarrierMerged.fill":324,"Graphics.BarrierMerged.label-run":143,"Graphics.BarrierMerged.shadow-publish":2675,"Graphics.BarrierMerged.staging-in":24242,"Graphics.BarrierMerged.staging-out":17370,"Graphics.BarrierMerged.storage-writeback":5366,"Graphics.Copy":74641,"Graphics.Copy.bytes":8326194579,"Graphics.RenderPass":27283,"Graphics.RenderPass.Close.command":20235,"Graphics.RenderPass.Close.image":187,"Graphics.RenderPass.Close.key":916,"Graphics.RenderPass.Close.label":143,"Graphics.RenderPass.Close.new-batch":5802,"Graphics.RenderPass.Continued":270578},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":35.459,"events_lost":179084,"totals_full":false}},"trace":"aps5-trace-66ef00667064-2764.json.gz"} ``` </details> ### 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 - [x] GPUs tested: NVIDIA GeForce RTX 4070 Laptop GPU, driver 616.92, Windows 11 Pro 26300 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-17 04:29:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T04:29:49Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head reviewed: cb396cfa72bdce0b83137eac68413ba0c30a2a52, base main.
  • Read the description, commit list, manifest, file list and every changed hunk in the diff.
  • Read the house sections: Readable reviews, Standard PR response format, Accuracy and evidence, Approval rules.
  • Checked the head through the reader only; no build or test was run.
Reader commands
python3 repo_read.py search buffer_wide_stores
python3 repo_read.py search bufferU64View
python3 repo_read.py search TargetHasCapability
python3 repo_read.py search buffer_atomic_unaligned
python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp 1190 1235
python3 repo_read.py search directWordIndex
python3 repo_read.py search "_tests.cmake" core/libs/prx/libSceAgcDriver
python3 repo_read.py search GLOB core/libs/prx/libSceAgcDriver
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/CMakeLists.txt 695 730
python3 repo_read.py search coherentBufferAlias
python3 repo_read.py search "const auto contiguous"
python3 repo_read.py search "RuntimeAddress, 4> accesses"
python3 repo_read.py search std::nullopt core/libs/prx/libSceAgcDriver/tests/execution/BufferWideStores.cpp
python3 repo_read.py search "wideBufferStores = limits" core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

Results

Check Result Note
Changed hunks read passed 17 of 17 listed files
Head context passed Partial, see Not verified
Build and unit tests not run Author-reported only
Hosted required checks not run Status not read
Performance figures not run Author-reported only

Findings

Blocking

None. The widening conditions match the description: unswizzled V#, aligned address, every word in range, and other lanes keep the per-component path. Stores with x3, coherent, GPU-descriptor or graphics-stage access are left unchanged. The new test and its opt-out fragment are picked up by the existing globs.

Non-blocking

  • core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp:414: the swizzled-V# check has no case in BufferWideStores.cpp. The debt fragment lists a swizzled-V# case as still open.
  • core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp:1211: when wideStore returns nothing, the dword path has already computed accesses, and writeComponents computes the same addresses again. The emitted module carries the duplicate address code.
  • core/libs/prx/libSceAgcDriver/tests/execution/BufferWideStores.cpp:211: the test uses std::nullopt and std::size without <optional> or <iterator>. Whether it compiles without them is not verified.

Not verified

  • Build and test runs: none were run here. The 32/32 focused tests, the validation-layer runs and the opt-out run are author-reported.
  • Performance: the figures come from one laptop GPU (RTX 4070 Laptop, driver 616.92). The traces were not fetched. The description names three main commits that do not agree: be4613dd73 (validation), 2a8a0d1fc33 (performance) and 241bfd31f250 (summary line). Which base produced the numbers is unclear.
  • The debt fragment says "AMD reports 4" for minStorageBufferOffsetAlignment. Not verified.
  • Hosted required checks for this head were not read.
  • core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp is too large for the review folder. I read its changed line (4749) through the reader and its diff hunk only.
  • Helpers used by BufferWideStores.cpp (Require, OpenVulkanTestDevice, the RecompileRequest layout, the includes) were not read.
  • The files in files/ were not opened, so no whole file was read.

Checked by reading: core/libs/prx/libSceAgcDriver/CMakeLists.txt:695 and :819 glob tests/execution/*.cpp and tests/cmake/*.cmake, so the new names resolve. The test has 43 cases, as the description says. The markBufferAliased guard matches the conditions that create the variables (core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp:524-525).

To get this to a good state

Nothing is required.

The event stays COMMENT: approval needs the hosted checks for this head to have passed, and I did not read them. The three non-blocking points above are optional.

Sources

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5932873335 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22071#pullrequestreview-5932873335). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T04:29:49Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Head reviewed: `cb396cfa72bdce0b83137eac68413ba0c30a2a52`, base `main`. - Read the description, commit list, manifest, file list and every changed hunk in the diff. - Read the house sections: Readable reviews, Standard PR response format, Accuracy and evidence, Approval rules. - Checked the head through the reader only; no build or test was run. <details> <summary>Reader commands</summary> ``` python3 repo_read.py search buffer_wide_stores python3 repo_read.py search bufferU64View python3 repo_read.py search TargetHasCapability python3 repo_read.py search buffer_atomic_unaligned python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp 1190 1235 python3 repo_read.py search directWordIndex python3 repo_read.py search "_tests.cmake" core/libs/prx/libSceAgcDriver python3 repo_read.py search GLOB core/libs/prx/libSceAgcDriver python3 repo_read.py cat core/libs/prx/libSceAgcDriver/CMakeLists.txt 695 730 python3 repo_read.py search coherentBufferAlias python3 repo_read.py search "const auto contiguous" python3 repo_read.py search "RuntimeAddress, 4> accesses" python3 repo_read.py search std::nullopt core/libs/prx/libSceAgcDriver/tests/execution/BufferWideStores.cpp python3 repo_read.py search "wideBufferStores = limits" core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp ``` </details> ## Results | Check | Result | Note | | --- | --- | --- | | Changed hunks read | passed | 17 of 17 listed files | | Head context | passed | Partial, see Not verified | | Build and unit tests | not run | Author-reported only | | Hosted required checks | not run | Status not read | | Performance figures | not run | Author-reported only | ## Findings **Blocking** None. The widening conditions match the description: unswizzled V#, aligned address, every word in range, and other lanes keep the per-component path. Stores with `x3`, coherent, GPU-descriptor or graphics-stage access are left unchanged. The new test and its opt-out fragment are picked up by the existing globs. **Non-blocking** - `core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp:414`: the swizzled-V# check has no case in `BufferWideStores.cpp`. The debt fragment lists a swizzled-V# case as still open. - `core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp:1211`: when `wideStore` returns nothing, the dword path has already computed `accesses`, and `writeComponents` computes the same addresses again. The emitted module carries the duplicate address code. - `core/libs/prx/libSceAgcDriver/tests/execution/BufferWideStores.cpp:211`: the test uses `std::nullopt` and `std::size` without `<optional>` or `<iterator>`. Whether it compiles without them is not verified. ## Not verified - Build and test runs: none were run here. The 32/32 focused tests, the validation-layer runs and the opt-out run are author-reported. - Performance: the figures come from one laptop GPU (RTX 4070 Laptop, driver 616.92). The traces were not fetched. The description names three main commits that do not agree: `be4613dd73` (validation), `2a8a0d1fc33` (performance) and `241bfd31f250` (summary line). Which base produced the numbers is unclear. - The debt fragment says "AMD reports 4" for `minStorageBufferOffsetAlignment`. Not verified. - Hosted required checks for this head were not read. - `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` is too large for the review folder. I read its changed line (4749) through the reader and its diff hunk only. - Helpers used by `BufferWideStores.cpp` (`Require`, `OpenVulkanTestDevice`, the `RecompileRequest` layout, the includes) were not read. - The files in `files/` were not opened, so no whole file was read. Checked by reading: `core/libs/prx/libSceAgcDriver/CMakeLists.txt:695` and `:819` glob `tests/execution/*.cpp` and `tests/cmake/*.cmake`, so the new names resolve. The test has 43 cases, as the description says. The `markBufferAliased` guard matches the conditions that create the variables (`core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp:524-525`). ## To get this to a good state Nothing is required. The event stays `COMMENT`: approval needs the hosted checks for this head to have passed, and I did not read them. The three non-blocking points above are optional. ## Sources - [SpirvRuntimeBuffer.cpp:414](https://github.com/boykopovar/AnyPS5/blob/cb396cfa72bdce0b83137eac68413ba0c30a2a52/core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp#L414) - [SpirvRuntimeBuffer.cpp:1211](https://github.com/boykopovar/AnyPS5/blob/cb396cfa72bdce0b83137eac68413ba0c30a2a52/core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp#L1211) - [BufferWideStores.cpp:211](https://github.com/boykopovar/AnyPS5/blob/cb396cfa72bdce0b83137eac68413ba0c30a2a52/core/libs/prx/libSceAgcDriver/tests/execution/BufferWideStores.cpp#L211) - [CMakeLists.txt:695](https://github.com/boykopovar/AnyPS5/blob/cb396cfa72bdce0b83137eac68413ba0c30a2a52/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L695) - [VulkanDevice.cpp:4749](https://github.com/boykopovar/AnyPS5/blob/cb396cfa72bdce0b83137eac68413ba0c30a2a52/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp#L4749)
MarcZX10 commented 2026-11-17 04:36:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T04:36:25Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

No build and no tests in this review. I read the change from the run folder (description, commits, manifest, diff) and checked the pinned head 923bbe2cf247 through the reader:

python3 repo_read.py search baseMisalignment core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp
python3 repo_read.py search coherentBufferAlias core/shader/recompiler
python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp 222 300
python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp 505 535
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp 4738 4760
python3 repo_read.py search buffer_wide_stores core/libs/prx/libSceAgcDriver
python3 repo_read.py search TargetHasCapability core/libs/prx/libSceAgcDriver/tests
python3 repo_read.py search GLOB core/libs/prx/libSceAgcDriver/tests
python3 repo_read.py search _tests.cmake core/libs/prx/libSceAgcDriver/tests/CMakeLists.txt

Files: files.json lists 17 reviewed files and no excluded ones. All 17 were read as their changed hunks in diff.patch. None was read in full. Execution/src/VulkanDevice.cpp is too large for the review folder, so only lines 4738–4760 were read through the reader.

Results

Check Result Note
Build not run No build in this review
Focused tests not run Author reports 32/32 on Windows; not re-run
Test registration not verified Target name appears only in the new opt-out .cmake file

Findings

Blocking

None. I checked the store path against the head: the alignment check (address & 7, address & 15), the element index with byteOffset, the array length used for the bounds check (dword view, rounds down), and the markBufferAliased refactor, which keeps the old Aliased decoration rules. I found no concrete defect in the code I read.

Non-blocking

None verified against a changed line in diff.patch.

Sources

Pinned at head 923bbe2cf247:

Not verified

  • Build and tests. Nothing was compiled or run. The 32/32 focused run and the validation-layer runs are the author's report and are not reproduced.
  • Test registration. The target agc_driver_buffer_wide_stores_tests and the test agc_driver_buffer_wide_stores are not in the diff. The name appears in the tree only in the new opt-out .cmake file, and I did not find how the other test .cmake files are registered. Not verified.
  • Full text. No file was read in full. Not checked: the whole formatted() function, ResourceForDescriptor, and TypeU32Vector.
  • Performance. The summary records are labelled with commit 66ef00667064 (change) and 241bfd31f250 (main). The reviewed head is 923bbe2cf247, and the description names main as 2a8a0d1fc33 in one place and be4613dd73 in another. I could not confirm through the reader that these commits match the head. The numbers are the author's.
  • Hardware paths. AMD-style devices with minStorageBufferOffsetAlignment of 4, swizzled V# and loads are not covered by the tests, as the debt fragment states. Not verified.
  • Negative control. Not run.
  • Event. This is COMMENT, not APPROVE. The files were read only as changed hunks and reader ranges, and no build or test was run, so a formal approval is not justified.

To get this to a good state

Nothing is required.

Optional:

  • State which commit the captures came from. Either re-capture on 923bbe2cf247 or say why the measured commit is equivalent.
  • Run the focused tests on 923bbe2cf247 and show that agc_driver_buffer_wide_stores is registered in the test list.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5932938495 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22071#pullrequestreview-5932938495). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T04:36:25Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran No build and no tests in this review. I read the change from the run folder (description, commits, manifest, diff) and checked the pinned head `923bbe2cf247` through the reader: ``` python3 repo_read.py search baseMisalignment core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp python3 repo_read.py search coherentBufferAlias core/shader/recompiler python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp 222 300 python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp 505 535 python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp 4738 4760 python3 repo_read.py search buffer_wide_stores core/libs/prx/libSceAgcDriver python3 repo_read.py search TargetHasCapability core/libs/prx/libSceAgcDriver/tests python3 repo_read.py search GLOB core/libs/prx/libSceAgcDriver/tests python3 repo_read.py search _tests.cmake core/libs/prx/libSceAgcDriver/tests/CMakeLists.txt ``` Files: `files.json` lists 17 reviewed files and no excluded ones. All 17 were read as their changed hunks in `diff.patch`. None was read in full. `Execution/src/VulkanDevice.cpp` is too large for the review folder, so only lines 4738–4760 were read through the reader. ## Results | Check | Result | Note | | --- | --- | --- | | Build | not run | No build in this review | | Focused tests | not run | Author reports 32/32 on Windows; not re-run | | Test registration | not verified | Target name appears only in the new opt-out `.cmake` file | ## Findings **Blocking** None. I checked the store path against the head: the alignment check (`address & 7`, `address & 15`), the element index with `byteOffset`, the array length used for the bounds check (dword view, rounds down), and the `markBufferAliased` refactor, which keeps the old `Aliased` decoration rules. I found no concrete defect in the code I read. **Non-blocking** None verified against a changed line in `diff.patch`. ## Sources Pinned at head `923bbe2cf247`: - [directAccess and array length](https://github.com/boykopovar/AnyPS5/blob/923bbe2cf247564604ec0f920cca6452a8f05422/core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp#L238-L265) - [baseMisalignment and directWordIndex](https://github.com/boykopovar/AnyPS5/blob/923bbe2cf247564604ec0f920cca6452a8f05422/core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp#L267-L278) - [Buffers binding and Aliased decorations](https://github.com/boykopovar/AnyPS5/blob/923bbe2cf247564604ec0f920cca6452a8f05422/core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp#L521-L530) - [Wide-store flag in buildTarget](https://github.com/boykopovar/AnyPS5/blob/923bbe2cf247564604ec0f920cca6452a8f05422/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp#L4754) ## Not verified - **Build and tests.** Nothing was compiled or run. The 32/32 focused run and the validation-layer runs are the author's report and are not reproduced. - **Test registration.** The target `agc_driver_buffer_wide_stores_tests` and the test `agc_driver_buffer_wide_stores` are not in the diff. The name appears in the tree only in the new opt-out `.cmake` file, and I did not find how the other test `.cmake` files are registered. Not verified. - **Full text.** No file was read in full. Not checked: the whole `formatted()` function, `ResourceForDescriptor`, and `TypeU32Vector`. - **Performance.** The summary records are labelled with commit `66ef00667064` (change) and `241bfd31f250` (main). The reviewed head is `923bbe2cf247`, and the description names main as `2a8a0d1fc33` in one place and `be4613dd73` in another. I could not confirm through the reader that these commits match the head. The numbers are the author's. - **Hardware paths.** AMD-style devices with `minStorageBufferOffsetAlignment` of 4, swizzled V# and loads are not covered by the tests, as the debt fragment states. Not verified. - **Negative control.** Not run. - **Event.** This is `COMMENT`, not `APPROVE`. The files were read only as changed hunks and reader ranges, and no build or test was run, so a formal approval is not justified. ## To get this to a good state Nothing is required. Optional: - State which commit the captures came from. Either re-capture on `923bbe2cf247` or say why the measured commit is equivalent. - Run the focused tests on `923bbe2cf247` and show that `agc_driver_buffer_wide_stores` is registered in the test list.
MarcZX10 commented 2026-11-17 05:00:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T05:00:03Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head: d6d4d0c481be159edea1a2cca2175c26182fa85f, base main. No merge preview.
  • No build and no test was run in this review. The focused tests and validation-layer runs in the description are the author's, not mine.
  • Read the description, commits, manifest and diff.patch from the review folder, then the house-rule sections, then head context through the reader:
python3 repo_read.py search directAccess core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp
python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp 214 282
python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp 520 556
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp 4738 4756
python3 repo_read.py search bufferU64View core/shader/recompiler
python3 repo_read.py search coherentBufferAlias core/shader/recompiler
python3 repo_read.py search TargetHasCapability
python3 repo_read.py search VulkanTestSkipped core/libs/prx/libSceAgcDriver/tests
python3 repo_read.py search agc_driver_buffer_wide_stores

The review is COMMENT, not APPROVE, because the tests, traces and build are the author's and were not rerun here.

Results

Check Result Note
Focused tests (author's run) not run Reported on Windows in the description; not rerun here
Validation-layer runs (author's run) not run Reported in the description; not rerun here
Build not run Not built in this review
Changed hunks against head code passed Store path, bounds, alias flags and target wiring read at head
Case count and flag wiring passed 45 cases in the table; flag set in the target, cache key, copy into the recompiler, and replay tool
Performance summary arithmetic passed 43 % lower GPU busy time and 18 % more presents match the summary lines; traces not opened

Findings

Blocking

None verified.

Non-blocking

None verified.

Checked and ruled out:

  • Formatted stores: the wide store sits inside the per-component inBounds guard, so every byte it writes is inside the records (SpirvRuntimeBuffer.cpp L538–L554).
  • Dword-count bounds: access.length is an OpArrayLength, so a partial trailing dword fails the fits test and takes the per-component path (SpirvRuntimeBuffer.cpp L238–L265).
  • The markBufferAliased change replaces the old variable-existence check with requirement flags. The flags are what create those variables, so the behaviour is the same (SpirvEmitterHelpers.cpp L524–L525).

Sources

  • The links above are pinned to d6d4d0c481be159edea1a2cca2175c26182fa85f.

Not verified

  • Build and test runs, including the 45-case agc_driver_buffer_wide_stores run and its opt-out, and the validation-layer runs. The author reports them; I did not run them.
  • Performance: the trace files and digests linked in the description were not opened, so the frame-time claims are unchecked. Only the internal arithmetic of the summary lines was checked.
  • Test registration: the head tree shows the opt-out CMake file, but no visible registration for the non-opt-out agc_driver_buffer_wide_stores name. How it is discovered was not confirmed.
  • Test helpers: OpenVulkanTestDevice, Dispatch, WaitIdle and the SPIR-V parsing in StoresThrough were not read, so the test code has not been checked against them.
  • AMD figure: the debt fragment's claim that AMD reports a minStorageBufferOffsetAlignment of 4 was not checked.
  • Files: 17 changed files. 16 were read through their diff hunks. core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp is excluded from the review folder as too large, and was read only at its changed hunk (head lines 4738–4756). No file was read in full.

To get this to a good state

Nothing is required.

Optional:

  • Give a source for the AMD minStorageBufferOffsetAlignment value in the debt fragment.
  • Point to where the non-opt-out agc_driver_buffer_wide_stores test is registered, so the 45-case run is easy to find.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5933156814 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22071#pullrequestreview-5933156814). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T05:00:03Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ### What I ran - Head: `d6d4d0c481be159edea1a2cca2175c26182fa85f`, base `main`. No merge preview. - No build and no test was run in this review. The focused tests and validation-layer runs in the description are the author's, not mine. - Read the description, commits, manifest and `diff.patch` from the review folder, then the house-rule sections, then head context through the reader: ``` python3 repo_read.py search directAccess core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp 214 282 python3 repo_read.py cat core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp 520 556 python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp 4738 4756 python3 repo_read.py search bufferU64View core/shader/recompiler python3 repo_read.py search coherentBufferAlias core/shader/recompiler python3 repo_read.py search TargetHasCapability python3 repo_read.py search VulkanTestSkipped core/libs/prx/libSceAgcDriver/tests python3 repo_read.py search agc_driver_buffer_wide_stores ``` The review is COMMENT, not APPROVE, because the tests, traces and build are the author's and were not rerun here. ### Results | Check | Result | Note | | --- | --- | --- | | Focused tests (author's run) | not run | Reported on Windows in the description; not rerun here | | Validation-layer runs (author's run) | not run | Reported in the description; not rerun here | | Build | not run | Not built in this review | | Changed hunks against head code | passed | Store path, bounds, alias flags and target wiring read at head | | Case count and flag wiring | passed | 45 cases in the table; flag set in the target, cache key, copy into the recompiler, and replay tool | | Performance summary arithmetic | passed | 43 % lower GPU busy time and 18 % more presents match the summary lines; traces not opened | ### Findings **Blocking** None verified. **Non-blocking** None verified. Checked and ruled out: - Formatted stores: the wide store sits inside the per-component `inBounds` guard, so every byte it writes is inside the records ([SpirvRuntimeBuffer.cpp L538–L554](https://github.com/boykopovar/AnyPS5/blob/d6d4d0c481be159edea1a2cca2175c26182fa85f/core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp#L538-L554)). - Dword-count bounds: `access.length` is an `OpArrayLength`, so a partial trailing dword fails the `fits` test and takes the per-component path ([SpirvRuntimeBuffer.cpp L238–L265](https://github.com/boykopovar/AnyPS5/blob/d6d4d0c481be159edea1a2cca2175c26182fa85f/core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp#L238-L265)). - The `markBufferAliased` change replaces the old variable-existence check with requirement flags. The flags are what create those variables, so the behaviour is the same ([SpirvEmitterHelpers.cpp L524–L525](https://github.com/boykopovar/AnyPS5/blob/d6d4d0c481be159edea1a2cca2175c26182fa85f/core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp#L524-L525)). ### Sources - The links above are pinned to `d6d4d0c481be159edea1a2cca2175c26182fa85f`. ### Not verified - Build and test runs, including the 45-case `agc_driver_buffer_wide_stores` run and its opt-out, and the validation-layer runs. The author reports them; I did not run them. - Performance: the trace files and digests linked in the description were not opened, so the frame-time claims are unchecked. Only the internal arithmetic of the summary lines was checked. - Test registration: the head tree shows the opt-out CMake file, but no visible registration for the non-opt-out `agc_driver_buffer_wide_stores` name. How it is discovered was not confirmed. - Test helpers: `OpenVulkanTestDevice`, `Dispatch`, `WaitIdle` and the SPIR-V parsing in `StoresThrough` were not read, so the test code has not been checked against them. - AMD figure: the debt fragment's claim that AMD reports a `minStorageBufferOffsetAlignment` of 4 was not checked. - Files: 17 changed files. 16 were read through their diff hunks. `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` is excluded from the review folder as too large, and was read only at its changed hunk (head lines 4738–4756). No file was read in full. ### To get this to a good state Nothing is required. Optional: - Give a source for the AMD `minStorageBufferOffsetAlignment` value in the debt fragment. - Point to where the non-opt-out `agc_driver_buffer_wide_stores` test is registered, so the 45-case run is easy to find.
kurexw commented 2026-11-17 09:35:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kurexw on 2026-11-17T09:35:19Z.

Review: COMMENTED


Tested on macOS 27.2 on an Apple M4. This is an x86-64 build under Rosetta with Apple clang 21.0.0, on MoltenVK 1.4.2 from the LunarG Vulkan SDK 1.4.363.1.

The M4 takes the new path. agc_driver_buffer_wide_stores reports 45 cases, device wide stores on, so MoltenVK meets both conditions: minStorageBufferOffsetAlignment is a multiple of 16, and Int64 is available.

Method. The base was main at a72186d3cf plus #22056 and #22074, which fix the macOS build of two other targets; both have since merged. I built the base and this PR merged onto it (a clean merge) in two separate build directories. I ran them alternately, base then PR, three times each, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer:

ctest --test-dir build -R 'buffer_wide_stores|^agc_shader_disk_cache|^agc_driver_.*formatted_store|^agc_driver_buffer_format|runtime_buffer_spans|tbuffer|^agc_shader_replay' -V
base (3 runs) This PR (3 runs)
agc_driver_buffer_wide_stores (wide stores on) (absent) Passed, 45 cases
agc_driver_buffer_wide_stores_opt_out (wide stores off) (absent) Passed, 45 cases
The other 26: buffer_format, formatted_store*, runtime_formatted_store*, runtime_buffer_spans*, tbuffer_format_d16, agc_shader_disk_cache* and agc_shader_replay_requests/_tool Passed Passed
Layer inserts per run 21 23
was not found but was requested 0 0
VUID- lines 0 0

All runs gave the same results.

Not tested: the speed claim. I have no title or capture here, so I didn't measure GPU time with and without the change on MoltenVK.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5936016169 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22071#pullrequestreview-5936016169). Originally posted by [kurexw](https://github.com/kurexw) on 2026-11-17T09:35:19Z. **Review:** COMMENTED --- Tested on macOS 27.2 on an Apple M4. This is an x86-64 build under Rosetta with Apple clang 21.0.0, on MoltenVK 1.4.2 from the LunarG Vulkan SDK 1.4.363.1. The M4 takes the new path. `agc_driver_buffer_wide_stores` reports `45 cases, device wide stores on`, so MoltenVK meets both conditions: `minStorageBufferOffsetAlignment` is a multiple of 16, and `Int64` is available. **Method.** The base was `main` at a72186d3cf plus #22056 and #22074, which fix the macOS build of two other targets; both have since merged. I built the base and this PR merged onto it (a clean merge) in two separate build directories. I ran them alternately, base then PR, three times each, with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` and `VK_LOADER_DEBUG=layer`: ``` ctest --test-dir build -R 'buffer_wide_stores|^agc_shader_disk_cache|^agc_driver_.*formatted_store|^agc_driver_buffer_format|runtime_buffer_spans|tbuffer|^agc_shader_replay' -V ``` | | base (3 runs) | This PR (3 runs) | | --- | --- | --- | | `agc_driver_buffer_wide_stores` (wide stores on) | (absent) | Passed, 45 cases | | `agc_driver_buffer_wide_stores_opt_out` (wide stores off) | (absent) | Passed, 45 cases | | The other 26: `buffer_format`, `formatted_store*`, `runtime_formatted_store*`, `runtime_buffer_spans*`, `tbuffer_format_d16`, `agc_shader_disk_cache*` and `agc_shader_replay_requests`/`_tool` | Passed | Passed | | Layer inserts per run | 21 | 23 | | `was not found but was requested` | 0 | 0 | | `VUID-` lines | 0 | 0 | All runs gave the same results. Not tested: the speed claim. I have no title or capture here, so I didn't measure GPU time with and without the change on MoltenVK.
MarcZX10 commented 2026-11-18 14:23:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T14:23:34Z.

Review: COMMENTED


Reviewed — no blocking findings

The reviewed code shows no concrete blocking defect, but I did not read every reviewed file, so a formal approval is not justified.

What I ran

Reviewed the prepared diff and targeted source at head 3b088b98df788bda80a7d2436ce7db7cde0f493b using repo_read.py. I ran no tests; the test results in the PR description are author-reported.

Results

Check Result Note
Targeted source review passed No concrete blocker found in inspected code.
Tests not run Results in the description were not independently verified.
Full file review not run Several changed files were not read in full.

Findings

Blocking

None identified in the code inspected.

Non-blocking

None.

Sources

Reviewed the prepared diff and targeted code for SpirvRuntimeBuffer.cpp, VulkanDevice.cpp, and RequestSerializer.cpp at the stated head.

Not verified

I read the review description, commit list, manifest, and diff, plus targeted sections of the three source files above. I did not read the full text of all changed files. In particular, VulkanDevice.cpp and ShaderMemory.cpp were excluded from the review folder for size; I read only the targeted VulkanDevice.cpp section through the reader. Other changed files were not read in full. No tests, build, or runtime checks were performed.

To get this to a good state

Nothing is required. Optional: complete a full read of the remaining changed files and run the focused checks on this exact head before issuing a formal decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5958480453 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22071#pullrequestreview-5958480453). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T14:23:34Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The reviewed code shows no concrete blocking defect, but I did not read every reviewed file, so a formal approval is not justified. ## What I ran Reviewed the prepared diff and targeted source at head `3b088b98df788bda80a7d2436ce7db7cde0f493b` using `repo_read.py`. I ran no tests; the test results in the PR description are author-reported. ## Results | Check | Result | Note | | --- | --- | --- | | Targeted source review | passed | No concrete blocker found in inspected code. | | Tests | not run | Results in the description were not independently verified. | | Full file review | not run | Several changed files were not read in full. | ## Findings ### Blocking None identified in the code inspected. ### Non-blocking None. ## Sources Reviewed the prepared diff and targeted code for `SpirvRuntimeBuffer.cpp`, `VulkanDevice.cpp`, and `RequestSerializer.cpp` at the stated head. ## Not verified I read the review description, commit list, manifest, and diff, plus targeted sections of the three source files above. I did not read the full text of all changed files. In particular, `VulkanDevice.cpp` and `ShaderMemory.cpp` were excluded from the review folder for size; I read only the targeted `VulkanDevice.cpp` section through the reader. Other changed files were not read in full. No tests, build, or runtime checks were performed. ## To get this to a good state Nothing is required. Optional: complete a full read of the remaining changed files and run the focused checks on this exact head before issuing a formal decision.
MarcZX10 commented 2026-11-18 15:24:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T15:24:31Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the reviewed code and supplied test and performance reports support merging.

What I ran

Reviewed head cc43fbd0605bc2bd3ae04fb7ac4ed88b77835acb using repo_read.py to inspect the prepared diff and source context. No commands or tests were run in this review.

Results

Check Result Note
Diff and targeted source review passed Shader emission and request compatibility inspected
Tests in this review not run Test runs are author-reported
Performance capture not run Matched captures and traces are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full text of VulkanDevice.cpp and ShaderMemory.cpp was excluded from the review folder and was not read through the reader. Their changed hunks were inspected in diff.patch, but surrounding source context was not verified. No tests, validation layers, or performance captures were run by this review. Reported testing and performance captures in description.md are author-provided. repo_read.py exposed the prepared review documents and changed source, not a way to write the requested draft files; this response contains the draft instead.

Files read: description.md, commits.md, manifest.json, diff.patch; source ranges in RequestSerializer.cpp, SpirvRuntimeBuffer.cpp, and SpirvTypes.cpp. Excluded changed files: VulkanDevice.cpp, ShaderMemory.cpp (too large for the review folder; not read through the reader).

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5959560958 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22071#pullrequestreview-5959560958). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T15:24:31Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the reviewed code and supplied test and performance reports support merging. ## What I ran Reviewed head `cc43fbd0605bc2bd3ae04fb7ac4ed88b77835acb` using `repo_read.py` to inspect the prepared diff and source context. No commands or tests were run in this review. ## Results | Check | Result | Note | | --- | --- | --- | | Diff and targeted source review | passed | Shader emission and request compatibility inspected | | Tests in this review | not run | Test runs are author-reported | | Performance capture | not run | Matched captures and traces are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full text of `VulkanDevice.cpp` and `ShaderMemory.cpp` was excluded from the review folder and was not read through the reader. Their changed hunks were inspected in `diff.patch`, but surrounding source context was not verified. No tests, validation layers, or performance captures were run by this review. Reported testing and performance captures in `description.md` are author-provided. `repo_read.py` exposed the prepared review documents and changed source, not a way to write the requested draft files; this response contains the draft instead. Files read: `description.md`, `commits.md`, `manifest.json`, `diff.patch`; source ranges in `RequestSerializer.cpp`, `SpirvRuntimeBuffer.cpp`, and `SpirvTypes.cpp`. Excluded changed files: `VulkanDevice.cpp`, `ShaderMemory.cpp` (too large for the review folder; not read through the reader). ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 22:13:33 +00:00 (Migrated from github.com)

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

Review: COMMENTED


The trial merge onto a1b75b0947 conflicts in ShaderMemory.cpp, ShaderReplay.cpp, RequestSerializer.cpp, SpirvRuntimeBuffer.cpp, and RequestSerializerTests.cpp. Please reconcile the replay payload and shader key with the store lowerer in the same revision. The wide path needs the existing typed fallback for misalignment, swizzle, and accesses outside the proven span. Re-run the wide-store execution fixture with the serializer and shader-memory controls once the head merges.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6179527598 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22071#pullrequestreview-6179527598). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:13:33Z. **Review:** COMMENTED --- The trial merge onto `a1b75b0947` conflicts in `ShaderMemory.cpp`, `ShaderReplay.cpp`, `RequestSerializer.cpp`, `SpirvRuntimeBuffer.cpp`, and `RequestSerializerTests.cpp`. Please reconcile the replay payload and shader key with the store lowerer in the same revision. The wide path needs the existing typed fallback for misalignment, swizzle, and accesses outside the proven span. Re-run the wide-store execution fixture with the serializer and shader-memory controls once the head merges. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.

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

git switch 'main'
git merge --no-ff 'upstream-pr/22071'
git switch 'upstream-pr/22071'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/22071'
git switch 'upstream-pr/22071'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/22071'
git switch 'main'
git merge --squash 'upstream-pr/22071'
git switch 'main'
git merge --ff-only 'upstream-pr/22071'
git switch 'main'
git merge 'upstream-pr/22071'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!22071
No description provided.