Skip to content

perf(agc): remember the verdict of a sampler table entry - #1291

Open
Thimo188 wants to merge 4 commits into
mainfrom
upstream-pr/25849
Open

Thimo188 wants to merge 4 commits into
mainfrom
upstream-pr/25849

Conversation

@Thimo188

@Thimo188 Thimo188 commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Imported from boykopovar/AnyPS5#25849, originally opened by Remi-Bon.

Source commit: 2207e08fe6dc70fe980804b32dc56075fcfa8973. The import branch preserves this fetched upstream PR snapshot. The description and validation below are copied from upstream; no new code changes or test runs were made for this import. Original reviews, discussions, and attachments remain at the linked upstream PR.


What

ShaderResources::addSamplerTable decodes and validates every sampler of a sampler table entry on every capture. When an entry is refused, it throws and catches an exception per sampler, every time. A shader that binds the same refused entry on each dispatch pays that cost on every dispatch.

This change remembers each entry's verdict: accepted, or the refusal text. The key is the context address, the entry's guest descriptor words and its depth-compare flags. The next capture of the same entry reuses the verdict without decoding. The memo is cleared at 65536 entries. An entry over the device's sampler table capacity is never memoised.

Tested

  • Windows 11, MinGW Release build.
  • ctest --test-dir build -R "sampler|image_table": 46/46 passed, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer, validation layer from Vulkan SDK 1.4.363.1. The loader log shows Insert instance layer "VK_LAYER_KHRONOS_validation" and contains no VUID-.
  • Measured in PPSA01317 (Café scene) on a local tree that carries other unmerged split table call work, so this is not a main vs change tools/trace_digest.py comparison: main alone does not reach the scene. CPU samples in addSamplerTable went from 654 to 163 over 45 s.

Speed capture

Windows 11 (26300), AMD Radeon RX 9070, AMD proprietary driver 26.11.2 (LLPC), Ryzen 9 5950X, 32 GB. PPSA01317, Café scene, 3840x2160, validation layer not loaded. Same environment on both sides, one warm-up run then one measured run per side, APS5_TRACE_SECONDS=0:100 from the Café entry.

