fix(agc): drop pending storage results over memory the guest unmapped #22018
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22018"
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 JJenkx on 2026-11-17T01:34:24Z.
What
When a title unmaps guest memory under a storage image whose GPU results are still pending, the next write-back stops on
libkernel's
Unmapunregisters the write watch directly (GuestWriteWatchUnregister), soStorageTexture::SaveBeforeUnwatchnever runs for that range. The results then have neither a watch nor saved guest bytes to merge against.The store already drops results whose memory is no longer registered (commit
e3ce9bac0784,memory no longer registered; N pending ranges dropped). Bendy and the Ink Machine maps the same range again before the store, so the range is registered, the drop does not apply, and the store refuses.This marks, in the unmap observer that already retires unmapped depth planes (
retireUnmapped), the pending units the unmapped range covers completely (StorageTexture::NoteUnmapped), in the pending images and in those being flushed, whose stores have not yet reached the check. A unit the range covers only in part is not marked, so the results over its still-mapped bytes are stored as before. They stay pending while the unmap is in progress, asagc_driver_idle_store_over_unmaprequires, and the store drops marked units instead of writing them (withoutUnmappedat the start ofwriteBackLayers). A unit that receives new results is unmarked, so results drawn after the range was mapped again are stored. A protection change does not reach the observer, so it marks nothing. The observer is installed once the first storage image is created (StorageTexture::Created). Each image keeps an atomic flag for whether any of its units is marked, so images with no marked unit do not take the lock or walk their units on each draw.The new debt fragment records the behaviour as "Unmapped storage images", next to "Unmapped depth planes": what the console does with such a store is not known.
Evidence
Bendy and the Ink Machine (PPSA27616) stops this way about 82 s after launch on this PR's base
963137c40642in 2 of 4 runs; in the other two the range was no longer registered when the store ran, so the existing drop applied. Earlier: 2 of 2 runs onmain8332b52dbf80with #21973 (an unrelated shader change), and 4 of 4 on1403ec8de74and3894f2e1847(both with #16053 reverted locally). With local diagnostics: the refused image was0x21c1d0000and the firstUnmapthe title made was0x21c1d0000+0x1fe0000; no unwatch throughGuestMemorytouched any refused range.Tested
Latest published head
a6bd7faca7e8(2026-11-22 report).The merge and title-check report records integration of main
1d1587ced3b0. Main moved depth retirement toretireGuarded(address, bytes, replaced)with an unmap wrapper; this PR keepsStorageTexture::NoteUnmappedin that wrapper, so target replacement does not discard storage results. The report records Bendy (PPSA27616), pristine saves and Cross every 10 seconds from 20 seconds: 3/3 topic runs reach 120 seconds and exit 0, versus 6/6 stops on comparison mainbdb46a43392bwith the storage write-back refusal. These are the existing worker-reported results at those pins, not a new run or speed measurement. Earlier synthetic and native results below remain historical to their named revisions.Historical main refresh (2026-11-19): head
4554869645c773bfc5ea652ea8acbee5c95d2a62is one linear commit on main40206fe50daa1eca5ba72fe2da70bd505efe977f. The conflict inmarkLayersPendingkeeps both the unmapped-unit clearing and main’s known-zero invalidation memoization; the original PR’s added/removed lines are preserved in every changed file. Same Recorder fixture sources and 11 registrations on both sides: current-main production plus fixtures passes 9/11, failing only the complete-unit unmap and partly-unmapped-image witnesses; the refreshed change passes 11/11. AMD RX 6650 XT/RADV Mesa26.2.7, Linux, KHR validation1.4.363, required Vulkan, shader cache off, no skips or VUIDs. Both fresh full SDK builds passed and the builder source/configuration was restored. No new title, FPS, Windows, macOS or console claim. Historical evidence below retains its own pins. Build/test logs, JUnit, exact source delta and bank manifests, SHA-256ec584b701e0ad9194721f251202b680f22e78b63c2e45f4a8e4b733a7adc807b(downloaded and all payload hashes verified).Linux 7.2, AMD Ryzen 9 7950X, AMD Radeon RX 6650 XT (RADV, Mesa 26.2.7), Release, on
main963137c40642+ this PR (head91684d451c1b).agc_storage_pending_unmapped: a storage image with a pending clear over a registered, watched block; the block is removed throughGuestAllocations(the observer marks the units), unwatched without the hook as libkernel'sUnmapdoes, and registered again before the store, as Bendy and the Ink Machine does. The store does not throw, the block keeps its bytes and nothing stays pending. The range is then watched again and the image cleared again: the store writes the new results over the whole block.agc_storage_pending_partly_unmappeddoes the same with only the first half of the image (units 0 and 1 of 4): those units are dropped, the store does not throw and nothing stays pending. Withmain'sTexture.cpp,Texture.hppandMultisampleTarget.cpp, both tests fail with the refusal above; with this PR both pass.agc_storage_pending_unit_part_unmapped: the range is unwatched while nothing is pending, the image is cleared, and 4 KiB inside unit 1 is removed throughGuestAllocationsand added again before the store. Every byte of the image, including the rest of unit 1, holds the cleared value after the store. With the earlier marking of every overlapped unit, this test fails (results over the still-mapped bytes of a partly unmapped unit were not stored).agc_driver_idle_store_over_unmappasses: the results stay pending while the unmap is in progress and are settled after it.ctest -j 6 -R "agc_storage|agc_driver_recorder|unmap|Unmap": 33 of 35 pass;agc_storage_pending_key_refreshandagc_storage_clear_hand_overskip on this device (it reports watched host memory written after a GPU read, and compares host imports); both skips come from those device checks, not from this change.agc_storage_pending_partly_unmappedcannot show the stored half;agc_storage_pending_unit_part_unmappeduses an unwatched range for that reason.main963137c40642: 2 of 2 runs with this PR reach the end of the run, 2 of 2 more onda1eaf267d54, 3 of 3 ond2930cfc0fddand 1 of 1 on the current head91684d451c1b(52.8 to 53.8 fps over 60-80 s, no refusal); 11 of 11 counting earlier heads of this branch. Its unmap0x21c1d0000+0x1fe0000covers all 510 units of the refused image, so the narrower mark covers it; 2 of 4 onmainstop on the refusal at 82 s. Mean fps over 60-80 s is 53.5 to 53.9 on both.mainon average over 60-120 s. No speed change is claimed. A profile of the first version showed the per-unit unmark at about 1.2% of samples; the atomic flag removed it. Details are in the comments.tools/debt_fold.py --checkcurrently stops on main on two libSceLibreSsl3 fragments that change the same entry, unrelated to this PR; with only this PR's fragment it applies.Contributor-reported Windows NVIDIA validation from @maskym: RTX 2070 SUPER results. All changed tests passed. The broad run retained baseline failures and an unavailable Windows test; two additional parallel failures passed three isolated reruns on both trees. Khronos validation was loaded and added no VUID errors. This is independent contributor evidence, not a run on our paused Windows host.
Contributor-reported AddressSanitizer evidence from @GiannisG1:
agc_driver_store_over_untrackedheap-use-after-free. With ASan and UBSan, two copies of each arm ran at once for 50 rounds, 100 runs per arm. Base40206fe50dread a freed allocation incompareUntrackedin 3 of 100 runs; head4554869645did so in 0 of 100. They note that 0 of 100 at that rate is not conclusive by itself.Contributor-reported Windows NVIDIA validation of head
4554869645from @4le22io: RTX 4060 results. No regressions, and the new tests pass.Main merge (2026-11-20):
3daea689c25emerges main7d2270cb862e. The only conflict was the list of recorder test modes, and both sides are kept.agc_storage_pending_unmapped,agc_storage_pending_partly_unmapped,agc_storage_pending_unit_part_unmappedandagc_storage_pending_after_unwatchpass;agc_storage_pending_key_refreshskips, as before.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)Independent contributor @4le22io reports a Windows 11 Pro 10.0.26200 / RTX 4060 / NVIDIA 621.01 / i5-12400F / GCC 15.2.0 Release comparison with Khronos validation 1.4.363.1 on this exact PR head. Report and commands: main
d9a86b6f15versus main plus4554869645, three focused runs per tree: 32/32 main and 35/35 change, zero VUIDs and all Vulkan cases loading the layer. A separate control with main production and PR fixtures failed the two unmap witnesses and full Recorder test as expected. The broad AGC suite retained the same three tracked failures on both trees. These are contributor-reported results, not a new test on our Windows host; no title or FPS gain is inferred.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T04:03:46Z.
Review: COMMENTED
Reviewed — no blocking findings
The diff was read in full and the changed ranges of
Texture.cppwere read at the head; nothing was built or run, so this rests on reading. Nothing blocks this; the points below are optional.What I ran
fbc2620ec21efa071b990b0f6c945b4a3356619e, basemain. Merge preview not run.repo_read.py):Results
Texture.cppagc_storage_pending_unmappedFindings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:6352:StorageTexture::NoteUnmappedwalks every texture inpending.texturesunderpending.mutexon each unmap.ScanPending(Texture.cpp:6330) narrows the same set withpending.textures.MayOverlap. Using the same index here would keep the unmap path short when many storage images are pending.core/libs/prx/libSceAgcDriver/tests/Recorder.cpp:9044:pendingUnmappedTestsremoves the whole block, so every pending unit is marked. The mixed case inwithoutUnmapped(Texture.cpp:7428, where some marked units are stored and others dropped) and a partial unmap of one 64 KiB unit are not exercised.Not verified
markLayersPending(Texture.cpp:4638,4653,6761,6927) or ofwriteBackLayers(Texture.cpp:2917,7382) already holdPending().mutex. The new lock atTexture.cpp:4752and the one inwithoutUnmappedwould deadlock if they did. The enclosing functions were not read.NoteUnmappedtakesPending().mutex) and theGuestAllocationslock, and the new call toUpdateResidentImageUnmapObserver_nid_no_patchin the static initializer atTexture.cpp:1775.files.jsonwas not read.tools/debt_fold.py --check: not run and not checked.Sources
Texture.cppwithoutUnmappedcallTexture.cppmarkLayersPendingunmarkTexture.cppNoteUnmappedMultisampleTarget.cppretireUnmappedTo get this to a good state
Nothing is required. Optional: run
agc_storage_pending_unmappedand the storage test set on a device, and check the two points under Not verified.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T05:15:49Z.
Review: COMMENTED
Reviewed the changed hunks — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
da1eaf267d54d57dfb32c338950491a4f61e521c, basemain.description.md,commits.md,manifest.json,diff.patchandfiles.jsonfrom the review folder.repo_read.py): searches forNoteUnmapped,Created,withoutUnmapped,writeBackLayers,UpdateResidentImageUnmapObserver_nid_no_patch,cancelStoredSave,retireUnmapped,markLayersPending,DiscardPendingInsideandPending(); rangesTexture.cpp5608–5625, 6262–6290, 6346–6362 and 7360–7490;MultisampleTarget.cpp1214–1240. About 20 reader calls.Results
NoteUnmappedruns beforeguardedMutex;withoutUnmappedtakes only the pending lockmain'sTexture.cpp; not reproducedFindings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:6356marks a whole 64 KiB unit when the unmapped range overlaps only part of it. Results drawn over the still-mapped bytes of that unit are then dropped at the next store as well. The description lists this case as not covered. Either record it in the debt fragment, or add a test with a unit split by a partial unmap.Negative control
Not run. The author reports that both new tests fail on
main'sTexture.cpp,Texture.hppandMultisampleTarget.cpp; I did not reproduce that.Sources
NoteUnmappedwithoutUnmappedandwriteBackLayersretireUnmappedNot verified
Texture.cpp(8027 lines) ortests/Recorder.cpp; both were too large for the review folder. I read their changed hunks through the reader anddiff.patch.Texture.hpp,MultisampleTarget.cpp,agc_driver_recorder_tests.cmakeand the debt fragment were read throughdiff.patchand the reader ranges above, not as full files.withoutUnmappeddrops units without callingreleaseUnheldOriginal(Texture.cpp:7421), unlike the empty write-back path (Texture.cpp:6281). I did not confirm thatoriginalis released on another path, so retained memory is unverified.writeBackLayersand the unmap observer: I checked the paths listed in What I ran, not the rest.To get this to a good state
Nothing is required. The non-blocking point above is optional.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T05:58:05Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: a partly unmapped storage unit drops the pending results over its still-mapped bytes.
What I ran
a0a1151958d9d7a019857dd540d15de3e99917c2(basemain). Read the title, description, commit list, manifest and the fulldiff.patch(458 lines), plus the house-rule sections of the ruling file.Results
Texture.cppFindings
Blocking
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:7416—withoutUnmappeddrops a whole 64 KiB unit when the unmapped range covers only part of it.NoteUnmappedmarks every unit that overlaps the range (core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:6356-6357), and the store then clearslayerPendingandlayerOriginalfor that unit and skips it (core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:7418-7421).docs/dev/debt/changes/fix-agc-discard-storage-results-on-unmap.md:5), and no test covers it: the partial test unmaps two whole units (core/libs/prx/libSceAgcDriver/tests/Recorder.cpp:9188).Non-blocking
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp:1465— once any storage image exists, the unmap observer stays installed for the rest of the process.retireUnmappedthen runs on every unmap, taking the guarded lock and callingforgetSingleClearsandRetireUnmappedDepth, even in titles that never unmap pending storage. The performance evidence covers three titles.Not verified
Texture.cppandRecorder.cppare excluded from the review folder as too large. I read only their changed hunks fromdiff.patchand ran two symbol searches; I did not read their full text. The callers ofNoteUnmappedand ofretireUnmapped, and the lock order betweenPending().mutexand the unmap observer, are not verified.files.jsonwas not read, so the set of reviewed files is not confirmed. This does not change the event, since the verdict is not an approval.e3ce9bac0784and about protection changes were not checked.Sources
NoteUnmappedwithoutUnmappedTo get this to a good state
ctest -j 8 -R "agc_storage|agc_driver_recorder|unmap|Unmap"on the new head, plus the new test.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T06:37:11Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional. The review is partial: no build or test was run, and only selected ranges of the large files were read.
What I ran
Head
d2930cfc0fdd1de65316e861cf274633664be2b4, basemain. No build, no test run, no precheck. Reads were done with the repository reader:Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:6353:NoteUnmappedwalks onlypending.textures.otherPendingOverlaps(Texture.cpp:2967-2971) checkspending.flushingas well. If an image sits inpending.flushingwith pending units when the title unmaps the range, those units are not marked, and the refusal described in the description stays possible. I did not confirm whether a flushing image can hold pending units at that moment. If it can, extend the walk topending.flushing, or explain in the code why it cannot.Not verified
agc_storage_pending_unmapped,agc_storage_pending_partly_unmapped,agc_storage_pending_unit_part_unmapped) and the existing suites: not run.Texture.cpp: only the diff and these ranges were read: 2905-2920, 2962-2975, 6745-6765, 6915-6930, 7360-7386, 7428-7450. The rest of the file was not read.markLayersPendingcallers (Texture.cpp:6762,Texture.cpp:6928): I did not confirm thatpending.mutexis not already held there. A held lock would deadlock on the new lock inmarkLayersPending.withoutUnmappedcallscancelStoredSavewhile it holdspending.mutex. The lock order with the saved-bytes lock was not checked.Texture.hpp,Recorder.cpp,agc_driver_recorder_tests.cmakeand the debt fragment: read through the diff only, not as full files. The claim thattools/debt_fold.py --checkstops on two unrelated fragments onmainwas not checked.Sources
Head
d2930cfc0fdd1de65316e861cf274633664be2b4. Repository paths as cited above.To get this to a good state
Nothing is required.
Optional: build the head and run the three new recorder tests, and answer the flushing question above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T06:55:51Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Head
91684d451c1b, basemain. No build and no tests were run. I read the diff, the description and the commit list, then the head source through the repository reader:Results
Findings
Blocking
None verified.
Non-blocking
Texture.cpp:6362— thepending.flushingloop inStorageTexture::NoteUnmappedhas no test. None of the three new recorder tests puts an image into the flushing list, so a regression there would pass unnoticed. (test-coverage)Recorder.cpp:9165andRecorder.cpp:9273—pendingPartialUnmapTestsandpendingUnitPartUnmapTestsrepeat the setup, watch restore, release guard and surface description ofpendingUnmappedTests(Recorder.cpp:9044), about 100 near-identical lines each. A shared helper would keep the three in step. (simplification)Not verified
NoteUnmappedtakespending.mutexfrom the unmap observer. I did not check whether the observer runs under the GuestAllocations lock, so I cannot rule out an inversion with a path that holdspending.mutexand then takes that lock.StorageTexture::CreatecallsUpdateResidentImageUnmapObserver_nid_no_patch()from its one-time initialiser (Texture.cpp:1775). I did not check which locks that call takes or whetherCreatecan run while they are held.withoutUnmappedruns insidewriteBackLayers, which both callers use (Texture.cpp:2917,Texture.cpp:7385). I did not check whether any other path writes pending results to guest memory without it.layerOriginalon drop.withoutUnmappedsetslayerOriginal[layer] = false(Texture.cpp:7423); the existing drop path (Texture.cpp:2900) only clearslayerPending. I could not tell from the code read whether the difference is intended.Texture.cppandRecorder.cppare excluded from the review folder as too large. I read their changed hunks and the reader ranges above, not the whole files.Sources
Texture.cppunmark inmarkLayersPending(lines 4751–4756):github.com/boykopovar/AnyPS5@91684d451c/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp (L4751-L4756)withoutUnmappedand its use inwriteBackLayers(lines 7412–7434):github.com/boykopovar/AnyPS5@91684d451c/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp (L7412-L7434)To get this to a good state
Nothing is required.
Optional: add a test that puts an image into the flushing list before the unmap, and move the shared test setup into a helper.
Imported from boykopovar/AnyPS5. Originally posted by kurexw on 2026-11-17T07:44:49Z.
Review: COMMENTED
macOS GPU test (Apple M4, MoltenVK 1.4.2, validation layer 1.4.363.1, x86-64 build under Rosetta)
Base:
upstream/maina72186d3cf+ #22056 + #22074 (both needed for the macOS build); PR head91684d451cmerged on top. Built clean (only the known libcurl link failure, #17425).Env per AGENTS.md:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer,ctest -R 'recorder|constant_phi|masked_select|sample_bit_descriptor|pixel_ancillary|scalar_buffer|shader_mode_registers|agc_driver_f64|command_batch|awaited_slot|agc_driver_idle|detiler' -V, 3 runs each on base and PR.VUID-errors.Insert instance layer "VK_LAYER_KHRONOS_validation"; none logswas not found but was requested. The tests without layer lines (agc_constant_phi,agc_masked_select,agc_command_batch_*,pixel_ancillary, ...) never touch the loader.agc_driver_f64_*tests skip (the M4 has noshaderFloat64);agc_driver_recorderfails witha kept vertex window was not mirrored(#20831); the recorder tests each log oneVUID-VkDeviceCreateInfo-sType-uniquefor a duplicatedVkPhysicalDevicePortabilitySubsetFeaturesKHRin the test's own device (#21965).-R storage_pending, 3 runs):agc_storage_pending_unmapped,agc_storage_pending_partly_unmapped,agc_storage_pending_unit_part_unmappedpass 3/3 and actually run here (host imports are available on MoltenVK; e.g.results pending over memory the guest unmapped and mapped again: kept pending during the unmap, dropped at the store; results drawn after it was mapped again stored). Existingagc_storage_pending_after_unwatchandagc_storage_pending_key_refreshpass 3/3. OnlyVUID-is the sType-unique one above.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T21:43:56Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
8b4c23b3deb60fc8c7e2c43df1becc99822d2c88, basemain.description.md,commits.md,manifest.jsonanddiff.patchfrom the review folder, then the house-rule sections of the ruling file.Results
diff.patchwithoutUnmappedandNoteUnmappedtake onlypending.mutexFindings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:6415— the early return inNoteUnmappedonly applies when no image is being flushed. While a flush is in progress, every unmap walks all pending textures under the lock. This is correct, but it costs time on the unmap path only when a flush overlaps an unmap.Sources
github.com/boykopovar/AnyPS5@8b4c23b3de/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp (L7476-L7498)Not verified
writeBackLayers, wherewithoutUnmappedruns. Other store paths were not checked.pending.mutex(taken byNoteUnmappedfrom the unmap observer) and the GuestAllocations lock. No reverse order was found in the code read, but it was not proven.StorageTexture::Create, which callsUpdateResidentImageUnmapObserver_nid_no_patchand its static mutex.layerOriginal = falseon units dropped bywithoutUnmappedwhen the range is later read.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T05:02:48Z.
Review: COMMENTED
Reviewed — comments
The change’s core paths look coherent from the inspected diff, but the two large changed source files were not read in full, so a formal approval is not justified.
What I ran
Reviewed head
4554869645c773bfc5ea652ea8acbee5c95d2a62from the prepared bundle and inspected targeted source ranges withrepo_read.py. No build or tests were run; test results in the PR description are author or contributor reported.Results
Findings
Blocking
None verified in the inspected sections.
Non-blocking
None.
Not verified
The full contents of
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppandcore/libs/prx/libSceAgcDriver/tests/Recorder.cppwere not read; only the changed ranges inTexture.cppand the diff forRecorder.cppwere inspected. No independent build, tests, platform checks, or console behavior were verified. Other changed files read:core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp,core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp,core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake, anddocs/dev/debt/changes/fix-agc-discard-storage-results-on-unmap.md.To get this to a good state
Nothing is required. Optional: complete the review of the two large changed files and run the focused tests before seeking approval.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T08:01:26Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the inspected code supports the described whole-unit discard behavior, and no tests were run in this review.
What I ran
3daea689c25ebdea833fb325cb99fce5a178318eusingrepo_read.py.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
core/libs/prx/libSceAgcDriver/tests/Recorder.cppand its new test functions was not read; its diff and test registration were reviewed.core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp,core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp,core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp,core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake, anddocs/dev/debt/changes/fix-agc-discard-storage-results-on-unmap.md.core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppandcore/libs/prx/libSceAgcDriver/tests/Recorder.cpp(both were read through targeted ranges usingrepo_read.py).To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T07:29:47Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the checks reported by the author support the behavior, and no blocking defect was verified in the code reviewed.
What I ran
Reviewed head
a6bd7faca7e8d0a3e1307b1d2f8827e4813171e7using the prepared diff andrepo_read.py. No build or tests were run in this review.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full contents of
Texture.cppandRecorder.cppwere excluded from the review folder due to size; targeted ranges at the pinned head were read throughrepo_read.py, along with the relevant diff hunks. No local test run or console behavior was verified. Author and contributor test evidence indescription.mdwas not independently reproduced. Other repository files were not reviewed.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T09:00:10Z.
Review: COMMENTED
Reviewed — comments
Changes are required before merge: the per-image unmapped-unit flag can become stale when a pending image is removed from the pending registry, allowing later unmap notifications to access an image outside the tracked lifetime.
What I ran
Reviewed head
42ef51b1f459287df4fc952d975b68c9b6436911usingrepo_read.pyto read the prepared description, commits, manifest, diff, and targeted changed source ranges. No build or tests were run.Results
Findings
Blocking
None verified.
Non-blocking
NoteUnmappedmarks each image currently listed inpending.texturesorpending.flushingand sets itsanyUnmappedflag (Texture.cpp:6925-6928). The new flag is cleared only whenmarkLayersPendingresets a unit orwithoutUnmappedconsumes one (Texture.cpp:4863-4867,Texture.cpp:8164-8169). Please confirm the image lifecycle and ensure a staleanyUnmappedstate cannot cause unnecessary locking or traversal after the image leaves pending tracking.Not verified
Texture.cppandRecorder.cppwere excluded from the prepared full-text bundle because they were too large; only targeted ranges and the supplied diff were reviewed.files.jsonwas unavailable; the manifest and reader listing identify the changed files and exclusions. Build, tests, hardware behavior, and the contributor-reported runs were not independently verified.To get this to a good state
Nothing is required. Optional: document or assert how
anyUnmappedis reset as pending images leave tracking.