fix(agc): let the storage image cache budget follow the heap's use like the sampled one #7071

Merged
SleglJan merged 1 commit from upstream-pr/7071 into main 2026-10-17 21:29:01 +00:00
SleglJan commented 2026-10-17 10:13:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-17T10:13:45Z.


What

StorageTextureBudget gave the storage image cache a quarter of the VK_EXT_memory_budget budget of the largest device-local
heap (capped at TextureCacheBudget, never below 512 MiB) whatever else the heap held, while SampledTextureBudget takes what
that budget leaves after the heap's other use. On a 10 GB card the storage cache kept 2024-2170 MiB into a level load whose depth
and render target allocations then failed with VK_ERROR_OUT_OF_DEVICE_MEMORY, the heap at its reported budget where a run
logged it (eight runs below).

The storage image budget is now what the reported budget leaves after the heap's use other than the cached storage images, the
unused part of the sampled textures' 2 GiB floor and an eighth of the budget; the caps at a quarter of the budget and at
TextureCacheBudget and the 512 MiB floor stay. The sampled budget still reserves TextureCacheBudget for the storage cache
(at least the storage cap) and the storage budget reserves the sampled textures alive, so neither counts bytes the other may
take; while the sampled textures alive stay within their floor the sampled budget falls first, then the storage budget, and
above it both fall together. Each cache trims at its next insert and both budgets are read at most once a second, as before.
The [gpu] sampled texture cache budget line now also prints when the storage image budget moves by more than a tenth, with
its previous value, and StorageTextureCacheBudget is exported for the execution test.

The debt entry "Texture cache budgets" records what is a choice here: the 2 GiB floor and the eighth are the sampled formula's
values reused, the 512 MiB floor and the caps the earlier ones, none measured beyond one title on one 10 GB GPU; a title whose
storage working set exceeds the shrunk budget re-creates storage images at each use.

Measured

