fix(agc): stop false texture eviction notices during PPSA38500 story rendering on Windows #28620
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28620"
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 lgqdaxia on 2026-12-02T04:14:00Z.
What
PPSA38500 story rendering on Windows brought a stream of texture-release notifications to our attention. At the sampled texture cache budget, each lookup rejected by admission notified subscribers for the surface address. A freshly created wrapper has never been in the cache. A subscriber checking the same surface can therefore invalidate its own result.
Send the address notification when removing a byte-accounted entry that another owner still holds. A rejected wrapper keeps its released mark and still requests the resource-cache sweep. Guest writes and surface invalidation on a real eviction keep their existing behavior.
Related work in #12575 retains some rejected textures in a transient cache. Its full-cache fallback still emits the address notification. This change also preserves the eviction helper used by #25534.
Tested
Windows 11, NVIDIA GeForce RTX 3080 Laptop GPU, driver 621.14, Vulkan validation enabled. Both builds used the same test executable and a 1 MiB sampled-cache budget.
68d65e6b14a0874ce0a3fa90Main reproduced the new assertion. Both focused tests passed on the candidate with zero skips and zero Vulkan validation errors. The final commit
c34e8c01b4earetains the existing two-argument eviction helper. Expanding its single call yields the tested production source. The tests are identical. The test exercises notification semantics. The effect on title frame times remains unmeasured.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
Bug Fixes
Tests
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-02T04:32:44Z.
Review: APPROVED
Reviewed — looks good
The reviewed changes preserve release notifications for evicted cached textures while preventing rejected textures from notifying subscribers; no blocking defects were found.
What I ran
Reviewed head
c34e8c01b4ea4b7b7435eec2def92c4c3c3ba5b3usingrepo_read.pyto inspect the changed hunks and relevant cache eviction, clearing, and subscription code. No tests or builds were run. The author reports focused tests passed on Windows 11 with an NVIDIA GeForce RTX 3080 Laptop GPU; I did not independently verify those results.Results
Negative control
Not run; no test or code modification was made to verify that the added test fails against the old behavior.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
The full text of
ShaderResources.cppwas not included in the review folder; I inspected the changed lines and relevant eviction and clearing code throughrepo_read.py. No files were excluded by the manifest rules. The reported Windows/Vulkan test results and title frame-time effect were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T06:04:42Z.
Review: APPROVED
I read the diff at
c34e8c01b4. Windows 11, GCC 15.2, merged intomainatcf556db18c3together with other open PRs (so not an isolated build), withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1andVK_LAYER_KHRONOS_validationon an RTX 5080 (621.24) and a Radeon iGPU (26.11.2).agc_driver_sampled_cache_budget_tests: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has aVUID-orSYNC-HAZARDline.main's):agc_driver_sampled_cache_budget,_no_snapshot_digestand_without_storage_image_multisamplefail on both GPUs: "two refused texture lookups sent 2 release notices to the surface subscriber".Not checked: PPSA38500 itself.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T19:12:52Z.
Review: COMMENTED
Source review at
c34e8c01b4. An admission refusal still marks the wrapper released and requests the resource sweep. The change removes the address notification from that path, and the fixture checks that evicting an admitted entry still notifies the same subscriber. On Linux lavapipe,agc_driver_sampled_cache_budget,agc_driver_resource_cache_replaced_textureand the scalar-buffer control all passed on maina9cbd48cb0and this head. Both logs show Khronos validation 1.4.369 inserted with zero missing-layer warnings and zero VUIDs.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.