This is not a main vs change capture: main alone does not reach the scene (boykopovar#7256). Both commits are local snapshots of one downstream tree (e2c5cb724bb5 plus unmerged split table call work) and are not pushed. They differ only in ShaderResources::addSamplerTable: 0114600e6d8c has no verdict memo, d24d6e5c38d8 has the memo with this PR's key.

per frame without with change
Vulkan.Dispatch ms 62.993 25.709 -59.2 %
Recorder.Sync ms 93.654 129.365 +38.1 %
Driver.SplitDispatch ms 252.274 259.663 +2.9 %
GPU busy ms 107.616 142.757 +32.7 %
mean frame ms 350.539 351.038 +0.1 %

Over the window, Vulkan.Dispatch.shader_resources goes from 17479 ms to 6867 ms and Resources.Prepare from 13821 ms to 3058 ms. Frame time does not improve in this scene: Recorder.Sync and GPU busy time are higher on the side with the memo. There is one run per side, so the noise is unmeasured and I do not know the cause of that rise. Both traces dropped events on queue worker 0x0, so slice-based figures in the digests are partial.

{"commit":"0114600e6d8c","dirty":false,"env":{"APS5_ASYNC_COMPUTE_WORDS":"0","APS5_ASYNC_DRAW_COMPILE":"1","APS5_ASYNC_PIPELINE_WORDS":"50000","APS5_BATCH_CAP":"64","APS5_DRAW_PIPELINE":"1","APS5_GPU_CHECKPOINTS":"1","APS5_LOCAL_A2C_UNDITHERED":"1","APS5_LOCAL_MSAA_STALE_READ":"1","APS5_LOCAL_RETIRE_PARTIAL_FMASK_FILL":"1","APS5_LOCAL_SKIP_STATE_REFUSALS":"1","APS5_LOOP_GUARD":"65536","APS5_MAX_COMPUTE_SPIRV_WORDS":"1000000","APS5_NO_PIPELINE_LTO":"1","APS5_PIPELINED_DRAWS":"64","APS5_SKIP_REFUSED_DISPATCHES":"1","APS5_SKIP_REFUSED_DRAWS":"1","APS5_SKIP_SHADER_FILE":"run287_skip.txt","APS5_SPLIT_DEFER_CALLEES":"1","APS5_SPLIT_TABLE_CALLS":"1","APS5_TRACE_SECONDS":"0:100","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"AMD Radeon RX 9070","driver":"AMD proprietary driver 26.11.2 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32687,"title_id":"PPSA01317","title":"Gran Turismo® 7","content_version":"01.710.000","resolution":"3840x2160","window":{"spec":"seconds 0:100","first_present":7201,"ms":100254.034},"presents":286,"frame_ms":{"p50":33.513,"p90":1661.803,"p99":2312.045,"max":22776.469},"gpu_busy_ms_per_present":107.616,"worker_busy_pct":{"queue worker 0x50":0.704,"queue worker 0x0":91.941,"queue worker 0x51":1.195,"queue worker 0x2a":0.385,"queue worker 0x23":0.040,"queue worker 0x2b":2.153,"queue worker 0x4a":0.223,"queue worker 0x4b":0.153,"queue worker 0x22":0.490},"phase_totals_ms":{"Driver.Completion":8.991,"Driver.Dispatch":86686.248,"Driver.Dispatch.capture_resources":450.611,"Driver.Dispatch.decode_key_device_setup":2989.634,"Driver.Dispatch.lookup_cache":40.691,"Driver.Dispatch.materialize":112.691,"Driver.Dispatch.prepared_invocation":33.057,"Driver.Draw":6377.993,"Driver.Draw.device_setup":76.372,"Driver.Draw.draw_handed_off":481.015,"Driver.Draw.prepare":5813.393,"Driver.DrawFinish":5629.045,"Driver.DrawFinish.draw_enqueued":1383.121,"Driver.DrawFinish.post_compile_prepare":38.297,"Driver.DrawFinish.shader_compile_and_link":3975.352,"Driver.EndSubmission":283.542,"Driver.Packet":97121.556,"Driver.Packet.device_lock":25.235,"Driver.Packet.dispatch":86768.798,"Driver.Packet.draw":6397.857,"Driver.Packet.execute":162.647,"Driver.Packet.flush_between_packets":108.961,"Driver.Packet.memory_wait":2972.208,"Driver.Packet.pipeline_drain":88.488,"Driver.Packet.pipeline_prepare":38.217,"Driver.Packet.prepare_memory":394.175,"Driver.Packet.rendering_wait":0.232,"Driver.Present":429.667,"Driver.Present.acquire_image":177.350,"Driver.Present.device_setup":0.155,"Driver.Present.gpu_mutex_wait":3.971,"Driver.Present.inflight_wait":0.684,"Driver.Present.present_display_buffer":71.692,"Driver.Present.queue_present":39.310,"Driver.Present.release_and_callback":0.364,"Driver.Present.render_fence_wait":135.385,"Driver.Present.resize":0.476,"Driver.Present.validate":0.105,"Driver.Rewind":111.738,"Driver.SplitDispatch":72150.464,"Driver.SplitDispatch.capture":27334.148,"Driver.SplitLookup":80117.441,"Driver.SplitLookup.parts_for":6236.652,"Driver.Suspend":4.948,"GpuMutex.wait.dispatch":453.157,"GpuMutex.wait.draw":29.361,"GpuMutex.wait.end":249.902,"GpuMutex.wait.flush":7.385,"GpuMutex.wait.hook":21.341,"GpuMutex.wait.indirect":16.481,"GpuMutex.wait.label":112.490,"GpuMutex.wait.other":3.761,"GpuMutex.wait.present":3.264,"Graphics.Draw":7202.628,"Graphics.Draw.draw_and_resource_release":6477.300,"Graphics.Draw.index_upload":83.987,"Graphics.Draw.validate":386.550,"Graphics.Draw.vertex_upload":132.286,"Graphics.DrawWithRecipe":12.961,"Graphics.DrawWithRecipe.draw_and_resource_release":11.855,"Graphics.DrawWithRecipe.index_upload":0.023,"Graphics.DrawWithRecipe.validate":0.209,"Graphics.DrawWithRecipe.vertex_upload":0.729,"Graphics.Submit":1.245,"Graphics.Submit.command_end":0.062,"Graphics.Submit.queue_submit":1.174,"Graphics.Wait":116.610,"Graphics.Wait.fence_wait":116.596,"Recorder.Reap":95.986,"Recorder.Submit":526.201,"Recorder.Sync":26785.183,"Resources.Complete":4490.768,"Resources.Prepare":13820.772,"Shader.DrawStage":4000.462,"Shader.DrawStage.capture_resources":1438.123,"Shader.DrawStage.materialize":2264.881,"Shader.DrawStage.prepared_invocation":213.794,"Shader.PrepareArtifact":301.418,"Shader.Register":30.813,"Shader.ResolveAbi":432.659,"Shader.ResolveGraphicsAbi":90.916,"Shader.ResolveGraphicsStagesAbi":680.604,"VideoOut.Flip":453.191,"VideoOut.Flip.completion_mutex_wait":0.338,"VideoOut.Flip.config_mutex_wait":0.036,"VideoOut.Flip.frame_limit":0.151,"VideoOut.Flip.notify_game":6.772,"VideoOut.Flip.present":428.689,"VideoOut.Flip.validate":0.356,"VideoOut.Flip.vblank_wait":0.201,"VideoOut.Flip.window_prepare":0.475,"VideoOut.Flip.window_title":15.958,"Vulkan.Acquire":177.000,"Vulkan.Acquire.acquire_fence_wait":157.507,"Vulkan.Acquire.acquire_image":18.162,"Vulkan.Acquire.fence_reset":0.775,"Vulkan.Acquire.retired_swapchains":0.419,"Vulkan.ComputePipeline":979.501,"Vulkan.Dispatch":18015.923,"Vulkan.Dispatch.command_record":514.140,"Vulkan.Dispatch.shader_resources":17479.156,"Vulkan.DispatchRecipe":237.081,"Vulkan.DispatchRecipe.command_record":235.859,"Vulkan.DrawFromRecipe":13.090,"Vulkan.GraphicsPipeline":0.379,"Vulkan.GraphicsPipeline.modules_and_state":0.332,"Vulkan.GraphicsPipelinePrebuild":0.400,"Vulkan.Present":41.907,"Vulkan.Present.command_record_scale":25.988,"Vulkan.Present.pixel_upload":2.332,"Vulkan.Present.queue_submit":13.341,"Vulkan.QueuePresent":38.523,"Vulkan.QueuePresent.queue_present":38.032,"Vulkan.Retire":136.839,"Vulkan.Retire.wait":132.824},"top_phases_ms_per_frame":{"Driver.Packet":339.586,"Driver.Packet.dispatch":303.387,"Driver.Dispatch":303.099,"Driver.SplitLookup":280.131,"Driver.SplitDispatch":252.274,"Driver.SplitDispatch.capture":95.574,"Recorder.Sync":93.654,"Vulkan.Dispatch":62.993},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":2560,"Graphics.Barrier.dcc-clear":1202,"Graphics.Barrier.dcc-keys":840,"Graphics.Barrier.dispatch-lead":48792,"Graphics.Barrier.dispatch-trail":43480,"Graphics.Barrier.draw":44302,"Graphics.Barrier.indirect-args":13893,"Graphics.Barrier.label-run":32560,"Graphics.Barrier.present-blit":571,"Graphics.Barrier.shadow-publish":3698,"Graphics.Barrier.staging-in":20666,"Graphics.Barrier.staging-out":9916,"Graphics.Barrier.storage-upload":28654,"Graphics.Barrier.storage-writeback":38090,"Graphics.BarrierMerged.dispatch-lead":22474,"Graphics.BarrierMerged.label-run":151,"Graphics.BarrierMerged.shadow-publish":2988,"Graphics.BarrierMerged.staging-in":9082,"Graphics.BarrierMerged.staging-out":9916,"Graphics.BarrierMerged.storage-writeback":12308,"Graphics.Copy":22459,"Graphics.Copy.bytes":57921654124,"Graphics.RenderPass":17955,"Graphics.RenderPass.Close.command":14965,"Graphics.RenderPass.Close.image":611,"Graphics.RenderPass.Close.key":345,"Graphics.RenderPass.Close.label":151,"Graphics.RenderPass.Close.new-batch":1883,"Graphics.RenderPass.Continued":75945},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":62.954,"events_lost":111068,"totals_full":false}},"trace":"aps5-trace-0114600e6d8c-19080.json.gz"}
{"commit":"d24d6e5c38d8","dirty":false,"env":{"APS5_ASYNC_COMPUTE_WORDS":"0","APS5_ASYNC_DRAW_COMPILE":"1","APS5_ASYNC_PIPELINE_WORDS":"50000","APS5_BATCH_CAP":"64","APS5_DRAW_PIPELINE":"1","APS5_GPU_CHECKPOINTS":"1","APS5_LOCAL_A2C_UNDITHERED":"1","APS5_LOCAL_MSAA_STALE_READ":"1","APS5_LOCAL_RETIRE_PARTIAL_FMASK_FILL":"1","APS5_LOCAL_SKIP_STATE_REFUSALS":"1","APS5_LOOP_GUARD":"65536","APS5_MAX_COMPUTE_SPIRV_WORDS":"1000000","APS5_NO_PIPELINE_LTO":"1","APS5_PIPELINED_DRAWS":"64","APS5_SKIP_REFUSED_DISPATCHES":"1","APS5_SKIP_REFUSED_DRAWS":"1","APS5_SKIP_SHADER_FILE":"run287_skip.txt","APS5_SPLIT_DEFER_CALLEES":"1","APS5_SPLIT_TABLE_CALLS":"1","APS5_TRACE_SECONDS":"0:100","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"AMD Radeon RX 9070","driver":"AMD proprietary driver 26.11.2 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32687,"title_id":"PPSA01317","title":"Gran Turismo® 7","content_version":"01.710.000","resolution":"3840x2160","window":{"spec":"seconds 0:100","first_present":7223,"ms":100396.915},"presents":286,"frame_ms":{"p50":33.474,"p90":478.223,"p99":2830.182,"max":26379.738},"gpu_busy_ms_per_present":142.757,"worker_busy_pct":{"queue worker 0x50":0.629,"queue worker 0x51":1.084,"queue worker 0x0":92.046,"queue worker 0x2a":0.354,"queue worker 0x2b":2.661,"queue worker 0x23":0.040,"queue worker 0x4a":0.234,"queue worker 0x4b":0.130,"queue worker 0x22":0.489},"phase_totals_ms":{"Driver.Completion":9.172,"Driver.Dispatch":87373.598,"Driver.Dispatch.capture_resources":420.478,"Driver.Dispatch.decode_key_device_setup":2943.422,"Driver.Dispatch.lookup_cache":34.577,"Driver.Dispatch.materialize":110.387,"Driver.Dispatch.prepared_invocation":29.082,"Driver.Draw":5862.858,"Driver.Draw.device_setup":70.846,"Driver.Draw.draw_handed_off":458.271,"Driver.Draw.prepare":5326.093,"Driver.DrawFinish":5207.735,"Driver.DrawFinish.draw_enqueued":1191.558,"Driver.DrawFinish.post_compile_prepare":33.869,"Driver.DrawFinish.shader_compile_and_link":3722.555,"Driver.EndSubmission":202.173,"Driver.Packet":97731.108,"Driver.Packet.device_lock":23.478,"Driver.Packet.dispatch":87445.623,"Driver.Packet.draw":5881.690,"Driver.Packet.execute":149.132,"Driver.Packet.flush_between_packets":97.904,"Driver.Packet.memory_wait":3468.997,"Driver.Packet.pipeline_drain":93.382,"Driver.Packet.pipeline_prepare":35.684,"Driver.Packet.prepare_memory":383.847,"Driver.Packet.rendering_wait":0.233,"Driver.Present":412.365,"Driver.Present.acquire_image":179.818,"Driver.Present.device_setup":0.141,"Driver.Present.gpu_mutex_wait":10.578,"Driver.Present.inflight_wait":0.697,"Driver.Present.present_display_buffer":73.447,"Driver.Present.queue_present":42.631,"Driver.Present.release_and_callback":0.355,"Driver.Present.render_fence_wait":103.941,"Driver.Present.resize":0.490,"Driver.Present.validate":0.098,"Driver.Rewind":106.229,"Driver.SplitDispatch":74263.675,"Driver.SplitDispatch.capture":29287.982,"Driver.SplitLookup":81160.394,"Driver.SplitLookup.parts_for":5040.290,"Driver.Suspend":4.519,"GpuMutex.wait.dispatch":394.678,"GpuMutex.wait.draw":33.057,"GpuMutex.wait.end":119.853,"GpuMutex.wait.flush":2.869,"GpuMutex.wait.hook":173.597,"GpuMutex.wait.indirect":11.706,"GpuMutex.wait.label":249.529,"GpuMutex.wait.other":80.260,"GpuMutex.wait.present":9.833,"Graphics.Draw":6488.325,"Graphics.Draw.draw_and_resource_release":5848.118,"Graphics.Draw.index_upload":75.028,"Graphics.Draw.validate":420.551,"Graphics.Draw.vertex_upload":110.747,"Graphics.DrawWithRecipe":11.458,"Graphics.DrawWithRecipe.draw_and_resource_release":10.451,"Graphics.DrawWithRecipe.index_upload":0.023,"Graphics.DrawWithRecipe.validate":0.203,"Graphics.DrawWithRecipe.vertex_upload":0.647,"Graphics.Submit":0.780,"Graphics.Submit.command_end":0.037,"Graphics.Submit.queue_submit":0.737,"Graphics.Wait":61.166,"Graphics.Wait.fence_wait":61.157,"Recorder.Reap":92.693,"Recorder.Submit":459.236,"Recorder.Sync":36998.295,"Resources.Complete":4272.897,"Resources.Prepare":3057.873,"Shader.DrawStage":3760.865,"Shader.DrawStage.capture_resources":1286.581,"Shader.DrawStage.materialize":2188.066,"Shader.DrawStage.prepared_invocation":193.166,"Shader.PrepareArtifact":148.741,"Shader.Register":30.897,"Shader.ResolveAbi":327.571,"Shader.ResolveGraphicsAbi":85.407,"Shader.ResolveGraphicsStagesAbi":413.053,"VideoOut.Flip":436.838,"VideoOut.Flip.completion_mutex_wait":0.340,"VideoOut.Flip.config_mutex_wait":0.035,"VideoOut.Flip.frame_limit":0.150,"VideoOut.Flip.notify_game":5.319,"VideoOut.Flip.present":411.219,"VideoOut.Flip.validate":0.382,"VideoOut.Flip.vblank_wait":0.191,"VideoOut.Flip.window_prepare":0.535,"VideoOut.Flip.window_title":18.457,"Vulkan.Acquire":179.466,"Vulkan.Acquire.acquire_fence_wait":160.477,"Vulkan.Acquire.acquire_image":17.623,"Vulkan.Acquire.fence_reset":0.801,"Vulkan.Acquire.retired_swapchains":0.430,"Vulkan.ComputePipeline":6.028,"Vulkan.Dispatch":7352.696,"Vulkan.Dispatch.command_record":464.080,"Vulkan.Dispatch.shader_resources":6867.181,"Vulkan.DispatchRecipe":224.546,"Vulkan.DispatchRecipe.command_record":223.561,"Vulkan.DrawFromRecipe":11.577,"Vulkan.GraphicsPipeline":0.252,"Vulkan.GraphicsPipeline.modules_and_state":0.212,"Vulkan.GraphicsPipelinePrebuild":0.268,"Vulkan.Present":42.050,"Vulkan.Present.command_record_scale":26.078,"Vulkan.Present.pixel_upload":2.078,"Vulkan.Present.queue_submit":13.637,"Vulkan.QueuePresent":41.846,"Vulkan.QueuePresent.queue_present":41.068,"Vulkan.Retire":104.974,"Vulkan.Retire.wait":101.501},"top_phases_ms_per_frame":{"Driver.Packet":341.717,"Driver.Packet.dispatch":305.754,"Driver.Dispatch":305.502,"Driver.SplitLookup":283.778,"Driver.SplitDispatch":259.663,"Recorder.Sync":129.365,"Driver.SplitDispatch.capture":102.406,"Vulkan.Dispatch":25.709},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":2175,"Graphics.Barrier.dcc-clear":1156,"Graphics.Barrier.dcc-keys":836,"Graphics.Barrier.dispatch-lead":46714,"Graphics.Barrier.dispatch-trail":40059,"Graphics.Barrier.draw":40083,"Graphics.Barrier.indirect-args":13597,"Graphics.Barrier.label-run":30429,"Graphics.Barrier.present-blit":571,"Graphics.Barrier.shadow-publish":3146,"Graphics.Barrier.staging-in":19865,"Graphics.Barrier.staging-out":9510,"Graphics.Barrier.storage-upload":25439,"Graphics.Barrier.storage-writeback":33274,"Graphics.BarrierMerged.dispatch-lead":20539,"Graphics.BarrierMerged.label-run":141,"Graphics.BarrierMerged.shadow-publish":2582,"Graphics.BarrierMerged.staging-in":8657,"Graphics.BarrierMerged.staging-out":9510,"Graphics.BarrierMerged.storage-writeback":10958,"Graphics.Copy":22502,"Graphics.Copy.bytes":51057706884,"Graphics.RenderPass":16632,"Graphics.RenderPass.Close.command":13815,"Graphics.RenderPass.Close.image":593,"Graphics.RenderPass.Close.key":337,"Graphics.RenderPass.Close.label":141,"Graphics.RenderPass.Close.new-batch":1743,"Graphics.RenderPass.Continued":69914},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":67.822,"events_lost":72992,"totals_full":false}},"trace":"aps5-trace-d24d6e5c38d8-25036.json.gz"}
tools/trace_digest.py, without

