perf(agc): reuse immutable buffer copies and batch uploads #1364
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1364"
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 TibixDev on 2026-10-08T00:23:09Z.
Status after review
Needs topic split and isolated title measurements.
The body now lists the legacy integration dependencies raised in review: #1324, #1357, #1359, #1360 and #1361. #1334 is merged and is not an open prerequisite. Current main's descriptor, snapshot and import-lifetime changes must be preserved; the historical branch copies cannot be treated as current dependencies.
The requested split remains necessary: copied-buffer version retention, batched upload pages, and shader-data streaming are three separate changes. The old combined 25 → 15.5 µs result cannot establish any one's benefit. The new main + experimental NGS Skyrim loading profile does identify expensive uploads, but it neither isolates immutable read-only reuse nor separates page batching from streaming. It is a useful lead, not before/after evidence for this head. No speculative large rebase or claim that its budget fix resolves the architectural/performance review.
What
Reuse immutable copies of read-only guest buffers. Upload small inputs and shader data into aligned batch pages. Keep each slice alive through GPU completion, preserve descriptor offsets, and invalidate cached copies only when their contents or backing change.
Tested
Earlier branch-specific tests and measurements remain in the discussion. They have not been rerun on a redesigned current-main version of this PR. The review audit and shared NGS-assisted title exploration do not establish that this head is merge-ready. No full Linux/Windows platform CI was dispatched in this pass.
Checklist
Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T07:31:06Z.
Rebased on
1e1e1390. Preserved the #1113 batch memory budget and included retained draw-upload pages in its byte count. The upload fixture checks each buffer is counted once and that completion removes the bytes. Existing snapshot, mapping, and descriptor coverage remains intact.Fedora 44 Release:
agc_driver_graphics_tests,agc_driver_pm4_tests,guest_mapping_history_tests,agc_driver_recorder_tests,agc_recorder_kept_bytes_testsbuild; the targeted tests and contribution checks pass. Windows CI is pending.RADV and lavapipe:
--copied-buffers-only,--shader-data-only,--draw-upload-only,--draw-snapshot-only,--draw-descriptors-onlypass with core and synchronization validation; no validation errors.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:40:25Z.
Review: CHANGES_REQUESTED
Thanks for the work here. This can't be merged as is:
main, so nothing here can land before them. The Depends on line lists #1334 (already merged) and #1360; please list the whole stack.main(ShaderResources.hpp/.cpp,Recorder.cpp,GuestBufferMemory.cpp,GuestAllocations.cpp,tests/Recorder.cpp) after the recent descriptor and snapshot changes, so it needs the author rather than a mechanical rebase.main; on #1324 @oneandonlydean measured no frame-time change and that question is still open.Please rebase once the base PRs are merged and we will review it again.
Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-12T04:52:19Z.
Review-pass update:
The body now lists the legacy integration dependencies raised in review: #1324, #1357, #1359, #1360 and #1361. #1334 is merged and is not an open prerequisite. Current main's descriptor, snapshot and import-lifetime changes must be preserved; the historical branch copies cannot be treated as current dependencies.
The requested split remains necessary: copied-buffer version retention, batched upload pages, and shader-data streaming are three separate changes. The old combined 25 → 15.5 µs result cannot establish any one's benefit. The new main + experimental NGS Skyrim loading profile does identify expensive uploads, but it neither isolates immutable read-only reuse nor separates page batching from streaming. It is a useful lead, not before/after evidence for this head. No speculative large rebase or claim that its budget fix resolves the architectural/performance review.
I have updated the PR description to match this status. The PR remains open; the outstanding review requirements are not being marked resolved. AI-assisted audit.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T05:09:48Z.
Closing for now: it carries three topics on a stack, and the author said it needs a redesign. With the queue this large we're closing stalled perf PRs that don't show a gain in a title; reopen it with before/after numbers from a title scene (the summary lines from the performance report form) if you pick it up again.
Pull request closed