007 First Light (PPSA11386) on Linux (CachyOS 7.2.10), NVIDIA GeForce RTX 3080 10 GB (driver 615.78.08), 3840x2160 render
resolution, warm shader cache, scripted pad input, the same save in each pair, logging on. None of the runs is on main alone
(the title does not reach these points there); every stack is given. "X of Y MiB" figures are the heap's use and budget from the
driver's [gpu] sampled texture cache budget lines (printed when a budget moved, so a run's last line is earlier than its stop)
or from its host-placement lines; "card use" is nvidia-smi memory for the whole card, about 885 MiB of it other processes. The
host-placement counters print at 1-5 allocations and then at powers of two, so they are lower bounds; reclaim lines are exact.

  • The stops this addresses (no change, automatic budgets): eight runs on a base of main 4186f06a9 plus the open PRs the
    title needs to reach its level load (the stack of the bring-up thread, discussions/5714), local functional commits (one-slice
    volume sampling among them) and diagnostic logging, the executable patched as in #6172 (two feedback-wait limits widened):
    one on the base alone, one on the base + #6402 + #6364, three on that + #6174 (two with trace logging), one on the base +
    #6364 + #6174, one on the latter with #6346 reverted, one on the base + #6174. All eight stopped at the first gameplay presents
    (1114-1279): vkAllocateMemory render target: Vulkan result -2 in the two without #6174, vkAllocateMemory depth target: Vulkan result -2 in the six with it. Their last budget lines hold 2024-2170 MiB of cached storage images at storage budgets
    of 2053-2192 MiB, with 5542-6305 of 8215-8723 MiB in use; the five runs that placed an allocation in host memory through
    the budget check (a path already on main) logged the heap at 8233 of 8259, 8491 of 8491, 8456 of 8457, 8326 of 8364 and
    7982 of 8022 MiB on that line, 0-14 presents before the stop.
  • Level entry, with and without this change: the base above (without #6174, #6402 and #6364) plus #6553, which carries
    #5987 (a refused device allocation, depth, render and copy targets included, is placed in host memory instead of failing;
    the budget check's up-front placement is limited to host heaps with room), so the entry no longer stops. One run each:
    3600 s without, 1500 s with, same cache, save, input and environment; the card's reported budget at start was 9195 MiB
    without and 8934 MiB with. The frame-rate drop of the entry starts at present 1270 without and 1250 with (presents 1274 and
    1257 at the 600 s sample in both) and the frame rate after it is within 6 %: 0.13 FPS falling to 0.05-0.06 by 1440 s, 77
    presents without and 72 with between the 600 s and 1442 s samples, so the slowness there is not this memory. The memory
    moves: through present 1332 (the last of the run with the change) the run without had placed at least 128 refused texture
    or storage-texture allocations (1204 MiB) and at least 512 refused device buffers of the pool in host memory, with 60 pool
    reclaim-and-retry cycles, the first placement at present 1289, and no up-front placement; the run with it placed at least
    32 refused allocations (434 MiB, the last a depth copy) and at least 32 allocations (1252 MiB) up front through the budget
    check, no pool buffer, with 3 reclaims, the first placement at present 1319. With the change the heap was at its budget at
    those placements (8260-8330 of 8284-8334 MiB); the run without logs no heap figure at its refusals. The budget lines in
    between show 300-1500 MiB of room at the moments a sampled texture was inserted. The storage budget read 2184 MiB on the
    last line before the entry, 1795 MiB at the entry (present 1250) and reached its 512 MiB floor at present 1298, about six
    minutes after the entry, leaving it twice (873 and 944 MiB); from the entry on the sampled textures alive were 2009-2404 MiB
    (12 of 26 lines below their 2 GiB floor) and the heap's other use 3491-5241 MiB. A storage cache that small re-creates its
    images more often: through present 1332 the run without created 7,440 storage images from present 1274 on, the run with
    10,942 (47 % more per present; by about 1500 s of run time, 42,260 against 43,712). So on this stack the change means fewer
    and later host placements and reclaims at the price of more storage re-creation, with the frame rate within 6 %.
  • Menu, plain settings: stack main bc3c0fc13 + #5799 #6317 #6332 #6881 + #6947 (which carries #6946 and rebased
    #5656/#6632), APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1, no executable patch, one run without and one with the
    change from the same cache (two more runs without, with APS5_DRAW_PIPELINE=1, give the spread). No change the runs can
    resolve: card use peaks at 8622 MiB without and 8554 MiB with (the two other runs 8553 and 8646), the main menu reached at
    ~1113 s without and ~1125 s with, 0.48-0.59 FPS (mean 0.56) in the menu without and 0.45-0.58 (mean 0.53) with, 35,364
    storage images created in 24 minutes without and 35,192 with. The last budget line of each run, about 210 s in, has the
    storage budget at its cap (2172 MiB without, 2175 with); what the budget did in the menu itself is not in these logs, since
    the line prints only at sampled-cache lookups.
  • Menu with APS5_DRAW_PIPELINE=1 APS5_GPU_HEAP=1 (the same stack's two switches, both off by default): three runs without
    the change (one also with APS5_VERIFY_GPU_HEAP=1, one with a different trace window) all stopped between their last present
    and the driver's give-up, about 735-785 s, with vkAllocateMemory storage texture: Vulkan result -2 right after a ~7.5
    minute stall, their last budget lines at 7654 of 8765, 7020 of 8783 and 6202 of 8785 MiB in use with 2184-2194 MiB of
    cached storage images at 2191-2196 MiB budgets (a fourth run with the switches on a colder cache stopped at about 835-845 s
    on vkAllocateMemory texture: Vulkan result -2). The run with the change, from the same cache as the first, went to its
    1800 s limit without a refusal and 0 faults, through the same stall (present 222 from 241 s to 694 s), and on to present 604
    at 0.28-0.38 FPS (the runs without died at presents 180-260): at the first pressure peak after the stall (7981 of 8767 MiB
    in use, 1427 MiB of sampled textures, 490 MiB of cached storage) the storage budget was at its 512 MiB floor, and afterwards
    it moved between 1084 and 2188 MiB as the heap's use swung between 5646 and 7880 MiB (40 of 81 budget lines below
    2100 MiB); 24,658 storage images were created in 30 minutes. Card use rose to 9363 MiB by the end; no run without the
    change lived long enough with the switches to compare.

The runs show, on a 10 GB card, that the storage cache now gives its memory back when the heap fills, down to its floor, that
the refusals the fixed quarter left to the allocations outside the caches no longer appear in these runs, and that the cost is
storage re-creation when the budget sits at the floor. A run on an 8 GB card, where the budget sits below the cap sooner, or on
RADV would be welcome.

Tested

  • agc_driver_graphics (new StorageTextureBudget cases), agc_driver_sampled_cache_budget,
    agc_driver_sampled_cache_budget_memory (new storage case with a fake VK_EXT_memory_budget reporter) and
    agc_driver_storage_cache_budget: pass on the RTX 3080 (Linux, GCC 16.2.1, Release with BUILD_TESTING=ON) and on lavapipe
    (Mesa 26.2.4, LLVM 23.1.1, Arch Linux container), on the revision before this commit's final docs-and-message amend (same
    code). The two new cases were written first and failed on the previous formula (the quarter where 1792 MiB and 1024 MiB
    were expected) before the change; the clamp case fails when the clamp is removed.
  • lavapipe, ctest -R agc_driver (481 tests, 16 jobs), on the first revision of this commit (same budget code; it lacked only the previous value on the budget line): 11
    failures, the same 11 on main 6a32550fd (msaa_dcc_clear_2/4/8, bc_block_copy, depth_compare_copy,
    native_multisample_depth, staged_clear_sampled_read, storage_write_back_overhang, native_depth_retirement,
    native_depth_clears, native_depth_clear_refusals).
  • python3 tools/check_conventions.py --base upstream/main passes.
  • In game: the runs above; the budget code of this commit is the code they ran; the menu runs' revision lacked only the previous
    value on the budget line.
  • Independent check by screamm (head 39c23664b merged on main c9e6c45de): Windows 11, NVIDIA GeForce RTX 4070 12 GB (596.21), WinLibs GCC 15.2.0, Release with BUILD_TESTING=ON.
    • The four tests above pass 3 of 3 each. With only StorageTextureBudget's body put back to main's formula, agc_driver_graphics and agc_driver_sampled_cache_budget_memory fail on the new cases; restored, all four pass.
    • ^agc_driver_ serial: 488 of 490; the two FMA denormal failures also fail on main on that GPU (#7100).
    • PS5 OpenGL Showcase (PPSA99005) and PS5MC (PPSA99420), 10 runs alternating with the formula reverted: no stop line and no [gpu] errors, a 2810 MiB storage image budget in every run on both builds, and 17-23 (PPSA99005) and 13 (PPSA99420) storage images created per run on both. The heap was at 68-1347 of 11243 MiB, so the new formula stayed at its quarter cap; only the tests exercise the shrink path on that card.
    • Not checked: PPSA11386 (the out-of-memory stops), titles near the heap budget, 8 GB cards, AMD/RADV, Intel, Linux.
    • https://github.com/boykopovar/AnyPS5/pull/7071#issuecomment-6234858406
  • #6174 (@ee6aba54) releases both texture caches when a device allocation fails and retries it, through the buffer pool's
    recovery path; depth and render targets allocate outside that path on main, and six of the eight stops above ran with
    #6174. This change keeps the storage cache from holding the room in the first place; the two compose.
  • #6194 (@Thunderhawkk) grows the storage budget on eviction churn and shrinks it under pressure, never below
    StorageTextureBudget; this change moves that base with the heap's use, so the two compose. It replaces the
    cached.budget = StorageTextureBudget(...) line with its own and calls the two-argument StorageTextureBudget on a new
    floor line, which would take the two byte arguments here; whichever merges second needs that one-line rebase.
  • #6783 (@Pipodi) changes the sampled formula to reserve the storage cache's own budget (or what it holds) instead of
    TextureCacheBudget, with a thirty-second of headroom, and calls the two-argument StorageTextureBudget inside
    SampledTextureBudget, so it does not build on top of this change as is. On top of this change its reserve would follow a
    shrinking storage budget, so the sampled budget grows as the storage budget falls and, if the sampled cache fills it, pushes
    the storage budget further down; one side has to keep reserving the other's maximum (here the sampled side reserves
    TextureCacheBudget). Worth deciding together if both are wanted.
  • #5998 (@MarcZX100) charges retained storage images to the recorder's budget; not touched here.
  • #6873 (@parl0v) documented the earlier rule in USAGE.md; the paragraph is updated here.