285 frames over 98460.1 ms (no summary line found)

Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.

  • queue worker 0x0: 111068 events lost; buffer full at 62953.6 ms; over the 264 of 285 frames that ended before it: busy 202.1 ms per frame (86 %), wait 28.5, largest Driver.Packet 201.8, Driver.Rewind 0.3 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 7456: 22776.5 ms at 25970 ms: Driver.WorkerWait (queue worker 0x4b) 22776.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x4b) 22776.5, Driver.WorkerWait (queue worker 0x50) 22776.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x50) 22776.2
  • present 7436: 2588.4 ms at 12972 ms: Driver.WorkerWait (queue worker 0x4a) 2588.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x4a) 2588.4, Driver.WorkerWait (queue worker 0x23) 2588.1, Driver.WorkerWait (queue worker 0x50) 2588.1
  • present 7453: 2312.0 ms at 21588 ms: Driver.WorkerWait (queue worker 0x23) 2312.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x23) 2312.0, Driver.WorkerWait (queue worker 0x4a) 2312.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x4a) 2312.0
  • present 7435: 2015.3 ms at 10956 ms: Driver.WorkerWait (queue worker 0x50) 2015.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x50) 2015.0, Driver.WorkerWait (queue worker 0x23) 2014.7, Driver.WorkerWait (queue worker 0x2b) 2014.2
  • present 7473: 1990.7 ms at 75135 ms: Driver.WorkerWait (queue worker 0x23) 1990.4, Driver.WorkerWait (queue worker 0x2b) 1987.5, Driver.WorkerWait (queue worker 0x2a) 1985.2, Driver.WorkerWait (queue worker 0x22) 1981.1

Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

  • present 7456: 22776.5 ms at 25970 ms, persistence 22760.9 ms
  • present 7436: 2588.4 ms at 12972 ms, persistence 2352.3 ms
  • present 7453: 2312.0 ms at 21588 ms, persistence 1859.6 ms
  • present 7473: 1990.7 ms at 75135 ms, persistence 615.2 ms
  • present 7220: 479.7 ms at 2090 ms, persistence 455.2 ms
  • present 7485: 1867.4 ms at 96593 ms, persistence 191.2 ms
  • present 7393: 186.2 ms at 8396 ms, persistence 161.2 ms
  • present 7459: 1759.8 ms at 51587 ms, persistence 156.2 ms
  • present 7402: 152.7 ms at 8927 ms, persistence 122.4 ms
  • present 7451: 741.9 ms at 20222 ms, persistence 117.6 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
