fix(agc): ignore unchanged import touches in stored-range checks #22306
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22306"
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 VicRaster on 2026-11-17T11:30:02Z.
What
An unchanged host-import touch can make
StoredOverreport a CPU store after a neighbouring page in the same 64 KiB block is written. A storage image can then retain stale guest bytes instead of publishing its GPU result in the shared edge block.Use #22062's real-store accounting for
StoredOver. This branch carries that prerequisite and keeps the storage and tracker regressions from published headb54ec28cc5. The GPU regression follows the device's actual import policy; comparison-mode imports skip after draining recorder work, preserving the published RADV correction.The local current-main update resolves the depth-publication conflict using frankea's tested composition: retain the page/byte
StoreUnchangedSinceLastCollectcheck before main'scause != DepthReadCause::Access && cause != DepthReadCause::Writerefusal and guest-byte copy. Main's #21719 strict writable-buffer refusal and guest-write retirement remain intact. The native publication test runs its ShaderBufferWrite, GuestWriteAfterRead and UndecidedShaderBufferWrite controls. Debt changes use fragments, retain current main's entry and measured-driver information, and remove the duplicate entries produced by the automatic merge.Status: #22062 remains open and is still the prerequisite. This branch carries its accounting; the additional StoredOver correction remains a separate follow-up.
Tested
23 November 2026, main
f5b7e1d1ac816c41cb798d09ecbf42cf2e7e9edfversus head62bcbcf0bd7533ee8b944cf4a5b23992775e4336. Windows 11 build 26300, WinLibs GCC 15.2.0 Release, NVIDIA GeForce RTX 3080 Ti driver 610.88, Khronos validation 1.4.363 (pinned Vulkan-Headers 1.4.335).Built the focused targets from pinned dependency sources in a fresh build tree, then rebuilt the candidate in the same tree. Ran all
agc_write_tracking*,agc_driver_native_depth_*,agc_driver_native_multisample_depth,agc_storage_import_segment_memo, and the candidate's addedagc_storage_import_touchwith verbose CTest output,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=layer.The one added case is
agc_storage_import_touch; it executes and passes. No existing case changes result.agc_driver_native_depth_driver_queued_fillskips on both revisions because the device's import policy does not support that case. Every passing GPU case logs actual validation-layer insertion and selects the RTX 3080 Ti. Neither log has a missing-layer message,Validation Error,VUID-, orSYNC-HAZARD.Negative control: ran the candidate recorder executable from a separate directory with the exact archived main driver and dependencies. The storage-import regression exits 1 with
an import-window touch beside a store dropped 57344 new GPU texels after an earlier write-back. It passes with the candidate driver. This compares the full stacked candidate with main; it is not a new main-plus-#22062 control.Conventions, whitespace and debt-fragment checks pass. The name lookup completed across 2,501 open PRs, but the names are internal functions and the export lookup reports them as undeclared; it does not establish globally clean overlap. This is a focused Windows validation, not a full-suite, Linux, macOS, RADV or title rerun.
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T00:54:49Z.
Review: COMMENTED
Reviewed — no blocking findings
The change addresses the reported import-touch accounting issue, and the inspected code and regression coverage support the fix; no checks were run in this review.
What I ran
Reviewed head
f21a7ef7dc0345ac390cc9c18856ce7ec2fe8c0c. No commands or tests were run; this session provided the pinned reader only. The author reports focused tests passing on Windows with an RTX 3080 Ti; that result was not independently verified.Read the prepared description, commit list, manifest, and diff. Read the changed code and relevant context in
GuestMemory.hpp,GuestMemory.cpp,DepthSurface.cpp,WriteTracking.cpp,Recorder.cpp,agc_driver_recorder_tests.cmake, andNativeMultisampleDepth.cpp, plus the added debt fragment.Recorder.cppfull text was excluded from the review folder; its relevant changed section was read through the pinned reader. No other changed file was excluded.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The reported builds, focused tracking and storage tests, Vulkan validation, Linux behavior, and other GPU behavior were not independently run or confirmed. No merged-preview check was performed.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T11:54:48Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected changes consistently separate import-window touches from CPU stores and use that distinction in stored-range and depth-publication checks; no blocking defect was verified.
What I ran
Reviewed head
a54f5a0b43a08a90c6691c2378ee6deeafa1cb0c. No build or tests were run in this review.Results
Findings
Blocking
None verified in the inspected code.
Non-blocking
None.
Sources
Reviewed the prepared diff and pinned-head source for
GuestMemory.hpp,GuestMemory.cpp,DepthSurface.cpp,Recorder.cpp,WriteTracking.cpp,agc_driver_recorder_tests.cmake,NativeMultisampleDepth.cpp, anddocs/dev/debt/libSceAgcDriver.md.Not verified
Build and test results in the description were not independently run. Full-file context beyond the relevant changed hunks was not read.
files.jsonwas not available; the review-folder listing reports eight changed files, all of which were inspected at relevant hunks. The largeRecorder.cppfile was read through the pinned-head reader around its changed function and dispatch path.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T23:27:44Z.
Review: COMMENTED
Reviewed — no blocking findings
The changed accounting and publication paths are internally consistent with the stated import-touch behavior; the supplied test report supports the exercised paths, while I did not run checks in this review.
What I ran
b54ec28cc5f7c0ed1e14467fa723c20ade0970ddusing the prepared diff and the pinned repository reader.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp, whose full text was excluded from the review folder. I inspected its added hunk in the prepared diff only; surrounding implementation and callers in that file were not verified.review/files.json; excluded-file details are therefore based on the manifest and supplied description.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T09:38:24Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change based on the code inspected; the focused regressions align with the tracker and publication changes.
What I ran
No commands were run. The bundle reports focused Windows tests and a negative control; these results are author-reported, not independently verified. Head reviewed:
62bcbcf0bd7533ee8b944cf4a5b23992775e4336.Results
Findings
Blocking
None identified in the inspected changes.
Non-blocking
None.
Not verified
The changed
core/libs/prx/libSceAgcDriver/tests/Recorder.cppwas read only around its new regression and dispatch; its full text was excluded from the review folder. The rest of the changed files listed in the manifest were read from the bundle or at the pinned head. No tests were run independently, and the reported Windows validation, other operating systems, GPUs, and title behavior were not verified.review/files.jsonwas not available through the reader; exclusion status was taken fromreview/manifest.json.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T06:08:29Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the focused implementation and regression cases support the stated fix, while platform and title coverage remains limited.
What I ran
Reviewed head
3d8d444998c3a5e9e924261354026971ddf5a86b. No commands or tests were run in this review; the Windows validation and negative control described in the PR are author-reported.Results
Findings
Blocking
None.
Non-blocking
Not verified
No build or tests were run by the reviewer. The PR description’s test results and negative control were not independently verified. Reviewed all changed files listed in the manifest, including
Recorder.cppandNativeMultisampleDepth.cppthrough the pinned repository reader; none were excluded. The review folder did not providefiles.json, so its exclusion list could not be independently checked.To get this to a good state
Nothing is required. Optional: run the focused cases on Linux and macOS, and on RADV, to broaden platform coverage.