perf(agc): wait at REWIND submit only for bound program preparations #27821
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27821"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by notaxeltv on 2026-11-27T14:07:04Z.
What
Driver::Submittreated any submission that ends in a REWIND like an incomplete program scan and waited for every queued registration preparation. The pre-REWIND commands are already scanned byReferencedPrograms; waiting for the whole pool stalled titles that issue many REWINDs (see #27705 / PPSA38500).Submit now waits for referenced preparations whenever the pre-REWIND scan is complete (same as other complete submissions). When the queue worker copies the released REWIND tail, it runs the same complete-vs-all wait on the tail's commands.
Tested
Windows 11, NVIDIA GeForce RTX 3080:
ctest --test-dir build -R '^agc_driver_prepared_shaders$'on this PR and onmain(both Passed) withANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationwas set; the loader reported the layer was not installed on this machine (was not found but was requested), so validation-layer insert / VUID comparison could not be completed here.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-27T14:13:30Z.
Review: COMMENTED
Actionable comments posted: 1
724a8e80-3b40-4dc6-ac9e-c440dacd5478Reviewing files that changed from the base of the PR and between
2b6c1b0445and86158a042f.core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cppcore/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cppdocs/dev/debt/changes/fix-agc-rewind-referenced-preparations.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T14:34:51Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the code and changed files reviewed support merging.
What I ran
Reviewed head
1771355ea8438af491d6e20b289131fe2a0849a1. I did not run commands or tests. I readreview/description.md,review/commits.md,review/manifest.json,review/diff.patch, and all three changed files listed in the manifest.review/files.jsonwas unavailable through the reader.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports
agc_driver_prepared_shaderspassed on the PR andmain, but I did not run those tests. The Vulkan validation layer was not installed on the author's host, so validation-layer comparison was not completed. The changed-file list could not be cross-checked againstreview/files.jsonbecause it was not available.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-11-27T14:43:21Z.
Review: COMMENTED
Linux RADV validation on
1771355ea843andmain2b6c1b044528using an RX 6650 XT and Khronos Vulkan validation 1.4.363 with synchronization validation enabled.agc_driver_pm4passed on both builds. The default and indirectagc_driver_prepared_shadersCTests passed on both. The loader inserted the validation layer and the logs showed zero Vulkan validation errors.I also ran the same supplemental fixture on both builds with an unrelated preparation held behind a gate. Main waited for it at submit. The PR admitted the complete prefix and drained the released tail, whose scan was incomplete, while the unrelated preparation was still held. An incomplete prefix still waited on both builds.