shader prepare 0.0 (0 %) 0.0 (0 %) 345.5 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 345.5 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 345.5 0.0 Recorder.Submit 0.0
shader prepare 0.4 (0 %) 0.0 (0 %) 345.1 0.0 Vulkan.ComputePipeline 0.4
shader prepare 0.0 (0 %) 0.0 (0 %) 345.5 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 345.5 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.5 (0 %) 0.0 (0 %) 345.0 0.0 Vulkan.ComputePipeline 0.5
shader prepare 0.1 (0 %) 0.0 (0 %) 345.3 0.0 Vulkan.ComputePipeline 0.1
shader prepare 0.1 (0 %) 0.0 (0 %) 345.4 0.0 Vulkan.ComputePipeline 0.1
shader prepare 1.6 (0 %) 0.0 (0 %) 343.9 0.0 Vulkan.ComputePipeline 1.6
shader prepare 0.1 (0 %) 0.0 (0 %) 345.4 0.0 Vulkan.ComputePipeline 0.1
shader prepare 0.0 (0 %) 0.0 (0 %) 345.5 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 345.5 0.0
shader prepare 0.6 (0 %) 0.0 (0 %) 344.9 0.0 Vulkan.ComputePipeline 0.6, Vulkan.GraphicsPipelinePrebuild 0.0
queue worker 0x50 0.4 (0 %) 345.0 (100 %) 0.1 0.3 Driver.Packet 2.1, Driver.EndSubmission 0.2
queue worker 0x0 191.5 (55 %) 26.4 (8 %) 127.5 9.8 Driver.Packet 190.9, Driver.Rewind 0.3
queue worker 0x51 0.1 (0 %) 345.3 (100 %) 0.1 0.0 Driver.Packet 3.4, Driver.EndSubmission 0.7
draw committer 24.9 (7 %) 0.4 (0 %) 320.2 6.2 Graphics.Draw 24.3, Recorder.Submit 0.4
presenter 0.6 (0 %) 1.0 (0 %) 343.9 0.0 VideoOut.Flip 1.6, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 345.3 0.2 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 345.5 0.0 Shader.Register 0.0
title 0.0 (0 %) 0.0 (0 %) 345.5 0.0 Shader.Register 0.0, Recorder.Submit 0.0
title 0.0 (0 %) 0.0 (0 %) 345.5 0.0 Shader.Register 0.0, Recorder.Submit 0.0
draw finisher 17.7 (5 %) 0.0 (0 %) 327.8 15.1 Driver.DrawFinish 17.7
title 0.0 (0 %) 0.0 (0 %) 345.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 345.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.7 (0 %) 0.0 (0 %) 344.8 0.1 Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.0
title 1.2 (0 %) 0.0 (0 %) 344.3 0.1 Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.5
title 0.0 (0 %) 0.0 (0 %) 345.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 345.4 0.1 Shader.ResolveAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 345.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 345.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 345.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.3 (0 %) 0.0 (0 %) 345.1 0.1 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 345.4 0.1 Shader.ResolveAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x2a 1.1 (0 %) 344.3 (100 %) 0.0 0.3 Driver.Packet 1.3, Driver.EndSubmission 0.0
title 0.0 (0 %) 0.0 (0 %) 345.5 0.1 Shader.Register 0.0
queue worker 0x23 0.1 (0 %) 344.9 (100 %) 0.5 0.0 Driver.Packet 0.1, Driver.EndSubmission 0.0
queue worker 0x2b 1.4 (0 %) 343.5 (99 %) 0.5 0.5 Driver.Packet 7.5, Driver.Completion 0.0
queue worker 0x4a 0.5 (0 %) 57.8 (17 %) 287.1 0.8 Driver.Packet 0.6, Driver.Completion 0.0
queue worker 0x4b 0.2 (0 %) 245.0 (71 %) 100.3 0.1 Driver.Packet 0.5, Driver.EndSubmission 0.0
queue worker 0x22 1.5 (0 %) 273.8 (79 %) 70.2 0.5 Driver.Packet 1.6, Driver.Completion 0.0
gpu 107.4 (31 %) 0.0 (0 %) 238.1 0.0 batch 107.4

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 2313.2, Driver.WorkerWait.dequeue_order 1201.5, Driver.WorkerWait.idle_and_completion_poll 1111.7, Driver.Packet 208.1, Driver.Packet.dispatch 178.7, Driver.Dispatch 178.2, Driver.SplitLookup 159.6, Driver.SplitDispatch 144.1, batch 107.4, Recorder.Sync 62.4

