Skip to content

perf(agc): view straddling sampled surfaces through their allocations' imports - #26859

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
GabbeHags:perf/sampled-import-segments
Nov 25, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
GabbeHags:perf/sampled-import-segments

Conversation

@GabbeHags

Copy link
Copy Markdown
Contributor

What

A sampled surface that crosses two guest allocations, each with its own host import, is joined into one new import before its storage image can serve it (#25946). The join pins and write-watches the whole run again. In Mafia: Definitive Edition's city load, two 323-layer 512x512 cube arrays (233 and 467 MiB) straddle import boundaries: the first lookup joins a 668 MiB run, the second a 680 MiB run that re-pins the first, ~150 ms each on queue worker 0 (vkAllocateMemory ~90 ms, GuestMemory::ImportWatched 35-55 ms, settle ~14 ms).

Block-unit storage images already upload, refresh and store through import segments (StorageTexture::importSegments), so a surface that the existing imports cover piece by piece now counts as host-imported:

  • HostImportSegmentsCover (GuestBufferMemory): existing imports cover the range one per registered allocation, a new import starting at a 64 KiB boundary, the same rules as importSegments. It makes no import.
  • StorageSegmentsServe (Texture): that cover, for a surface whose storage image is block-unit.
  • SampledFromStorageEligible (resource form) accepts such a surface, so the lookup views its storage image without joining, and Revalidate agrees.
  • PresyncSurfaces treats a block-unit storage image (or a view of one) covered that way as GPU-direct, like a single import.
  • perf(agc): import GPU-written sampled surfaces that no import covers #25946's join still runs whenever this does not apply (an allocation not imported yet, a surface that is not block-unit). APS5_NO_IMPORT_SEGMENT_VIEWS=1 always joins as before (docs/dev/ENVIRONMENT.md).

Tests: agc_driver_host_import_windows gains SegmentsCoverAdjacentImports (two adjacent imported allocations, an unimported one, a range inside one allocation, a range past them, cleared imports). agc_driver_sampled_surface_import scenario 3 (the GPU wrote the surface through each allocation's import) now expects a view over the segments without a joined import, and still checks every texel against what the GPU wrote; agc_driver_sampled_surface_import_joined runs the suite with APS5_NO_IMPORT_SEGMENT_VIEWS=1 to keep the joined path covered.

tools/pr_overlap.py --branch could not rule out 24 open PRs that edit the same files. I compared each diff: none changes the functions above, and each applies to this branch exactly as it applies to main.

Tested

Windows 11 (10.0.26200), NVIDIA GeForce RTX 2070 SUPER, driver 617.14, 3840x2160. Mafia: Definitive Edition (PPSA36458, 01.002.000), city load from a save. main is 8170c10; the change was measured as 4b0f68b99c on that base (this branch is the same commit rebased onto 214d3c7, with no conflicts in its files). Only libSceAgcDriver.prx differed between the two installs. One warm-up run first.

The load stall (slowest frame) over four pairs of runs:

main this PR
pair 1 (APS5_TRACE_SECONDS=35:20) 2171.5 ms 1882.0 ms
pair 2 (30:40) 2230.0 ms 1915.9 ms
pair 3 (30:40) 2226.8 ms 1949.3 ms
pair 4 (30:40, the attached traces) 2152.8 ms 1995.4 ms
the two slowest dispatch builds (Resources.Complete) 147-181 ms each 15-111 ms

With timers added during development, the two cube-array lookups went from 156.8 / 167.5 ms to 9.5 / 11.0 ms; their storage images upload through 2 segments in ~9 ms each.

The window percentiles below differ mostly because the stall falls at a different point of the window in each run. Over the same stretch, 5-12 s after the stall, frames match: p50 55.5 vs 55.7 ms, p90 78.4 vs 78.1 ms (pair 4). The ~55 ms city frames are the same on both builds and are not changed here (this main does not include #26800).

Traces: I will attach aps5-trace-8170c102d48a-6160.json.gz (main) and aps5-trace-4b0f68b99cdc-11648.json.gz (this PR).

Focused tests on main and this PR with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer (validation layer 1.4.363.1), ctest -R "agc_driver_(host_import_windows|host_import_alias_failure|partial_resident_alias|sampled_|partially_resident)" -V: 14 of 14 pass on main, 15 of 15 on this PR (the new _joined variant). Each log shows Insert instance layer "VK_LAYER_KHRONOS_validation" (19 and 21 times), no was not found line, 0 VUID- on both. tools/check_conventions.py passes.

aps5-summary.jsonl lines

main:

{"commit":"8170c102d48a","dirty":false,"env":{"APS5_LOG_TIMESTAMPS":"1","APS5_NET_DISCONNECTED":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"30:40"},"gpu":"NVIDIA GeForce RTX 2070 SUPER","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":32418,"title_id":"PPSA36458","title":"Mafia: Definitive Edition for PS5\u00c2\u00ae","content_version":"01.002.000","resolution":"3840x2160","window":{"spec":"seconds 30:40","first_present":1458,"ms":40035.158},"presents":1725,"frame_ms":{"p50":16.711,"p90":39.964,"p99":82.418,"max":2152.754},"gpu_busy_ms_per_present":6.342,"worker_busy_pct":{"queue worker 0x0":26.485},"phase_totals_ms":{"Driver.Completion":0.834,"Driver.Dispatch":2665.219,"Driver.Dispatch.capture_resources":27.469,"Driver.Dispatch.decode_key_device_setup":1516.83,"Driver.Dispatch.lookup_cache":0.388,"Driver.Dispatch.materialize":300.59,"Driver.Dispatch.prepared_invocation":1.544,"Driver.Draw":1662.414,"Driver.Draw.device_setup":31.874,"Driver.Draw.draw_enqueued":91.35,"Driver.Draw.post_compile_prepare":17.156,"Driver.Draw.prepare":75.766,"Driver.Draw.shader_compile_and_link":1226.309,"Driver.EndSubmission":1.279,"Driver.Packet":10600.87,"Driver.Packet.device_lock":20.515,"Driver.Packet.dispatch":2666.921,"Driver.Packet.draw":1669.288,"Driver.Packet.execute":85.449,"Driver.Packet.flip_flush":65.294,"Driver.Packet.flush_between_packets":47.251,"Driver.Packet.pipeline_drain":5630.748,"Driver.Packet.pipeline_prepare":28.86,"Driver.Packet.prepare_memory":45.765,"Driver.Packet.rendering_wait":0.984,"Driver.Present":2978.694,"Driver.Present.acquire_image":12.6,"Driver.Present.device_setup":0.571,"Driver.Present.gpu_mutex_wait":180.799,"Driver.Present.inflight_wait":2.875,"Driver.Present.present_display_buffer":238.024,"Driver.Present.queue_present":200.71,"Driver.Present.release_and_callback":1.709,"Driver.Present.render_fence_wait":2338.421,"Driver.Present.resize":1.752,"Driver.Present.validate":0.408,"Driver.Suspend":0.258,"GpuMutex.wait.dispatch":166.862,"GpuMutex.wait.draw":1046.184,"GpuMutex.wait.end":26.139,"GpuMutex.wait.fill":135.464,"GpuMutex.wait.flush":282.733,"GpuMutex.wait.hook":0.385,"GpuMutex.wait.label":809.846,"GpuMutex.wait.other":180.795,"GpuMutex.wait.present":178.461,"GpuMutex.wait.wait":32.069,"Graphics.Draw":3386.585,"Graphics.Draw.draw_and_resource_release":2750.207,"Graphics.Draw.index_upload":458.367,"Graphics.Draw.validate":68.007,"Graphics.Draw.vertex_upload":100.781,"Graphics.DrawWithRecipe":514.686,"Graphics.DrawWithRecipe.draw_and_resource_release":360.48,"Graphics.DrawWithRecipe.index_upload":102.965,"Graphics.DrawWithRecipe.validate":4.708,"Graphics.DrawWithRecipe.vertex_upload":21.672,"Graphics.Submit":0.143,"Graphics.Submit.command_end":0.009,"Graphics.Submit.queue_submit":0.13,"Graphics.Wait":18.408,"Graphics.Wait.fence_wait":18.356,"Recorder.Reap":96.658,"Recorder.Submit":530.789,"Recorder.Sync":1645.401,"Recorder.WaitSerial":15.975,"Resources.Complete":931.101,"Resources.Prepare":266.358,"Shader.DrawStage":1135.123,"Shader.DrawStage.capture_resources":379.031,"Shader.DrawStage.materialize":727.841,"Shader.DrawStage.prepared_invocation":26.321,"Shader.PrepareArtifact":330.269,"Shader.Register":17.908,"Shader.ResolveAbi":99.254,"Shader.ResolveGraphicsAbi":131.986,"Shader.ResolveGraphicsStagesAbi":175.031,"VideoOut.Flip":24184.793,"VideoOut.Flip.completion_mutex_wait":1.223,"VideoOut.Flip.config_mutex_wait":0.09,"VideoOut.Flip.frame_limit":2.58,"VideoOut.Flip.notify_game":350.275,"VideoOut.Flip.present":2982.156,"VideoOut.Flip.validate":1.168,"VideoOut.Flip.vblank_wait":20837.747,"VideoOut.Flip.window_prepare":1.696,"VideoOut.Flip.window_title":3.496,"VideoOut.Readiness":2.986,"VideoOut.Readiness.locks_validate":0.668,"Vulkan.Acquire":11.454,"Vulkan.Acquire.acquire_fence_wait":2.349,"Vulkan.Acquire.acquire_image":6.117,"Vulkan.Acquire.fence_reset":2.122,"Vulkan.Acquire.retired_swapchains":0.496,"Vulkan.Dispatch":570.527,"Vulkan.Dispatch.command_record":23.663,"Vulkan.Dispatch.shader_resources":546.495,"Vulkan.DispatchRecipe":13.352,"Vulkan.DispatchRecipe.command_record":13.344,"Vulkan.DrawFromRecipe":516.802,"Vulkan.GraphicsPipeline":26.779,"Vulkan.GraphicsPipeline.modules_and_state":25.675,"Vulkan.GraphicsPipelineLibrary":0.014,"Vulkan.GraphicsPipelinePrebuild":27.523,"Vulkan.Present":109.21,"Vulkan.Present.command_record_scale":40.36,"Vulkan.Present.pixel_upload":6.064,"Vulkan.Present.queue_submit":61.849,"Vulkan.QueuePresent":198.493,"Vulkan.QueuePresent.queue_present":197.074,"Vulkan.Retire":2338.302,"Vulkan.Retire.wait":2327.908},"top_phases_ms_per_frame":{"VideoOut.Flip":14.02,"VideoOut.Flip.vblank_wait":12.08,"Driver.Packet":6.145,"Driver.Packet.pipeline_drain":3.264,"Graphics.Draw":1.963,"VideoOut.Flip.present":1.729,"Driver.Present":1.727,"Graphics.Draw.draw_and_resource_release":1.594},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":293,"Graphics.Barrier.dcc-clear":3438,"Graphics.Barrier.dcc-keys":494,"Graphics.Barrier.dispatch-lead":457,"Graphics.Barrier.dispatch-trail":756,"Graphics.Barrier.draw":48588,"Graphics.Barrier.fill":1137,"Graphics.Barrier.input-mirror":1319,"Graphics.Barrier.label-run":56192,"Graphics.Barrier.present-blit":3450,"Graphics.Barrier.shadow-publish":88,"Graphics.Barrier.staging-in":149,"Graphics.Barrier.staging-out":74,"Graphics.Barrier.storage-upload":2496,"Graphics.Barrier.storage-writeback":2931,"Graphics.BarrierMerged.dispatch-lead":299,"Graphics.BarrierMerged.fill":649,"Graphics.BarrierMerged.shadow-publish":88,"Graphics.BarrierMerged.staging-in":73,"Graphics.BarrierMerged.staging-out":74,"Graphics.BarrierMerged.storage-writeback":411,"Graphics.Copy":2182,"Graphics.Copy.bytes":1835196856,"Graphics.RenderPass":24379,"Graphics.RenderPass.Close.command":2909,"Graphics.RenderPass.Close.image":964,"Graphics.RenderPass.Close.key":8569,"Graphics.RenderPass.Close.new-batch":11862,"Graphics.RenderPass.Continued":8406},"trace_dropped":false,"trace":"aps5-trace-8170c102d48a-6160.json.gz"}

this PR:

{"commit":"4b0f68b99cdc","dirty":false,"env":{"APS5_LOG_TIMESTAMPS":"1","APS5_NET_DISCONNECTED":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"30:40"},"gpu":"NVIDIA GeForce RTX 2070 SUPER","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":32418,"title_id":"PPSA36458","title":"Mafia: Definitive Edition for PS5\u00c2\u00ae","content_version":"01.002.000","resolution":"3840x2160","window":{"spec":"seconds 30:40","first_present":1549,"ms":40056.101},"presents":1494,"frame_ms":{"p50":16.715,"p90":54.426,"p99":122.426,"max":1995.44},"gpu_busy_ms_per_present":7.425,"worker_busy_pct":{"queue worker 0x0":31.402},"phase_totals_ms":{"Driver.Completion":0.853,"Driver.Dispatch":2548.533,"Driver.Dispatch.capture_resources":24.552,"Driver.Dispatch.decode_key_device_setup":1633.901,"Driver.Dispatch.lookup_cache":0.42,"Driver.Dispatch.materialize":296.783,"Driver.Dispatch.prepared_invocation":1.457,"Driver.Draw":1697.818,"Driver.Draw.device_setup":28.006,"Driver.Draw.draw_enqueued":89.084,"Driver.Draw.post_compile_prepare":15.884,"Driver.Draw.prepare":70.573,"Driver.Draw.shader_compile_and_link":1264.158,"Driver.EndSubmission":1.097,"Driver.Packet":12576.377,"Driver.Packet.device_lock":18.323,"Driver.Packet.dispatch":2550.079,"Driver.Packet.draw":1704.183,"Driver.Packet.execute":72.479,"Driver.Packet.flip_flush":66.105,"Driver.Packet.flush_between_packets":42.366,"Driver.Packet.pipeline_drain":7663.423,"Driver.Packet.pipeline_prepare":25.348,"Driver.Packet.prepare_memory":81.802,"Driver.Packet.rendering_wait":0.896,"Driver.Present":3096.146,"Driver.Present.acquire_image":11.167,"Driver.Present.device_setup":0.533,"Driver.Present.gpu_mutex_wait":153.062,"Driver.Present.inflight_wait":2.64,"Driver.Present.present_display_buffer":214.645,"Driver.Present.queue_present":202.252,"Driver.Present.release_and_callback":1.507,"Driver.Present.render_fence_wait":2507.798,"Driver.Present.resize":1.473,"Driver.Present.validate":0.361,"Driver.Suspend":0.228,"GpuMutex.wait.dispatch":152.508,"GpuMutex.wait.draw":1437.203,"GpuMutex.wait.end":19.384,"GpuMutex.wait.fill":108.418,"GpuMutex.wait.flush":498.571,"GpuMutex.wait.hook":3.548,"GpuMutex.wait.label":1784.939,"GpuMutex.wait.other":134.749,"GpuMutex.wait.present":151.063,"GpuMutex.wait.wait":79.962,"Graphics.Draw":3133.154,"Graphics.Draw.draw_and_resource_release":2412.492,"Graphics.Draw.index_upload":501.652,"Graphics.Draw.validate":63.71,"Graphics.Draw.vertex_upload":147.106,"Graphics.DrawWithRecipe":687.155,"Graphics.DrawWithRecipe.draw_and_resource_release":503.078,"Graphics.DrawWithRecipe.index_upload":148.807,"Graphics.DrawWithRecipe.validate":3.855,"Graphics.DrawWithRecipe.vertex_upload":29.753,"Graphics.Submit":0.265,"Graphics.Submit.command_end":0.013,"Graphics.Submit.queue_submit":0.249,"Graphics.Wait":193.096,"Graphics.Wait.fence_wait":192.987,"Recorder.Reap":81.156,"Recorder.Submit":424.782,"Recorder.Sync":2467.179,"Recorder.WaitSerial":13.964,"Resources.Complete":613.38,"Resources.Prepare":140.508,"Shader.DrawStage":1177.212,"Shader.DrawStage.capture_resources":429.346,"Shader.DrawStage.materialize":720.78,"Shader.DrawStage.prepared_invocation":25.301,"Shader.PrepareArtifact":316.123,"Shader.Register":18.254,"Shader.ResolveAbi":83.454,"Shader.ResolveGraphicsAbi":138.449,"Shader.ResolveGraphicsStagesAbi":168.429,"VideoOut.Flip":20745.972,"VideoOut.Flip.completion_mutex_wait":0.988,"VideoOut.Flip.config_mutex_wait":0.102,"VideoOut.Flip.frame_limit":2.229,"VideoOut.Flip.notify_game":378.537,"VideoOut.Flip.present":3098.407,"VideoOut.Flip.validate":1.081,"VideoOut.Flip.vblank_wait":17256.078,"VideoOut.Flip.window_prepare":1.508,"VideoOut.Flip.window_title":3.199,"VideoOut.Readiness":3.048,"VideoOut.Readiness.locks_validate":0.62,"Vulkan.Acquire":10.169,"Vulkan.Acquire.acquire_fence_wait":2.083,"Vulkan.Acquire.acquire_image":5.404,"Vulkan.Acquire.fence_reset":1.849,"Vulkan.Acquire.retired_swapchains":0.506,"Vulkan.Dispatch":365.623,"Vulkan.Dispatch.command_record":13.806,"Vulkan.Dispatch.shader_resources":350.094,"Vulkan.DispatchRecipe":3.933,"Vulkan.DispatchRecipe.command_record":3.92,"Vulkan.DrawFromRecipe":688.92,"Vulkan.GraphicsPipeline":26.027,"Vulkan.GraphicsPipeline.modules_and_state":24.941,"Vulkan.GraphicsPipelineLibrary":0.014,"Vulkan.GraphicsPipelinePrebuild":26.737,"Vulkan.Present":94.945,"Vulkan.Present.command_record_scale":35.947,"Vulkan.Present.pixel_upload":4.554,"Vulkan.Present.queue_submit":53.666,"Vulkan.QueuePresent":200.381,"Vulkan.QueuePresent.queue_present":199.075,"Vulkan.Retire":2507.802,"Vulkan.Retire.wait":2494.735},"top_phases_ms_per_frame":{"VideoOut.Flip":13.886,"VideoOut.Flip.vblank_wait":11.55,"Driver.Packet":8.418,"Driver.Packet.pipeline_drain":5.129,"Graphics.Draw":2.097,"VideoOut.Flip.present":2.074,"Driver.Present":2.072,"Driver.Packet.dispatch":1.707},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":335,"Graphics.Barrier.dcc-clear":2934,"Graphics.Barrier.dcc-keys":498,"Graphics.Barrier.dispatch-lead":441,"Graphics.Barrier.dispatch-trail":740,"Graphics.Barrier.draw":43575,"Graphics.Barrier.fill":1151,"Graphics.Barrier.input-mirror":1307,"Graphics.Barrier.label-run":50271,"Graphics.Barrier.present-blit":2988,"Graphics.Barrier.shadow-publish":93,"Graphics.Barrier.staging-in":149,"Graphics.Barrier.staging-out":74,"Graphics.Barrier.storage-upload":3253,"Graphics.Barrier.storage-writeback":2782,"Graphics.BarrierMerged.dispatch-lead":299,"Graphics.BarrierMerged.fill":647,"Graphics.BarrierMerged.shadow-publish":93,"Graphics.BarrierMerged.staging-in":73,"Graphics.BarrierMerged.staging-out":74,"Graphics.BarrierMerged.storage-writeback":410,"Graphics.Copy":1830,"Graphics.Copy.bytes":1222899607,"Graphics.RenderPass":21899,"Graphics.RenderPass.Close.command":2665,"Graphics.RenderPass.Close.image":934,"Graphics.RenderPass.Close.key":7559,"Graphics.RenderPass.Close.new-batch":10625,"Graphics.RenderPass.Continued":7666},"trace_dropped":false,"trace":"aps5-trace-4b0f68b99cdc-11648.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 2070 SUPER, driver 617.14, Windows 11 (10.0.26200)
  • AI-assisted: yes

🤖 Generated with Claude Code

…' imports

A sampled surface that crosses two guest allocations, each with its own host
import, was joined into one new import before its storage image could serve
it. The join pins and watches the whole run again: in Mafia: Definitive
Edition's city load, two cube arrays (233 and 467 MiB) joined 668 and 680 MiB
runs, ~150 ms each on the queue worker, the second one re-pinning the first.

Block-unit storage images already upload, refresh and store through import
segments, so a surface that the existing imports cover piece by piece now
counts as host-imported: HostImportSegmentsCover checks the cover without
making an import, SampledFromStorageEligible accepts such a block-unit
surface, and PresyncSurfaces treats it as GPU-direct like a single import.
APS5_NO_IMPORT_SEGMENT_VIEWS=1 joins as before.

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

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The changed code and relevant callers were reviewed at head a10bb470b1a58742d8acac3d790bb5c35176af87; no verified blocking defect was found, but repository checks and tests were not run in this session.

What I ran

  • Read the prepared description, commits, manifest and complete diff; the repository reader was pinned to the stated head.
  • Read all eight changed files: GuestBufferMemory.hpp, Texture.hpp, GuestBufferMemory.cpp, ShaderResources.cpp, Texture.cpp, agc_driver_sampled_cache_budget_tests.cmake, HostImportWindows.cpp, SampledCacheBudget.cpp, and ENVIRONMENT.md (nine files total).
  • Read targeted implementation and caller ranges for registered allocation coverage, storage-segment eligibility, sampled resource selection and presync, and storage image import uploads/refresh behavior.
  • No commands or tests were run. Author-reported test and performance results were not independently verified.

Results

Check Result Note
Changed code review passed No verified blocking defect
Focused tests not run Author reports 15 of 15 pass
Conventions check not run Author reports it passes
Runtime performance not run Hardware results are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • No tests, convention checks, build, or runtime checks were run in this session.
  • The author-reported Windows 11/NVIDIA runtime measurements and Vulkan validation output were not independently confirmed.
  • Excluded files: none; all changed files listed in manifest.json were read. The three oversized implementation files were read through repo_read.py at targeted ranges, not in full.

To get this to a good state

Nothing is required.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 13809 docs/dev/ENVIRONMENT.md L409
PR 26593 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp L56
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp L1706

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1896 docs/dev/ENVIRONMENT.md
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 4472 docs/dev/ENVIRONMENT.md
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6280 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6340 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6924 docs/dev/ENVIRONMENT.md
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7085 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7275 docs/dev/ENVIRONMENT.md
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sampled_cache_budget_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/ENVIRONMENT.md
PR 7643 docs/dev/ENVIRONMENT.md
PR 9318 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 docs/dev/ENVIRONMENT.md
PR 9387 docs/dev/ENVIRONMENT.md
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sampled_cache_budget_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/ENVIRONMENT.md
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 9897 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sampled_cache_budget_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/ENVIRONMENT.md
PR 10442 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 10492 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10743 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 11435 docs/dev/ENVIRONMENT.md
PR 11436 docs/dev/ENVIRONMENT.md
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12324 docs/dev/ENVIRONMENT.md
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
PR 12746 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 12792 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 12840 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 12849 docs/dev/ENVIRONMENT.md
PR 12944 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13148 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13251 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13796 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sampled_cache_budget_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/ENVIRONMENT.md
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sampled_cache_budget_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/ENVIRONMENT.md
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 14262 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 14871 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 15136 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 15295 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15296 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15297 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15456 docs/dev/ENVIRONMENT.md
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 15621 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 16217 docs/dev/ENVIRONMENT.md
PR 16793 docs/dev/ENVIRONMENT.md
PR 16831 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 16879 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 17557 docs/dev/ENVIRONMENT.md
PR 17719 docs/dev/ENVIRONMENT.md
PR 17729 docs/dev/ENVIRONMENT.md
PR 18173 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 18185 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 18226 docs/dev/ENVIRONMENT.md
PR 18390 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 19697 docs/dev/ENVIRONMENT.md
PR 20172 docs/dev/ENVIRONMENT.md
PR 20183 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 20248 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 20315 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 20519 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 20580 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 21225 docs/dev/ENVIRONMENT.md
PR 21238 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 21649 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 22071 docs/dev/ENVIRONMENT.md
PR 22190 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 22424 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 22434 docs/dev/ENVIRONMENT.md
PR 22531 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 22546 docs/dev/ENVIRONMENT.md
PR 22550 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/HostImportWindows.cpp
PR 22647 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 23242 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 23975 docs/dev/ENVIRONMENT.md
PR 24327 docs/dev/ENVIRONMENT.md
PR 24445 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 24631 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sampled_cache_budget_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/ENVIRONMENT.md
PR 24661 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 25610 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 26165 docs/dev/ENVIRONMENT.md
PR 26197 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 26436 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp

@mihiii1337 mihiii1337 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head a10bb470b1a58742d8acac3d790bb5c35176af87 on Windows 11 with the physical NVIDIA GeForce RTX 4070 Laptop GPU (10de:2860, driver 621.01, Vulkan 1.4.357). With ANYPS5_REQUIRE_VULKAN=1, shader caching disabled, and VK_LAYER_KHRONOS_validation forced, the focused host-import/partial-residency/sampled set passed 15/15 with no skips. The three sampled-surface import variants then passed three repeated runs each (9/9). Loader output confirmed the RTX device and validation layer for all 30 Vulkan process launches; there were no VUIDs or missing-layer diagnostics.

Conventions and git diff --check passed. The full overlap scan initially checked 2,511 other open PRs; after intervening merges, the refreshed 2,498-PR inventory reproduced the same 246 candidates. All 102 reported rows and the remaining 144 shared-file candidates were manually classified. The real pair conflicts with #13809 and #26593 are independent adjacent additions that both need to be retained; no duplicate implementation or additional semantic overlap was found, and the merge preview against current main is clean.

I did not replicate the author's game/performance traces or test console hardware.

AI-assisted review: yes.

@github-actions github-actions Bot added the perf Performance change label Nov 25, 2026
@zedekvdb

Copy link
Copy Markdown
Contributor

Test run on Pascal, next to the RTX 2070 SUPER title measurement in the description: on a Quadro P3200 the import and sampled-cache tests pass on main and with this head, and the new joined case passes.

Setup: Windows 11 Pro 10.0.26300, NVIDIA Quadro P3200 (Pascal, 10de:1bbb), driver 582.42, Vulkan API 1.4.312, WinLibs GCC 15.2.0 r7, Release, main 7f99fbd60d. VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ANYPS5_GPU="Quadro P3200", ctest -R "^(agc_driver_host_import_windows.*|agc_driver_sampled_surface_import.*|agc_driver_sampled_cache_budget.*)$" -j 1 -V, 2 runs per side. Every Vulkan test selects the Quadro P3200 with the layer inserted; there are no VUID- messages.

main This head (a10bb470b1)
agc_driver_host_import_windows, agc_driver_sampled_surface_import, _off, and the 5 agc_driver_sampled_cache_budget* tests 8 of 8, 2 of 2 runs 8 of 8, 2 of 2 runs
agc_driver_sampled_surface_import_joined (new) 2 of 2

The new case prints split surfaces imported whole from a partial import and from a pending write, short view refused, GPU-written texels sampled through the joined import.

AI-assisted: yes (Claude Code)

@oneandonlydean
oneandonlydean merged commit 732ccc4 into boykopovar:main Nov 25, 2026
14 checks passed
@milescoviello

Copy link
Copy Markdown
Contributor

A/B on MXGP 26 (PPSA30839), Linux, RTX 4070 Ti (NVIDIA 615.71.09), main fbd2175e5c, which includes this PR. One 600 s run per arm, back to back, with the same scripted input:

  • main: the title stops at 62 s, before its first present, on guest allocation 0x10ff800000+0x200000 is still pinned by GPU work or an import (waited 60000 ms for the lease (APS5_PIN_WAIT_MS)).
  • main with APS5_NO_IMPORT_SEGMENT_VIEWS=1: the title runs the full 600 s, with 2,382 presents. That is in line with the 2,345 to 2,698 presents of its five runs on the mains before this PR (43524d1c4 and older), which all ran the full 600 s.

With one run per arm this points at the segment views but does not prove the cause. I have not yet found which of the two uses holds the pin: the sampled views of storage images, or the skipped presync of dispatches over storage images whose imports come in segments. I'm looking into it and will post what I find here.

@milescoviello

Copy link
Copy Markdown
Contributor

A correction to my comment above. MXGP's next regular run, on main 098c73473f, ran the full 600 s with 2,616 presents with the segment views on, and no file this PR touched changed between fbd2175e5c and that main. So the 62 s stop is intermittent, and the one failing run and one passing run above do not show that the segment views cause it. A storage-write reproduction also passed with the views on and off, in 3 of 3 runs: two adjacent imported allocations, a dispatch storing to a surface across them, a flush, then freeing one of them with a 3 s pin wait. Sorry for pointing at this PR too early. If the stop comes back, I'll take a stack dump during the wait before saying more.

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.

6 participants