Checklist

  • Based on current main; no other open PR implements the same functions (#6194 changes storageBudget around the same
    base; see Related)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt (the
    reserve, floors and eighth are a debt entry)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's
    technical debt file (none added)
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: nothing shown by these runs; the title measured is PPSA11386 (bring-up thread discussions/5714)
  • GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 615.78.08, Linux (CachyOS, GCC 16.2.1); lavapipe (Mesa 26.2.4,
    LLVM 23.1.1, Arch Linux container). AMD/RADV: not tested here; a run on RADV would be welcome
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4899228988 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7071). Originally posted by [SleglJan](https://github.com/SleglJan) on 2026-10-17T10:13:45Z. --- ### What `StorageTextureBudget` gave the storage image cache a quarter of the `VK_EXT_memory_budget` budget of the largest device-local heap (capped at `TextureCacheBudget`, never below 512 MiB) whatever else the heap held, while `SampledTextureBudget` takes what that budget leaves after the heap's other use. On a 10 GB card the storage cache kept 2024-2170 MiB into a level load whose depth and render target allocations then failed with `VK_ERROR_OUT_OF_DEVICE_MEMORY`, the heap at its reported budget where a run logged it (eight runs below). The storage image budget is now what the reported budget leaves after the heap's use other than the cached storage images, the unused part of the sampled textures' 2 GiB floor and an eighth of the budget; the caps at a quarter of the budget and at `TextureCacheBudget` and the 512 MiB floor stay. The sampled budget still reserves `TextureCacheBudget` for the storage cache (at least the storage cap) and the storage budget reserves the sampled textures alive, so neither counts bytes the other may take; while the sampled textures alive stay within their floor the sampled budget falls first, then the storage budget, and above it both fall together. Each cache trims at its next insert and both budgets are read at most once a second, as before. The `[gpu] sampled texture cache budget` line now also prints when the storage image budget moves by more than a tenth, with its previous value, and `StorageTextureCacheBudget` is exported for the execution test. The debt entry "Texture cache budgets" records what is a choice here: the 2 GiB floor and the eighth are the sampled formula's values reused, the 512 MiB floor and the caps the earlier ones, none measured beyond one title on one 10 GB GPU; a title whose storage working set exceeds the shrunk budget re-creates storage images at each use. ### Measured 007 First Light (PPSA11386) on Linux (CachyOS 7.2.10), NVIDIA GeForce RTX 3080 10 GB (driver 615.78.08), 3840x2160 render resolution, warm shader cache, scripted pad input, the same save in each pair, logging on. None of the runs is on `main` alone (the title does not reach these points there); every stack is given. "X of Y MiB" figures are the heap's use and budget from the driver's `[gpu] sampled texture cache budget` lines (printed when a budget moved, so a run's last line is earlier than its stop) or from its host-placement lines; "card use" is `nvidia-smi` memory for the whole card, about 885 MiB of it other processes. The host-placement counters print at 1-5 allocations and then at powers of two, so they are lower bounds; reclaim lines are exact. - **The stops this addresses (no change, automatic budgets):** eight runs on a base of `main` 4186f06a9 plus the open PRs the title needs to reach its level load (the stack of the bring-up thread, discussions/5714), local functional commits (one-slice volume sampling among them) and diagnostic logging, the executable patched as in #6172 (two feedback-wait limits widened): one on the base alone, one on the base + #6402 + #6364, three on that + #6174 (two with trace logging), one on the base + #6364 + #6174, one on the latter with #6346 reverted, one on the base + #6174. All eight stopped at the first gameplay presents (1114-1279): `vkAllocateMemory render target: Vulkan result -2` in the two without #6174, `vkAllocateMemory depth target: Vulkan result -2` in the six with it. Their last budget lines hold 2024-2170 MiB of cached storage images at storage budgets of 2053-2192 MiB, with 5542-6305 of 8215-8723 MiB in use; the five runs that placed an allocation in host memory through the budget check (a path already on `main`) logged the heap at 8233 of 8259, 8491 of 8491, 8456 of 8457, 8326 of 8364 and 7982 of 8022 MiB on that line, 0-14 presents before the stop. - **Level entry, with and without this change:** the base above (without #6174, #6402 and #6364) plus #6553, which carries #5987 (a refused device allocation, depth, render and copy targets included, is placed in host memory instead of failing; the budget check's up-front placement is limited to host heaps with room), so the entry no longer stops. One run each: 3600 s without, 1500 s with, same cache, save, input and environment; the card's reported budget at start was 9195 MiB without and 8934 MiB with. The frame-rate drop of the entry starts at present 1270 without and 1250 with (presents 1274 and 1257 at the 600 s sample in both) and the frame rate after it is within 6 %: 0.13 FPS falling to 0.05-0.06 by 1440 s, 77 presents without and 72 with between the 600 s and 1442 s samples, so the slowness there is not this memory. The memory moves: through present 1332 (the last of the run with the change) the run without had placed at least 128 refused texture or storage-texture allocations (1204 MiB) and at least 512 refused device buffers of the pool in host memory, with 60 pool reclaim-and-retry cycles, the first placement at present 1289, and no up-front placement; the run with it placed at least 32 refused allocations (434 MiB, the last a depth copy) and at least 32 allocations (1252 MiB) up front through the budget check, no pool buffer, with 3 reclaims, the first placement at present 1319. With the change the heap was at its budget at those placements (8260-8330 of 8284-8334 MiB); the run without logs no heap figure at its refusals. The budget lines in between show 300-1500 MiB of room at the moments a sampled texture was inserted. The storage budget read 2184 MiB on the last line before the entry, 1795 MiB at the entry (present 1250) and reached its 512 MiB floor at present 1298, about six minutes after the entry, leaving it twice (873 and 944 MiB); from the entry on the sampled textures alive were 2009-2404 MiB (12 of 26 lines below their 2 GiB floor) and the heap's other use 3491-5241 MiB. A storage cache that small re-creates its images more often: through present 1332 the run without created 7,440 storage images from present 1274 on, the run with 10,942 (47 % more per present; by about 1500 s of run time, 42,260 against 43,712). So on this stack the change means fewer and later host placements and reclaims at the price of more storage re-creation, with the frame rate within 6 %. - **Menu, plain settings:** stack `main` bc3c0fc13 + #5799 #6317 #6332 #6881 + #6947 (which carries #6946 and rebased #5656/#6632), `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1`, no executable patch, one run without and one with the change from the same cache (two more runs without, with `APS5_DRAW_PIPELINE=1`, give the spread). No change the runs can resolve: card use peaks at 8622 MiB without and 8554 MiB with (the two other runs 8553 and 8646), the main menu reached at ~1113 s without and ~1125 s with, 0.48-0.59 FPS (mean 0.56) in the menu without and 0.45-0.58 (mean 0.53) with, 35,364 storage images created in 24 minutes without and 35,192 with. The last budget line of each run, about 210 s in, has the storage budget at its cap (2172 MiB without, 2175 with); what the budget did in the menu itself is not in these logs, since the line prints only at sampled-cache lookups. - **Menu with `APS5_DRAW_PIPELINE=1 APS5_GPU_HEAP=1`** (the same stack's two switches, both off by default): three runs without the change (one also with `APS5_VERIFY_GPU_HEAP=1`, one with a different trace window) all stopped between their last present and the driver's give-up, about 735-785 s, with `vkAllocateMemory storage texture: Vulkan result -2` right after a ~7.5 minute stall, their last budget lines at 7654 of 8765, 7020 of 8783 and 6202 of 8785 MiB in use with 2184-2194 MiB of cached storage images at 2191-2196 MiB budgets (a fourth run with the switches on a colder cache stopped at about 835-845 s on `vkAllocateMemory texture: Vulkan result -2`). The run with the change, from the same cache as the first, went to its 1800 s limit without a refusal and 0 faults, through the same stall (present 222 from 241 s to 694 s), and on to present 604 at 0.28-0.38 FPS (the runs without died at presents 180-260): at the first pressure peak after the stall (7981 of 8767 MiB in use, 1427 MiB of sampled textures, 490 MiB of cached storage) the storage budget was at its 512 MiB floor, and afterwards it moved between 1084 and 2188 MiB as the heap's use swung between 5646 and 7880 MiB (40 of 81 budget lines below 2100 MiB); 24,658 storage images were created in 30 minutes. Card use rose to 9363 MiB by the end; no run without the change lived long enough with the switches to compare. The runs show, on a 10 GB card, that the storage cache now gives its memory back when the heap fills, down to its floor, that the refusals the fixed quarter left to the allocations outside the caches no longer appear in these runs, and that the cost is storage re-creation when the budget sits at the floor. A run on an 8 GB card, where the budget sits below the cap sooner, or on RADV would be welcome. ### Tested - `agc_driver_graphics` (new `StorageTextureBudget` cases), `agc_driver_sampled_cache_budget`, `agc_driver_sampled_cache_budget_memory` (new storage case with a fake `VK_EXT_memory_budget` reporter) and `agc_driver_storage_cache_budget`: pass on the RTX 3080 (Linux, GCC 16.2.1, Release with `BUILD_TESTING=ON`) and on lavapipe (Mesa 26.2.4, LLVM 23.1.1, Arch Linux container), on the revision before this commit's final docs-and-message amend (same code). The two new cases were written first and failed on the previous formula (the quarter where 1792 MiB and 1024 MiB were expected) before the change; the clamp case fails when the clamp is removed. - lavapipe, `ctest -R agc_driver` (481 tests, 16 jobs), on the first revision of this commit (same budget code; it lacked only the previous value on the budget line): 11 failures, the same 11 on `main` 6a32550fd (`msaa_dcc_clear_2/4/8`, `bc_block_copy`, `depth_compare_copy`, `native_multisample_depth`, `staged_clear_sampled_read`, `storage_write_back_overhang`, `native_depth_retirement`, `native_depth_clears`, `native_depth_clear_refusals`). - `python3 tools/check_conventions.py --base upstream/main` passes. - In game: the runs above; the budget code of this commit is the code they ran; the menu runs' revision lacked only the previous value on the budget line. - Independent check by screamm (head 39c23664b merged on `main` c9e6c45de): Windows 11, NVIDIA GeForce RTX 4070 12 GB (596.21), WinLibs GCC 15.2.0, Release with `BUILD_TESTING=ON`. - The four tests above pass 3 of 3 each. With only `StorageTextureBudget`'s body put back to `main`'s formula, `agc_driver_graphics` and `agc_driver_sampled_cache_budget_memory` fail on the new cases; restored, all four pass. - `^agc_driver_` serial: 488 of 490; the two FMA denormal failures also fail on `main` on that GPU (#7100). - PS5 OpenGL Showcase (PPSA99005) and PS5MC (PPSA99420), 10 runs alternating with the formula reverted: no stop line and no `[gpu]` errors, a 2810 MiB storage image budget in every run on both builds, and 17-23 (PPSA99005) and 13 (PPSA99420) storage images created per run on both. The heap was at 68-1347 of 11243 MiB, so the new formula stayed at its quarter cap; only the tests exercise the shrink path on that card. - Not checked: PPSA11386 (the out-of-memory stops), titles near the heap budget, 8 GB cards, AMD/RADV, Intel, Linux. - https://github.com/boykopovar/AnyPS5/pull/7071#issuecomment-6234858406 ### Related - #6174 (@ee6aba54) releases both texture caches when a device allocation fails and retries it, through the buffer pool's recovery path; depth and render targets allocate outside that path on `main`, and six of the eight stops above ran with #6174. This change keeps the storage cache from holding the room in the first place; the two compose. - #6194 (@Thunderhawkk) grows the storage budget on eviction churn and shrinks it under pressure, never below `StorageTextureBudget`; this change moves that base with the heap's use, so the two compose. It replaces the `cached.budget = StorageTextureBudget(...)` line with its own and calls the two-argument `StorageTextureBudget` on a new `floor` line, which would take the two byte arguments here; whichever merges second needs that one-line rebase. - #6783 (@Pipodi) changes the sampled formula to reserve the storage cache's own budget (or what it holds) instead of `TextureCacheBudget`, with a thirty-second of headroom, and calls the two-argument `StorageTextureBudget` inside `SampledTextureBudget`, so it does not build on top of this change as is. On top of this change its reserve would follow a shrinking storage budget, so the sampled budget grows as the storage budget falls and, if the sampled cache fills it, pushes the storage budget further down; one side has to keep reserving the other's maximum (here the sampled side reserves `TextureCacheBudget`). Worth deciding together if both are wanted. - #5998 (@MarcZX100) charges retained storage images to the recorder's budget; not touched here. - #6873 (@parl0v) documented the earlier rule in `USAGE.md`; the paragraph is updated here. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions (#6194 changes `storageBudget` around the same base; see Related) - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) (the reserve, floors and eighth are a debt entry) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file (none added) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: nothing shown by these runs; the title measured is PPSA11386 (bring-up thread discussions/5714) - [x] GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 615.78.08, Linux (CachyOS, GCC 16.2.1); lavapipe (Mesa 26.2.4, LLVM 23.1.1, Arch Linux container). AMD/RADV: not tested here; a run on RADV would be welcome - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-17 10:26:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T10:26:33Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6012 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp L34
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L1032
PR 7175 docs/dev/debt/libSceAgcDriver.md L47
PR 7250 docs/dev/debt/libSceAgcDriver.md L47-48

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.

Pull request Shared files not compared
PR 1395 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4650 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4891 docs/user/USAGE.md
PR 5021 core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/user/USAGE.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5500 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 6111 docs/user/USAGE.md
PR 6146 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6171 docs/user/USAGE.md
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6222 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6234 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6297 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6320 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6373 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6414 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6445 docs/dev/debt/libSceAgcDriver.md
PR 6492 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6535 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6563 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6601 docs/dev/debt/libSceAgcDriver.md
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6647 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6718 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6783 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6887 docs/dev/debt/libSceAgcDriver.md
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 6959 docs/dev/debt/libSceAgcDriver.md
PR 6965 docs/dev/debt/libSceAgcDriver.md
PR 6973 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6987 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6989 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6995 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7154 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7178 docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7258 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6232800915 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7071#issuecomment-6232800915). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T10:26:33Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6012](https://www.github.com/boykopovar/AnyPS5/pull/6012) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp` [L34](https://github.com/boykopovar/AnyPS5/blob/6447ed1ed7fd11c7eef60df336e8d66fac271188/core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp#L34)<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` [L1032](https://github.com/boykopovar/AnyPS5/blob/6447ed1ed7fd11c7eef60df336e8d66fac271188/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp#L1032) | | | | [PR 7175](https://www.github.com/boykopovar/AnyPS5/pull/7175) | `docs/dev/debt/libSceAgcDriver.md` [L47](https://github.com/boykopovar/AnyPS5/blob/6447ed1ed7fd11c7eef60df336e8d66fac271188/docs/dev/debt/libSceAgcDriver.md#L47) | | | | [PR 7250](https://www.github.com/boykopovar/AnyPS5/pull/7250) | `docs/dev/debt/libSceAgcDriver.md` [L47-48](https://github.com/boykopovar/AnyPS5/blob/6447ed1ed7fd11c7eef60df336e8d66fac271188/docs/dev/debt/libSceAgcDriver.md#L47-L48) | | | 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. | Pull request | Shared files not compared | |---|---| | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4650](https://www.github.com/boykopovar/AnyPS5/pull/4650) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 4891](https://www.github.com/boykopovar/AnyPS5/pull/4891) | `docs/user/USAGE.md` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp`<br>`docs/user/USAGE.md` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md`<br>`docs/user/USAGE.md` | | [PR 6111](https://www.github.com/boykopovar/AnyPS5/pull/6111) | `docs/user/USAGE.md` | | [PR 6146](https://www.github.com/boykopovar/AnyPS5/pull/6146) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6171](https://www.github.com/boykopovar/AnyPS5/pull/6171) | `docs/user/USAGE.md` | | [PR 6177](https://www.github.com/boykopovar/AnyPS5/pull/6177) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6234](https://www.github.com/boykopovar/AnyPS5/pull/6234) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6273](https://www.github.com/boykopovar/AnyPS5/pull/6273) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6297](https://www.github.com/boykopovar/AnyPS5/pull/6297) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6320](https://www.github.com/boykopovar/AnyPS5/pull/6320) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6373](https://www.github.com/boykopovar/AnyPS5/pull/6373) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6414](https://www.github.com/boykopovar/AnyPS5/pull/6414) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6445](https://www.github.com/boykopovar/AnyPS5/pull/6445) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6492](https://www.github.com/boykopovar/AnyPS5/pull/6492) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6535](https://www.github.com/boykopovar/AnyPS5/pull/6535) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6563](https://www.github.com/boykopovar/AnyPS5/pull/6563) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6601](https://www.github.com/boykopovar/AnyPS5/pull/6601) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6647](https://www.github.com/boykopovar/AnyPS5/pull/6647) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6727](https://www.github.com/boykopovar/AnyPS5/pull/6727) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6783](https://www.github.com/boykopovar/AnyPS5/pull/6783) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6887](https://www.github.com/boykopovar/AnyPS5/pull/6887) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md`<br>`docs/user/USAGE.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md`<br>`docs/user/USAGE.md` | | [PR 6959](https://www.github.com/boykopovar/AnyPS5/pull/6959) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6965](https://www.github.com/boykopovar/AnyPS5/pull/6965) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6973](https://www.github.com/boykopovar/AnyPS5/pull/6973) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6987](https://www.github.com/boykopovar/AnyPS5/pull/6987) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6989](https://www.github.com/boykopovar/AnyPS5/pull/6989) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6995](https://www.github.com/boykopovar/AnyPS5/pull/6995) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7154](https://www.github.com/boykopovar/AnyPS5/pull/7154) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7178](https://www.github.com/boykopovar/AnyPS5/pull/7178) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7258](https://www.github.com/boykopovar/AnyPS5/pull/7258) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` |
screamm commented 2026-10-17 14:06:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-17T14:06:14Z.


Cross-validation on Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 12 GB (driver 596.21), WinLibs MinGW-w64 GCC 15.2.0, Release with BUILD_TESTING=ON. PR head 39c23664b merged on main c9e6c45de (clean). PPSA11386 is not available to me, so this covers the tests and a no-regression check on other titles, not the out-of-memory stops.

  • Build: full build and libs pass.
  • agc_driver_graphics, agc_driver_sampled_cache_budget, agc_driver_sampled_cache_budget_memory, agc_driver_storage_cache_budget, --repeat until-fail:3: 3 of 3 each. The memory case runs here (not skipped): reported heap budget 65536 MiB with 54272 MiB in use: storage image cache budget 1024 MiB.
  • Negative control: I put only the StorageTextureBudget body back to main's max(512 MiB, min(TextureCacheBudget, budget / 4)) and kept the tests. agc_driver_graphics then fails on a 10 GiB budget with 5 GiB used outside the texture caches does not leave 1792 MiB ..., and agc_driver_sampled_cache_budget_memory fails on 53 GiB in use of a 64 GiB budget leaves the storage image cache 3002 MiB, not the 1024 MiB .... Restored, all four pass 3 of 3.
  • GPU: ^agc_driver_(storage|sampled|image|cache|budget|resource_cache|graphics$) 56 of 56. Full ^agc_driver_ serial: 488 of 490. The two failures are agc_driver_f16_fma_denormal_modes and agc_driver_fma_mix_f16_denormal_modes, which fail on main on this GPU (#7100).
  • Non-GPU suite (883 tests, -j8): 852 pass first time. The other 31 were load timeouts or load crashes on a shared host, and all pass when rerun serially. The conventions_function_bodies* shards and hardware_oracle_compare were run directly with python (26-69 s). tools/check_conventions.py and git diff --check pass.
  • Titles: PS5 OpenGL Showcase (PPSA99005) and PS5MC (PPSA99420), the heaviest storage-image users I have.
    • Setup: 65 s per run, APS5_PROFILE_DRAW=1 APS5_PROFILE_GPU=1 APS5_TRACE_SUMMARY_EVERY=10. The PR ran against the same tree with only the formula reverted, alternating.
    • 10 runs, no stop line, no [gpu] errors.
    • Every run reports storage image cache budget 2810 MiB on both builds. The heap is at 68-1347 of 11243 MiB, so the new formula stays at its cap (a quarter of the budget). Storage images created per run: 17-23 (PPSA99005) and 13 (PPSA99420) on both.
    • Low-load pair of PPSA99005, PR vs reverted: 430 vs 425 frames in 65 s, frame p50 142 vs 139 ms, p90 164 vs 156 ms. app.exe private bytes 3747/3889 MiB vs 3807/3948 MiB at 30/60 s.
    • The other runs were taken during builds and are dominated by host load; they show the same budgets and no errors.
  • On this card the new budget only drops below its cap once the heap's use outside the caches plus max(2 GiB, sampled textures alive) passes about 7 GiB. None of my titles reach that, so only the tests exercise the shrink path here.
  • Not checked: PPSA11386, any title near the heap budget, 8 GB cards, AMD/RADV, Intel, Linux.

Written with Claude Code assistance (validation by a subagent, reviewed in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234858406 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7071#issuecomment-6234858406). Originally posted by [screamm](https://github.com/screamm) on 2026-10-17T14:06:14Z. --- Cross-validation on Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 12 GB (driver 596.21), WinLibs MinGW-w64 GCC 15.2.0, Release with `BUILD_TESTING=ON`. PR head `39c23664b` merged on main `c9e6c45de` (clean). PPSA11386 is not available to me, so this covers the tests and a no-regression check on other titles, not the out-of-memory stops. - Build: full build and `libs` pass. - `agc_driver_graphics`, `agc_driver_sampled_cache_budget`, `agc_driver_sampled_cache_budget_memory`, `agc_driver_storage_cache_budget`, `--repeat until-fail:3`: 3 of 3 each. The memory case runs here (not skipped): `reported heap budget 65536 MiB with 54272 MiB in use: storage image cache budget 1024 MiB`. - Negative control: I put only the `StorageTextureBudget` body back to main's `max(512 MiB, min(TextureCacheBudget, budget / 4))` and kept the tests. `agc_driver_graphics` then fails on `a 10 GiB budget with 5 GiB used outside the texture caches does not leave 1792 MiB ...`, and `agc_driver_sampled_cache_budget_memory` fails on `53 GiB in use of a 64 GiB budget leaves the storage image cache 3002 MiB, not the 1024 MiB ...`. Restored, all four pass 3 of 3. - GPU: `^agc_driver_(storage|sampled|image|cache|budget|resource_cache|graphics$)` 56 of 56. Full `^agc_driver_` serial: 488 of 490. The two failures are `agc_driver_f16_fma_denormal_modes` and `agc_driver_fma_mix_f16_denormal_modes`, which fail on main on this GPU (#7100). - Non-GPU suite (883 tests, `-j8`): 852 pass first time. The other 31 were load timeouts or load crashes on a shared host, and all pass when rerun serially. The `conventions_function_bodies*` shards and `hardware_oracle_compare` were run directly with python (26-69 s). `tools/check_conventions.py` and `git diff --check` pass. - Titles: PS5 OpenGL Showcase (PPSA99005) and PS5MC (PPSA99420), the heaviest storage-image users I have. - Setup: 65 s per run, `APS5_PROFILE_DRAW=1 APS5_PROFILE_GPU=1 APS5_TRACE_SUMMARY_EVERY=10`. The PR ran against the same tree with only the formula reverted, alternating. - 10 runs, no stop line, no `[gpu]` errors. - Every run reports `storage image cache budget 2810 MiB` on both builds. The heap is at 68-1347 of 11243 MiB, so the new formula stays at its cap (a quarter of the budget). Storage images created per run: 17-23 (PPSA99005) and 13 (PPSA99420) on both. - Low-load pair of PPSA99005, PR vs reverted: 430 vs 425 frames in 65 s, frame p50 142 vs 139 ms, p90 164 vs 156 ms. app.exe private bytes 3747/3889 MiB vs 3807/3948 MiB at 30/60 s. - The other runs were taken during builds and are dominated by host load; they show the same budgets and no errors. - On this card the new budget only drops below its cap once the heap's use outside the caches plus max(2 GiB, sampled textures alive) passes about 7 GiB. None of my titles reach that, so only the tests exercise the shrink path here. - Not checked: PPSA11386, any title near the heap budget, 8 GB cards, AMD/RADV, Intel, Linux. Written with Claude Code assistance (validation by a subagent, reviewed in this session).
SleglJan commented 2026-10-17 14:12:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-17T14:12:47Z.


Thanks @screamm, especially for the negative control with only the formula reverted, and for two more titles on a 12 GB card. Your results are added under Tested.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234926581 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7071#issuecomment-6234926581). Originally posted by [SleglJan](https://github.com/SleglJan) on 2026-10-17T14:12:47Z. --- Thanks @screamm, especially for the negative control with only the formula reverted, and for two more titles on a 12 GB card. Your results are added under Tested. AI-assisted: yes (Claude Code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7071
No description provided.