Longest waits

  • Driver.WorkerWait (queue worker 0x4b) 48840.8 ms at 21167 ms, present 7452
  • Driver.WorkerWait (queue worker 0x50) 22778.9 ms at 25978 ms, present 7456
  • Driver.WorkerWait (queue worker 0x51) 22777.3 ms at 25980 ms, present 7456
  • Driver.WorkerWait (queue worker 0x23) 22773.5 ms at 25969 ms, present 7455
  • Driver.WorkerWait (queue worker 0x2b) 22769.8 ms at 25973 ms, present 7456
  • Driver.WorkerWait (queue worker 0x2a) 22767.3 ms at 25975 ms, present 7456
  • Driver.WorkerWait (queue worker 0x22) 22765.7 ms at 25977 ms, present 7456
  • Driver.WorkerWait (queue worker 0x4a) 10577.8 ms at 11009 ms, present 7435
  • Driver.WorkerWait (queue worker 0x4b) 7392.0 ms at 1886 ms, present 7215
  • Driver.WorkerWait (queue worker 0x23) 7037.0 ms at 1885 ms, present 7215

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 3947: 716.4 ms at 30044 ms, present 7456: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 717.4, Vulkan.Dispatch (queue worker 0x0) 583.4, Vulkan.Dispatch.shader_resources (queue worker 0x0) 578.7, Resources.Prepare (queue worker 0x0) 503.8
  • batch 3949: 707.1 ms at 31332 ms, present 7456: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 708.2, Vulkan.Dispatch (queue worker 0x0) 542.4, Vulkan.Dispatch.shader_resources (queue worker 0x0) 538.7, Resources.Prepare (queue worker 0x0) 475.2
  • batch 3951: 704.7 ms at 32600 ms, present 7456: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 705.8, Vulkan.Dispatch (queue worker 0x0) 532.1, Vulkan.Dispatch.shader_resources (queue worker 0x0) 528.5, Resources.Prepare (queue worker 0x0) 465.6
  • batch 3953: 703.5 ms at 33875 ms, present 7456: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 704.5, Vulkan.Dispatch (queue worker 0x0) 540.9, Vulkan.Dispatch.shader_resources (queue worker 0x0) 537.5, Resources.Prepare (queue worker 0x0) 468.1
  • batch 3955: 702.0 ms at 35160 ms, present 7456: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 703.1, Vulkan.Dispatch (queue worker 0x0) 551.7, Vulkan.Dispatch.shader_resources (queue worker 0x0) 547.8, Resources.Prepare (queue worker 0x0) 482.9
