fix(agc): reserve only the sampled textures alive from the storage image budget #7862
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7862"
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 parl0v on 2026-10-19T11:33:50Z.
What
StorageTextureBudgetreserves the sampled textures alive instead of the larger of them and their 2 GiB floor. Everything else stays as #7071 set it: the heap's use outside the caches, the eighth of the budget, the caps and the 512 MiB floor. Whenever the sampled textures alive hold 2 GiB or more, the budget is the same as onmain.The sampled budget already reserves
TextureCacheBudget(at least the storage cap) for the storage cache, so one side keeps reserving the other's maximum, as #7071 says one side has to. The storage side no longer does the same in the other direction: as the sampled textures grow it gives the room back at its next read.Tests: three
StorageTextureBudgetcases are added (the 8 GB case below, which fails onmain; the same heap with the sampled textures grown to 2 GiB; the 10 GB pressure peak from #7071). The existing case that pinned the 2 GiB floor now expects the live sampled bytes, and the storage case inSampledCacheBudget.cppmoves its pressure point from 53 to 55 GiB in use so it stays under the cap on 8-12 GB devices. The debt entry andUSAGE.mddescribe the new reserve.Why
Minecraft Dungeons II (PPSA16064) gameplay on an RTX 4060 8 GB, Windows 10,
mainf78675ae4: the storage image budget sits at its 512 MiB floor in every 10 s window. One budget line: heap 0 has a 7189 MiB budget and uses 4491 MiB, 49 MiB of it sampled textures and 506 MiB cached storage images, so 3936 MiB is in use outside the caches.mainreserves 3936 + 2048 (the sampled floor) + 898 (an eighth) MiB, which leaves 306 MiB, so the floor. The sampled side gets the same 306 MiB for itself, because it reservesTextureCacheBudget(2048 MiB) for the storage cache, and sits at its own 2 GiB floor. Each cache keeps 2 GiB for the other out of 2354 MiB of room while the two hold 555 MiB, and 2698 MiB of the reported budget stays free.One present touches about 0.8-1.0 GB of storage images, so the cache evicts about 3,968 entries per 10 s and re-creates 96.7 % of them within two presents. With the budget forced to 1792 MiB (
APS5_TEXTURE_CACHE_MIB=1792) on the same build: 1.74 -> 3.05 FPS, evictions 3,968 -> 6 per 10 s, CPU-path uploads 204 -> 0, and the card stays at about 5.8 GB, inside the 7.2 GB budget. With this change the line above gives 7189 - 3936 - 49 - 898 = 2305 MiB, capped at a quarter of the budget: 1797 MiB. On the last budget line of each of my six gameplay runs (4334-4819 MiB in use, 48-119 MiB sampled)maingives 512 MiB and this change 1797 MiB.@AlxcBTW found the cause on #6194 on 2026-10-15: the two caches each reserve room for the other, and holding back the sampled cache's 2 GiB floor for a cache of ~33 MiB keeps an 8 GB card at its floor. That proposal targets #6194's growth cap; #7071 then reserved the same floor in
main's base formula, as I noted on #6194 on 2026-10-18. This change removes it there.mainWhy the 10 GB stop stays covered. #7071's protection is the term for the heap's use outside the caches, which this change keeps: at 007's level entry it took the storage budget from 2184 to 1795 MiB and to its floor by present 1298. On #7071's lines from the entry on the sampled textures alive held 2009-2404 MiB, so the reserve this change drops (
max(0, 2048 MiB - sampled)) is 0-39 MiB there. The one logged line with fewer (1427 MiB, the first pressure peak withAPS5_DRAW_PIPELINE=1 APS5_GPU_HEAP=1) is at the 512 MiB floor either way, and is now a unit case. Since #7071, #6174 (release both texture caches when a device allocation is refused, then retry) and #5987 (place a still-refused allocation in host memory) are onmain, and depth and render targets now allocate through that path (AllocateImageMemory); when #7071's runs stopped they did not.Trade-off. The storage budget no longer keeps room ahead of time for sampled textures that do not exist yet. When they grow it gives the room back at its next read (at most a second later) and the cache trims at its next insert, so a burst of sampled textures larger than the free room inside that window can exceed the reported budget. On PPSA16064 the free room at the new budget is 1407 MiB (the eighth, 899 MiB, plus 508 MiB under the cap) where
mainleft 2698 MiB; the sampled textures stayed at 0-119 MiB on every budget line of my runs. If a title shows such a burst, the reserve can follow the sampled cache's recent peak plus a step (SampledCacheHeadroomin @AlxcBTW's #6194 revision) instead of its current bytes; on PPSA16064 that also gives 1797 MiB.Measured
RTX 4060 8 GB (NVIDIA 617.42), Windows 10 19045, Minecraft Dungeons II (PPSA16064 01.100.100), a saved game and a scripted walk, automatic texture budgets,
main36f60df9eagainst this PR at 97aeb515d. FPS is the mean of the gameplay 10 s windows of a row; the rows are interleaved over two sessions.main36f60df9eWelch's t 3.08; a one-sided permutation test over the 12,870 splits of the 16 rows gives p = 0.0026. The rows with this change spread more (1.43-3.63 FPS against 1.23-1.87), and two of its eight rows fall inside
main's range.One traced row on each side, gameplay,
APS5_TRACE_SECONDS=85:12: frame p50 669.5 ms (18 presents in the window) onmainand 214.5 ms (51 presents) with this change, GPU busy 140.7 and 74.1 ms per present. This one window gains more than the row means do.APS5_LAB_HEAP_CENSUSin both summary lines is a variable of my run script; neither commit reads it.Traces (all four captures in this PR, they open in ui.perfetto.dev): https://github.com/parl0v/AnyPS5/releases/tag/perf-traces-2026-10-19
tools/performance_compare.py
Performance comparison
36f60df9edConfiguration differences
Frame and GPU times (ms)
Top phases (ms per frame)
The configuration difference it reports is the window's first present (1651 against 1679): the window is set in seconds, so it starts at a different present.
tools/trace_digest.py, main
36f60df9eseconds 85:12 from present 1651: 18 presents, frame p50 669.5 / p90 760.4 / p99 808.7 / max 808.7 ms, GPU busy 140.7 ms per present
NVIDIA GeForce RTX 4060, NVIDIA 617.42, Windows 10.0.19045, 3840x2160, commit
36f60df9ed, dropped: noSlowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 1309.1, Driver.Packet.memory_wait 425.2, Driver.Packet.dispatch 365.7, Driver.Dispatch 364.3, Resources.Complete 357.4, Graphics.Draw 330.4, Graphics.Draw.draw_and_resource_release 298.3, Driver.Packet.draw 257.0, Driver.Draw 256.6, Vulkan.Dispatch 250.5
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
tools/trace_digest.py, this PR 97aeb515d
seconds 85:12 from present 1679: 51 presents, frame p50 214.5 / p90 320.1 / p99 400.4 / max 400.4 ms, GPU busy 74.1 ms per present
NVIDIA GeForce RTX 4060, NVIDIA 617.42, Windows 10.0.19045, 3840x2160, commit 97aeb515de30, dropped: no
Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 456.6, Driver.Packet.memory_wait 147.9, Graphics.Draw 142.4, Graphics.Draw.draw_and_resource_release 125.4, Driver.Packet.draw 107.9, Driver.Draw 107.5, Driver.Packet.dispatch 88.9, Driver.Dispatch 87.6, batch 74.3, Driver.Packet.device_lock 71.5
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
RTX 3060 12 GB (NVIDIA 617.42), Windows 10 19045, PPSA16064 title screen,
APS5_TRACE_SECONDS=120:12, no other variables, arms alternating, a warm run before the first capture of each side. The storage budget is not at its floor on this card, so nothing changes, as expected:main36f60df9eTested
agc_driver_graphics,agc_driver_sampled_cache_budget,agc_driver_sampled_cache_budget_memory,agc_driver_sampled_cache_budget_without_storage_image_multisample,agc_driver_storage_cache_budget,agc_driver_storage_cache_retained_batch,agc_driver_resource_cache_storage_admission,agc_driver_resource_cache_oversized_storage_admissionandagc_driver_resource_cache_storage_clearon the RTX 4060 (NVIDIA 617.42, Windows 10 19045, WinLibs GCC 15.2.0, Release withBUILD_TESTING=ON),ctest -VwithVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn, Vulkan SDK 1.4.363.0: 9 of 9 pass onmain36f60df9eand 9 of 9 on 97aeb515d. Neither log has awas not found but was requested by env var VK_INSTANCE_LAYERSline (the loader reports adding the layer in both), and both have 0VUID-lines. The storage case ofagc_driver_sampled_cache_budget_memoryprints 1024 MiB at 55 GiB in use of 64 GiB with this change.StorageTextureBudget's body put back tomain's and this PR's tests:agc_driver_graphicsfails on the 5632 MiB case that replaced the floor case ("does not leave 2304 MiB";maingives 1280 MiB), and with that case removed it fails on the PPSA16064 case (maingives 512 MiB where 1797 MiB is expected).agc_driver_sampled_cache_budget_memoryfails with "55 GiB in use of a 64 GiB budget leaves the storage image cache 512 MiB, not the 1024 MiB".storageTextureBudgetTests()(2-32 GiB heaps, changing budgets, live sampled bytes and outside usage; he ran it on an RX 6650 XT with RADV).agc_driver_graphicswith it passes on the RTX 4060 (NVIDIA 617.42, Windows 10).python3 tools/check_conventions.py --base origin/mainpasses.FAsyncLoadingThread, read access violation in the game's own code atapp_mcd2.exe+0x4d446b), against 0 of 9 onmain. MCD2 has crashed in its asynchronous loading onmainbefore (1-2 of 6 loads on 2026-10-18,TAsyncThread/ Background Worker).Related
StorageTextureBudgetwhile it evicts. This change does not touch its lines; after it the floor #6194 is asked to use rises from 512 to 1797 MiB on PPSA16064, and its own cap still needs the sampled headroom change from the review to grow past that on 8 GB cards.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 (none added).mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T11:43:41Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cppdocs/user/USAGE.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mddocs/user/USAGE.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppdocs/dev/debt/libSceAgcDriver.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cppdocs/dev/debt/libSceAgcDriver.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppcore/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-19T12:18:53Z.
Additional Linux/AMD validation of the production patch from
97aeb515de30on an RX 6650 XT (RADV/Mesa 26.2.4).I added a pressure sweep to
storageTextureBudgetTests()covering 2/4/6/8/16/32 GiB heaps, changing reported budgets, live sampled bytes and non-cache usage. It checks the floor/caps, that increasing outside usage cannot increase the storage budget, and that a budget above the floor leaves room for live sampled textures plus the one-eighth headroom. All cases pass. This checks the formula at a sampled instant; it does not test the acknowledged burst/refresh-window risk.After merging upstream main
b5bc0c5fddinto that integration (local headcfc1bd106519), the full build and 12 targeted checks passed: five unwind-callback cases, profile-output, draw-input driver selection, the Vulkan draw-input-in-place recorder case, graphics budget tests, AJM, AJM teardown and RTC. Command:Independently checked the full log: zero
VUID-errors and no missing validation-layer warning. The budget sweep is a CPU test of the production formula; the recorder case exercises Vulkan. The graphics suite reports that guest-arena heap-mirror cases were not tested. The optional f64 execution case is excluded from this build and is not counted as coverage. An initial invocation had an invalid ICD path; the results above are from the corrected run.Native smoke checks reached the driving cutscene in Crimson Spires (PPSA03568) and the readable opening story in Lodoss (PPSA05347), with automatic texture budgets and ordinary close exiting 0. These runs used an existing correctness integration including #7817, #7627, #6959 and #7755, plus this patch and the test sweep (local head
2575611b4604); they are not isolated PR/main comparisons. No performance claim or new gameplay-unblock claim from these checks.Optional test addition, inserted before resetting the device-local heap flags in
storageTextureBudgetTests():AI-assisted: yes.
Additional native pressure check (2026-10-19)
Repeated the Crimson Spires opening driving sequence in both run orders, with identical scripted inputs, automatic texture budgets, 3840×2160 rendering and the same trace window. Both runs with this patch and both controls closed normally with exit 0. This is still the prerequisite correctness integration described above, refreshed onto upstream
b5bc0c5fdd10; candidatecfc1bd106519and control46197e24a26cdiffer in this patch and its tests/docs. It is not a pure-main benchmark or a new gameplay unblock.The RX 6650 XT/RADV Mesa 26.2.4 logs exercise the intended low-sampled-memory case: the repeated control reports 101 MiB sampled textures, a 4392 MiB reported device-local budget, and its storage cache budget falling to the 512 MiB floor. The candidate starts with a 4351 MiB reported budget and a 1088 MiB storage cache budget, with no subsequent budget-change report during the run. The first pair showed the same control-floor/candidate-no-change-report pattern. These are budget diagnostics, not measurements proving absence of allocation pressure between reports. The repeated candidate screenshot reaches the same opening dialogue with readable text; animation progress differs between the timed captures.
No isolated-main speed claim from these integration runs. AI-assisted: yes.
Isolated Lodoss comparison (2026-10-19): pinned pure main
b106f6f8c04cversus only this PR cherry-picked as71f17c4d7976, with no other prerequisite patches. PPSA05347 stationary initial forest, same RX 6650 XT/RADV machine/session, 3840×2160 rendering and 1536×864 window. Independent per-source shader/Mesa caches were warmed by running the scene once and restarting. OnlyAPS5_TRACE_SECONDS=200:10was enabled; game output stayed on a real PTY without redirection. The 190s/210s captures show the same character position, camera and tutorial overlay.Main: 25.42 FPS; this PR: 24.56 FPS. This single pair demonstrates no Lodoss gain and is insufficient to establish a regression. Both sides passed the same 12 focused tests with the required Vulkan validation layer and zero
VUID-errors. Both measured native runs exited 0 and restored the kernel setting; shutdown still reports storage images destroyed with GPU results pending. Upstream advanced after the pinned base.Summary lines:
Artifacts: report, main trace, candidate trace, main tests, candidate tests. AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by parl0v on 2026-10-19T12:21:07Z.
Thanks for the RADV run and the sweep. I'll add the sweep to this PR with you as co-author and post the RTX 4060 results with the validation layer once it's in.
Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-19T12:32:46Z.
Review: COMMENTED
Verified the diff, test fixtures, and documentation in PR #7862:
StorageTextureBudget(core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp), replacingstd::max<std::uint64_t>(2048ull << 20u, sampledBytes)withsampledByteseliminates double-reservation of the 2 GiB floor against both caches. On 8 GiB cards, this prevents the storage image cache from collapsing to its 512 MiB floor when sampled texture usage is low, while continuing to dynamically yield headroom as sampled textures grow.tests/Graphics.cpp(storageTextureBudgetTests) andtests/execution/SampledCacheBudget.cppaccurately verify the revised budget calculations across varied usage levels, including the PPSA16064 8 GiB heap profile.docs/dev/debt/libSceAgcDriver.mdanddocs/user/USAGE.mdaccurately document the updated cache budget dynamics. No code comments introduced;tools/check_conventions.pypasses with 0 findings.Imported from boykopovar/AnyPS5. Originally posted by parl0v on 2026-10-19T12:44:32Z.
Added the sweep as b79560ded with @JJenkx as co-author.
agc_driver_graphicspasses with it on the RTX 4060 (NVIDIA 617.42, Windows 10 19045).Imported from boykopovar/AnyPS5. Originally posted by whamre on 2026-10-19T13:40:04Z.
Independent data point from LEGO Builder's Journey (PPSA05496): RTX 2080 SUPER 8 GB, Windows 11, NVIDIA 616.92. It's the same storage-image thrash. In this title the quarter-budget cap binds as well, not only the 2 GiB sampled reserve, so this PR alone doesn't fix it here.
First scene, same build and the same shader cache, with only the budget changed (5 s
APS5_TRACE_SUMMARY_EVERYrows):APS5_TEXTURE_CACHE_MIB=1804)At the old value,
[gputime]showed 4.7 GB ofstorage-uploadand 2.3 GB ofstorage-writeback+shadow-publishper present. At 2.5 GiB and above they almost disappear (0.6 MB write-back per present). The title uses only 16 MiB of sampled textures, so on this card the free-memory term with your change comes to about 4.1 GiB. The binding limit is thenmin(TextureCacheBudget, budget / 4)= 1804 MiB, just below this scene's working set (somewhere between 2.0 and 2.5 GiB). Your PPSA16064 numbers on the 4060 land on exactly that cap (1797 MiB), so it may bind there too.What I tried locally: keep your change (reserve what the sampled textures use, but with a 512 MiB floor), and replace the cap with
min(budget, heap) / 2. That gives 3609 MiB here, and the existingagc_driver_graphics,agc_driver_sampled_cache_budget(incl._memory) andagc_driver_storage_cache_budgettests pass with their expectations updated. Since this PR touches the same two lines, I'd rather not open a competing one. Happy to send the cap change as a follow-up once this merges (Depends on: #7862), or you can fold it in, whichever you prefer.AI-assisted: yes. The numbers are from my machine.
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-19T17:51:12Z.
@parl0v a 007 data point for the 10 GB case from #7071, which this PR discusses. Four gameplay runs from the same save, two without this change and two with it.
main's gave the same storage image budget at all 790 evaluations: in the menus, through the level load and in gameplay.Setup:
mainb44d0127dplus the PRs 007 needs, one squash each:e32f5e161, #6868aa8f73490, #5372a0f27b550, #6918955e7c3c7, #7643870ad5d6eand #6679 3b69fde44;04aef899aand #660694bd3c387.StorageTextureBudgetevaluation, with the inputs and the result under both reserves.storageBudgetkeeps its result for 1 s, so that is at most one line a second.APS5_PROFILE_DRAW=1,APS5_TRACE_SUMMARY_EVERY=60.Present numbers are the title's. A log line's present is bounded by the
[present]lines around it, 1 to 10 presents apart in gameplay. "Level entry" is from the save resume to 30 presents into gameplay. Memory in MiB.memory.used(nvidia-smi, with about 640 of desktop)All four runs print the
[gpu] sampled texture cache budgetline only on a 10 % change at least 10 s after the last one. The table's rows from "in use outside the two caches" to "sampled textures alive" come from those lines, except run 4's sampled values (2942, 10267), which come from its per-evaluation lines. So they are samples, runs 1 and 2's logged peaks are lower bounds, and "not logged" for run 3 means no line showed it. Run 3 has two such lines at level entry. Over the same presents, run 4's per-evaluation lines give 3704–4150 MiB outside the caches and a storage budget of 1023–1523 MiB.Run 4's logging:
The stalls:
[gpu] texture caches released 0 MiB of the 256 MiB asked for: 0 sampled entries (cache busy, skipped), 0 storage images, 123 with pending results kept.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T14:48:46Z.
Rebased onto current main (only conflict: the
Texture cache budgetsline indocs/dev/debt/libSceAgcDriver.mdnext to the new scan-admission line; kept both). Re-checked theStorageTextureBudgetcases and the sweep against the formula, full ctest on the rebase passes; merged.