Repository navigation
Conversation
Take exclusive ownership of an exact table while proving and replaying it. Recollect unchanged snapshot ranges at a new queue ordering point and keep mixed tables within their original collect epoch.
Share mixed tables when their tracked snapshot ranges prove current. Re-resolve volatile entries on the consuming queue so pending image writes are visible without rebuilding the other descriptors.
Bind variants against the representative that resolved on this use. Retry unavailable representatives without dropping unrelated sampled entries.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Refactor Merge Risk:
|
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
No verified blocking defect was found in the changed code; the author’s test and performance results were not independently verified.
What I ran
Reviewed head 9088e8583cef6953bc98824c737b090b483c0df0 using the pinned repo_read.py reader and the prepared diff. No tests or performance captures were run. The author reports 13/13 tests passed; the baseline and same-scene performance capture are pending.
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 2660 2850
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 5125 5205
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7138 7305
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7300 7465
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7385 7590
python3 repo_read.py search 'CollectWrites(' core/libs/prx/libSceAgcDriver
Results
| Check | Result | Note |
|---|---|---|
| Changed files | passed | Read 3 of 3 reviewed files |
| Tests | not run | Author reports 13/13 passed |
| Performance report | not run | Baseline and matched capture pending |
Findings
Blocking
None.
Non-blocking
- The description identifies this as a performance change, but its baseline and same-scene performance capture are pending. Add the required matched performance evidence before treating the performance claim as verified.
Not verified
- Test results and validation-layer output reported by the author were not run or independently confirmed.
- Performance impact was not measured.
description.md,commits.md,diff.patch,manifest.json,files.json, and the three changed files were read. No files were excluded by the bundle rules.
To get this to a good state
Nothing is required. Optional: attach the pending baseline and same-scene performance capture to support the performance claim.
|
Windows at this head ( Setup:
The added test lines are not inside a platform guard. AI-assisted: yes. |
The host allocator can fill the address left by the rejected variant fixture before the dispatch tries to resolve it. Remove the guest allocation but keep its address inaccessible until the test finishes. Windows decommits the pages in the guest arena and POSIX protects the mapping with mprotect.
|
The Linux sweep found that a host allocation could reuse the rejected variant's address before dispatch. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this; the performance evidence below is optional, and the formal decision remains open because the reported capture does not exercise this change.
What I ran
Reviewed head 6ef2299ff53cffd4c662f15665d0539e642a09eb using repo_read.py at the pinned head. No build or tests were run. Reader commands:
repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 2660 2850
repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 5115 5195
repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7110 7409
repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7240 7410
repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7411 7580
repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp 2460 2505
repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp 2630 2660
The initial reader call could not log to the read-only run directory; subsequent reads disabled logging. No base merge-preview check was run. No local toolchain or environment measurements were taken.
Results
| Check | Result | Note |
|---|---|---|
| Source review | passed | Relevant changed paths inspected |
| Automated tests | not run | Would require executing the test target |
| Negative control | not run | No test or source mutation performed |
| Performance evidence | not run | Author reports the capture scene does not exercise this change |
Negative control
Not run; no source mutation or test execution was performed.
Findings
Blocking
None.
Non-blocking
- The reported performance capture is for a scene the description says does not exercise the changed cross-queue table reuse. Its results therefore do not establish the performance effect of the shared cache. The description also says the matching performance capture is pending. (Changed cache lookup:
ShaderResources.cpp:2757.)
Sources
Not verified
Read all three paths listed under reviewed in files.json. Read the full included CMake test-registration file and the changed test sections; for the large ShaderResources.cpp, read the relevant changed hunks and surrounding functions through the pinned reader, not the whole file. files.json lists no excluded paths; the full source file was not included in files/ because it exceeded the review-folder size limit. Author-reported test and hardware results were not independently run. Performance on a workload exercising this change was not verified.
To get this to a good state
Nothing is required. Optional: provide a matched baseline and PR capture on a workload that exercises cross-queue image-table reuse, with the required summaries, traces, and digest output.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head 549b172a11a5521545dc123bbf053e1c66e4e660 against the prepared diff. No merged preview was run. I used the pinned repo_read.py reader for targeted source ranges and inspected the prepared diff and test configuration. I did not run tests or compile code.
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 2660 2840
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 5100 5205
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7125 7415
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7275 7414
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 7415 7565
Results
| Check | Result | Note |
|---|---|---|
| Source review | passed | Core cache and revalidation paths inspected |
| PR tests | not run | Author reports 13/13 passed |
| Performance capture | not run | Relevant capture is reported as pending |
Negative control
Not run; I did not execute tests or alter code under test.
Findings
Blocking
None.
Non-blocking
- The performance evidence does not establish the change’s impact. The description says the supplied
video_out_flip_backlogscene does not exercise the changed code and that baseline, remapping coverage, and a same-scene capture are pending. A representative capture would help evaluate this performance change. Changed cache creation and sharing logic.
Sources
Behavior claims about cross-queue table reuse and revalidation are based on the pinned source ranges in ShaderResources.cpp and the reuse path. Test coverage was inspected in agc_driver_image_table_reuse_tests.cmake and selected ranges of ImageTableReuse.cpp.
Not verified
- No tests or performance captures were run by this review. The test results and captures in the PR description are author-reported.
ShaderResources.cppandImageTableReuse.cppwere read selectively, not in full. The CMake test configuration was read in full. All three changed files listed as reviewed infiles.jsonwere inspected; no files were excluded by rule.- Windows and physical-console behavior were not independently verified.
To get this to a good state
Nothing is required.
What
A dynamic-resolution variant with an unavailable representative could force the driver to rebuild unrelated entries in its image table. The driver now retries that representative on each use and applies the same borrowing checks it uses when building a table. The variant still rejects when the representative cannot be bound.
Part of #28913.
Tested
Windows 11, MinGW GCC 15.2.0, Vulkan SDK 1.4.363.
ctest --test-dir build -R ^agc_driver_image_table_reuse -V -j 1passed 13/13. The loader insertedVK_LAYER_KHRONOS_validationin all 13 tests. 0 VUID on the change.Tests passed:
agc_driver_image_table_reuse,agc_driver_image_table_reuse_draw_pipeline,agc_driver_image_table_reuse_plan_verify,agc_driver_image_table_reuse_rejected_variant,agc_driver_image_table_reuse_shared_table,agc_driver_image_table_reuse_retaken_depth_surface,agc_driver_image_table_reuse_retaken_cleared_depth_surface,agc_driver_image_table_reuse_retaken_mirrored_depth_surface,agc_driver_image_table_reuse_retired_depth_surface,agc_driver_image_table_reuse_entry_limit,agc_driver_image_table_reuse_entry_memo,agc_driver_image_table_reuse_records,agc_driver_image_table_reuse_records_narrow. The new fixture checks that a table continues to reuse valid siblings and rejects the same variant on build and reuse after its representative’s backing is released. The baseline run, remapping coverage and same-scene performance capture are pending.Performance captures used the repository's
video_out_flip_backlogscene on the same Linux machine with an NVIDIA GeForce RTX 3060 (driver 610.57.04). The test queues 180 flips of generated 259×137 buffers at 20 FPS. Each build was warmed once. Captures alternated main and PR head withAPS5_TRACE_SECONDS=1:4.The scene does not exercise the code changed by this PR. These captures only check capped presentation for regressions. The p99 ranges overlapped. No presentation regression was observed in this scene.
The first capture from each build is shown with its
tools/trace_digest.pysummary.Main, first run and trace digest
seconds 1:4 from present 20: 81 presents, frame p50 50.0 / p90 50.0 / p99 50.1 / max 50.1 ms, GPU busy 0.0 ms per present
NVIDIA GeForce RTX 3060, NVIDIA 610.57.04, Linux 6.12.107+deb13-amd64, 259x137, commit e6d40cc, dropped: no
{"commit":"e6d40cce3e43","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:4"},"gpu":"NVIDIA GeForce RTX 3060","driver":"NVIDIA 610.57.04","os":"Linux 6.12.107+deb13-amd64","cpu":"13th Gen Intel(R) Core(TM) i5-13500T","cpu_threads":20,"memory_mib":31841,"resolution":"259x137","window":{"spec":"seconds 1:4","first_present":20,"ms":4049.993},"presents":81,"frame_ms":{"p50":50.0,"p90":50.014,"p99":50.069,"max":50.069},"gpu_busy_ms_per_present":0.0,"worker_busy_pct":{"queue worker 0x0":0.0},"phase_totals_ms":{"Driver.Present":110.5,"Driver.Present.acquire_image":1.965,"Driver.Present.device_setup":0.236,"Driver.Present.gpu_mutex_wait":0.348,"Driver.Present.inflight_wait":0.805,"Driver.Present.present_display_buffer":17.203,"Driver.Present.queue_present":88.519,"Driver.Present.release_and_callback":0.113,"Driver.Present.render_fence_wait":0.807,"Driver.Present.resize":0.283,"Driver.Present.validate":0.146,"Recorder.Submit":0.06,"VideoOut.Flip":3998.627,"VideoOut.Flip.completion_mutex_wait":0.105,"VideoOut.Flip.config_mutex_wait":0.085,"VideoOut.Flip.frame_limit":3932.702,"VideoOut.Flip.notify_game":1.025,"VideoOut.Flip.present":110.828,"VideoOut.Flip.validate":0.079,"VideoOut.Flip.vblank_wait":0.082,"VideoOut.Flip.window_prepare":0.777,"VideoOut.Flip.window_title":0.286,"Vulkan.Acquire":1.73,"Vulkan.Acquire.acquire_fence_wait":0.287,"Vulkan.Acquire.acquire_image":1.146,"Vulkan.Acquire.fence_reset":0.225,"Vulkan.Acquire.retired_swapchains":0.039,"Vulkan.Present":16.467,"Vulkan.Present.command_record_scale":8.295,"Vulkan.Present.pixel_upload":6.164,"Vulkan.Present.queue_submit":1.922,"Vulkan.QueuePresent":88.254,"Vulkan.QueuePresent.queue_present":88.028,"Vulkan.Retire":0.801,"Vulkan.Retire.wait":0.252},"top_phases_ms_per_frame":{"VideoOut.Flip":49.366,"VideoOut.Flip.frame_limit":48.552,"VideoOut.Flip.present":1.368,"Driver.Present":1.364,"Driver.Present.queue_present":1.093,"Vulkan.QueuePresent":1.09,"Vulkan.QueuePresent.queue_present":1.087,"Driver.Present.present_display_buffer":0.212},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.present-blit":162,"Graphics.Copy":81,"Graphics.Copy.bytes":31850496},"trace_dropped":false,"trace":"aps5-trace-e6d40cce3e43-1304347.json.gz"}Slowest frames (largest slices inside each, inclusive)
Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): VideoOut.Flip 49.4, VideoOut.Flip.frame_limit 48.6, VideoOut.Flip.present 1.4, Driver.Present 1.4, Driver.Present.queue_present 1.1
Longest waits
PR head, first run and trace digest
seconds 1:4 from present 20: 81 presents, frame p50 50.0 / p90 50.0 / p99 50.0 / max 50.0 ms, GPU busy 0.0 ms per present
NVIDIA GeForce RTX 3060, NVIDIA 610.57.04, Linux 6.12.107+deb13-amd64, 259x137, commit 9088e85, dropped: no
{"commit":"9088e8583cef","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:4"},"gpu":"NVIDIA GeForce RTX 3060","driver":"NVIDIA 610.57.04","os":"Linux 6.12.107+deb13-amd64","cpu":"13th Gen Intel(R) Core(TM) i5-13500T","cpu_threads":20,"memory_mib":31841,"resolution":"259x137","window":{"spec":"seconds 1:4","first_present":20,"ms":4050.007},"presents":81,"frame_ms":{"p50":49.999,"p90":50.013,"p99":50.049,"max":50.049},"gpu_busy_ms_per_present":0.0,"worker_busy_pct":{"queue worker 0x0":0.0},"phase_totals_ms":{"Driver.Present":110.038,"Driver.Present.acquire_image":2.694,"Driver.Present.device_setup":0.183,"Driver.Present.gpu_mutex_wait":0.467,"Driver.Present.inflight_wait":0.736,"Driver.Present.present_display_buffer":23.892,"Driver.Present.queue_present":80.159,"Driver.Present.release_and_callback":0.159,"Driver.Present.render_fence_wait":1.082,"Driver.Present.resize":0.387,"Driver.Present.validate":0.165,"Recorder.Submit":0.079,"VideoOut.Flip":3996.845,"VideoOut.Flip.completion_mutex_wait":0.225,"VideoOut.Flip.config_mutex_wait":0.02,"VideoOut.Flip.frame_limit":3930.549,"VideoOut.Flip.notify_game":1.519,"VideoOut.Flip.present":110.411,"VideoOut.Flip.validate":0.136,"VideoOut.Flip.vblank_wait":0.109,"VideoOut.Flip.window_prepare":0.795,"VideoOut.Flip.window_title":0.492,"Vulkan.Acquire":2.322,"Vulkan.Acquire.acquire_fence_wait":0.418,"Vulkan.Acquire.acquire_image":1.477,"Vulkan.Acquire.fence_reset":0.318,"Vulkan.Acquire.retired_swapchains":0.057,"Vulkan.Present":22.83,"Vulkan.Present.command_record_scale":11.893,"Vulkan.Present.pixel_upload":8.131,"Vulkan.Present.queue_submit":2.667,"Vulkan.QueuePresent":79.811,"Vulkan.QueuePresent.queue_present":79.443,"Vulkan.Retire":1.12,"Vulkan.Retire.wait":0.349},"top_phases_ms_per_frame":{"VideoOut.Flip":49.344,"VideoOut.Flip.frame_limit":48.525,"VideoOut.Flip.present":1.363,"Driver.Present":1.358,"Driver.Present.queue_present":0.99,"Vulkan.QueuePresent":0.985,"Vulkan.QueuePresent.queue_present":0.981,"Driver.Present.present_display_buffer":0.295},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.present-blit":162,"Graphics.Copy":81,"Graphics.Copy.bytes":31850496},"trace_dropped":false,"trace":"aps5-trace-9088e8583cef-1304680.json.gz"}Slowest frames (largest slices inside each, inclusive)
Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): VideoOut.Flip 49.3, VideoOut.Flip.frame_limit 48.5, VideoOut.Flip.present 1.4, Driver.Present 1.4, Driver.Present.queue_present 1.0
Longest waits
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Created with GPT-6.2 Sol in Codex.
Summary by CodeRabbit