tools/trace_digest.py, with

285 frames over 98000.0 ms (no summary line found)

Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.

  • queue worker 0x0: 72992 events lost; buffer full at 67822.0 ms; over the 272 of 285 frames that ended before it: busy 209.4 ms per frame (87 %), wait 27.6, largest Driver.Packet 209.1, Driver.Rewind 0.3 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 7489: 26379.7 ms at 26337 ms: Driver.WorkerWait (queue worker 0x4b) 26379.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x4b) 26379.7, Driver.WorkerWait (queue worker 0x23) 26379.4, Driver.WorkerWait (queue worker 0x50) 26379.3
  • present 7469: 2845.7 ms at 13440 ms: Driver.WorkerWait (queue worker 0x4a) 2845.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x4a) 2845.7, Driver.WorkerWait (queue worker 0x23) 2845.4, Driver.WorkerWait (queue worker 0x50) 2845.4
  • present 7504: 2830.2 ms at 87900 ms: Driver.WorkerWait (queue worker 0x23) 2830.0, Driver.WorkerWait (queue worker 0x2b) 2827.7, Driver.WorkerWait (queue worker 0x2a) 2826.6, Driver.WorkerWait (queue worker 0x22) 2815.3
  • present 7496: 2762.1 ms at 67834 ms: Driver.WorkerWait (queue worker 0x4b) 2762.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x4b) 2762.1, Driver.WorkerWait (queue worker 0x50) 2761.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x50) 2761.9
  • present 7491: 2666.0 ms at 55288 ms: Driver.WorkerWait (queue worker 0x4b) 2666.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x4b) 2666.0, Driver.WorkerWait (queue worker 0x23) 2665.8, Driver.WorkerWait (queue worker 0x50) 2665.7

Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

  • present 7489: 26379.7 ms at 26337 ms, persistence 26364.1 ms
  • present 7469: 2845.7 ms at 13440 ms, persistence 2617.1 ms
  • present 7504: 2830.2 ms at 87900 ms, persistence 547.0 ms
  • present 7242: 488.8 ms at 2071 ms, persistence 464.1 ms
  • present 7487: 2165.7 ms at 22455 ms, persistence 450.1 ms
  • present 7496: 2762.1 ms at 67834 ms, persistence 383.3 ms
  • present 7484: 756.0 ms at 20808 ms, persistence 342.4 ms
  • present 7416: 184.0 ms at 8410 ms, persistence 159.2 ms
  • present 7436: 181.9 ms at 9303 ms, persistence 153.8 ms
  • present 7471: 762.2 ms at 16924 ms, persistence 123.9 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
shader prepare 0.0 (0 %) 0.0 (0 %) 343.8 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.8 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.9 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.9 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.8 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.9 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.9 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.9 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.9 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 343.9 0.0 Recorder.Submit 0.0
queue worker 0x50 0.5 (0 %) 343.3 (100 %) 0.1 0.3 Driver.Packet 1.9, Driver.EndSubmission 0.2
queue worker 0x51 0.1 (0 %) 343.7 (100 %) 0.1 0.0 Driver.Packet 3.3, Driver.EndSubmission 0.5
queue worker 0x0 208.6 (61 %) 26.4 (8 %) 108.9 9.9 Driver.Packet 208.4, Driver.Rewind 0.3
draw committer 22.4 (7 %) 0.9 (0 %) 320.6 5.6 Graphics.Draw 21.9, Recorder.Submit 0.4
presenter 0.6 (0 %) 0.9 (0 %) 342.3 0.0 VideoOut.Flip 1.5, Driver.Present 0.0
title 0.4 (0 %) 0.6 (0 %) 342.9 0.2 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 343.8 0.1 Shader.ResolveAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 343.9 0.0 Shader.Register 0.0
title 0.0 (0 %) 0.0 (0 %) 343.9 0.0 Shader.Register 0.0
title 0.0 (0 %) 0.3 (0 %) 343.6 0.1 Shader.Register 0.0, Recorder.Submit 0.0
draw finisher 16.3 (5 %) 0.0 (0 %) 327.5 14.0 Driver.DrawFinish 16.3
title 0.6 (0 %) 0.0 (0 %) 343.3 0.1 Shader.ResolveGraphicsStagesAbi 0.4, Shader.ResolveAbi 0.2
title 0.0 (0 %) 0.0 (0 %) 343.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 343.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 343.7 0.1 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 343.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.2 (0 %) 0.0 (0 %) 343.7 0.1 Shader.ResolveAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 343.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 343.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 343.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 343.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x2a 1.1 (0 %) 342.8 (100 %) 0.0 0.3 Driver.Packet 1.2, Driver.EndSubmission 0.0
queue worker 0x2b 1.4 (0 %) 341.9 (99 %) 0.5 0.4 Driver.Packet 9.3, Driver.EndSubmission 0.0
queue worker 0x23 0.1 (0 %) 343.3 (100 %) 0.4 0.0 Driver.Packet 0.1, Driver.EndSubmission 0.0
queue worker 0x4a 0.5 (0 %) 82.9 (24 %) 260.5 0.8 Driver.Packet 0.6, Driver.Completion 0.0
queue worker 0x4b 0.2 (0 %) 299.1 (87 %) 44.6 0.1 Driver.Packet 0.5, Driver.EndSubmission 0.0
title 0.0 (0 %) 0.0 (0 %) 343.8 0.0 Shader.Register 0.0
queue worker 0x22 1.5 (0 %) 270.2 (79 %) 72.2 0.3 Driver.Packet 1.6, Driver.Completion 0.0
gpu 142.7 (41 %) 0.0 (0 %) 201.2 0.0 batch 142.7

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 2379.5, Driver.WorkerWait.dequeue_order 1206.3, Driver.WorkerWait.idle_and_completion_poll 1173.1, Driver.Packet 226.9, Driver.Packet.dispatch 195.8, Driver.Dispatch 195.4, Driver.SplitLookup 176.5, Driver.SplitDispatch 161.5, batch 142.7, Recorder.Sync 101.5

Longest waits

  • Driver.WorkerWait (queue worker 0x4b) 63800.1 ms at 21609 ms, present 7485
  • Driver.WorkerWait (queue worker 0x23) 26379.4 ms at 26334 ms, present 7488
  • Driver.WorkerWait (queue worker 0x2a) 26374.4 ms at 26339 ms, present 7489
  • Driver.WorkerWait (queue worker 0x2b) 26370.2 ms at 26343 ms, present 7489
  • Driver.WorkerWait (queue worker 0x50) 26358.6 ms at 26375 ms, present 7489
  • Driver.WorkerWait (queue worker 0x51) 26355.6 ms at 26378 ms, present 7489
  • Driver.WorkerWait (queue worker 0x22) 26340.5 ms at 26373 ms, present 7489
  • Driver.WorkerWait (queue worker 0x4a) 10635.8 ms at 11404 ms, present 7468
  • Driver.WorkerWait (queue worker 0x4a) 8410.3 ms at 889 ms, present 7229
  • Driver.WorkerWait (queue worker 0x4b) 7802.8 ms at 1862 ms, present 7237

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 4142: 1482.4 ms at 42297 ms, present 7489: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 1483.4, Vulkan.Dispatch (queue worker 0x0) 81.0, Vulkan.Dispatch.shader_resources (queue worker 0x0) 77.7, Resources.Complete (queue worker 0x0) 32.4
  • batch 4126: 1469.8 ms at 30175 ms, present 7489: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 1470.3, Vulkan.Dispatch (queue worker 0x0) 114.1, Vulkan.Dispatch.shader_resources (queue worker 0x0) 110.1, Resources.Prepare (queue worker 0x0) 44.9
  • batch 4140: 1425.4 ms at 40764 ms, present 7489: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 1426.4, Vulkan.Dispatch (queue worker 0x0) 79.0, Vulkan.Dispatch.shader_resources (queue worker 0x0) 75.8, Resources.Complete (queue worker 0x0) 31.8
  • batch 4144: 1407.3 ms at 43890 ms, present 7489: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 1408.4, Vulkan.Dispatch (queue worker 0x0) 84.7, Vulkan.Dispatch.shader_resources (queue worker 0x0) 81.0, Resources.Complete (queue worker 0x0) 33.4
  • batch 4130: 1400.9 ms at 33255 ms, present 7489: GPU no ranges; recorded by Recorder.Sync (queue worker 0x0) 1402.0, Vulkan.Dispatch (queue worker 0x0) 83.7, Vulkan.Dispatch.shader_resources (queue worker 0x0) 80.1, Resources.Complete (queue worker 0x0) 33.2

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: AMD Radeon RX 9070, AMD driver 2.0.416 (Vulkan 1.4.359), Windows 11
  • AI-assisted: yes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Sampler-table validation now accounts for device support for sampler features, avoiding incorrect validation results when device capabilities differ.
  • Performance
    • Repeated validation of equivalent sampler-table entries is more efficient.

Remi-Bon and others added 4 commits November 22, 2026 20:19
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e context address

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…max reduction

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
samplerTableCapabilityTests runs one table entry three times per field,
with the field supported, unsupported, then supported again, for min/max
reduction, anisotropic filtering, the anisotropy and LOD bias limits and
mirror-once clamping. Dropping any of them from the verdict key now fails
a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Sampler-table validation

Layer / File(s) Summary
Verdict caching and capability coverage
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
addSamplerTable reuses cached verdicts keyed by sampler descriptors and device limits. It stores verdicts for groups that fit within capacity and clears the cache at 65,536 entries. Tests check poison counts for supported and unsupported sampler capabilities. The new tests run in the default graphics test sequence.

Change: Refactor

Merge Risk: Minimal · up to 2207e

This change caches sampler-table validation results to cut repeated work, and it adds tests for capability-dependent outcomes. No concrete merge-blocking issue was found. The tests have not been re-run for this import, so a normal CI run is advisable before merging.

Security architecture risk: Minimal · up to 2207e

AGC Driver reuses sampler-table decisions only when the guest descriptor and relevant device settings match. Device capacity checks and rejection handling still apply to each capture. The reviewed change does not establish a weaker validation boundary or a new production entrypoint.

Security review details

Security Blast Radius

  • inferred — Guest descriptor values affect cache occupancy across graphics contexts in the same process. The memo is capped at 65,536 entries and shares only validation results, not device handles or resources.

Trust Boundaries and Controls

  • inferred — A verdict from another context can replace repeated validation only when the descriptor and the relevant host device inputs match. It cannot override the current table's capacity or supply a sampler object to the current context.

Resilience and Maintainability Implications

  • inferred — A miss creates no in-progress record; competing captures can validate independently. The mutex protects publication, lookup, and eviction. A verdict can survive a later capture failure, but it does not stand for resource allocation or descriptor publication, which a retry still performs. Eviction requires no recovery beyond validating again on the next miss.

Rollout and rollback

  • inferred — The current device's capabilities and capacity still determine whether a group may proceed; there is no new operator approval step. The memo is in memory only, so rolling back to the merge-base behavior requires no cache migration or cleanup.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Cppcheck (2.22.0)

Cppcheck (2.22.0) exceeded its 180-second time budget. Findings from completed work are retained; remaining checks are incomplete.

core/libs/prx/libSceAgcDriver/tests/Graphics.cpp

Cppcheck interrupted; analysis of this file is incomplete

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 2
  • Waived: $0.50 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5668a0e-0c16-4315-b565-4acabfe862c5
Commits

Reviewing files that changed from the base of the PR and between 4131f51 and 2207e08.

Files selected for processing: 2

  • core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
  • core/libs/prx/libSceAgcDriver/tests/Graphics.cpp

Limit details: You’ve used all 10 included reviews currently available.

@github-actions github-actions Bot added the perf Performance change label Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants