perf(agc): let the sampled texture cache grow into host memory while a frame's textures don't fit #12684

Closed
milescoviello wants to merge 3 commits from upstream-pr/12684 into main
milescoviello commented 2026-10-29 01:59:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-29T01:59:05Z.


What

Ghost of Tsushima Director's Cut (PPSA02225 02.024.000) runs its brightness screen and opening at about one frame per 30 to 50 seconds on an RTX 4070 Ti (12 GB) here. The draws are CPU bound in their resource builds. The sampled texture cache's budget sits at its 2 GiB floor: the device-local heap's VK_EXT_memory_budget budget is about 9.2 GB, because other processes hold about 2.2 GB of the card, and about 6.4 GB of it is in use outside the texture caches.

A frame's sampled textures don't fit in 2 GiB. One draw binds a 27,130-element image table, and the frame uses about 2.5 GiB of textures in all. admitTexture then finds every entry it could evict used in this or the previous present, so it turns the new texture away ("used uncached"), and the texture is made again at its next use. Over 210-600 s of a default run, the driver made 157,000 to 165,000 sampled textures. With this change, that stretch presents 20 frames instead of 6 and 9 (two runs each, see Tested).

How

sampledBudget adds room past the reported share while a frame's textures don't fit, when the device has a heap outside device-local memory. Two things count as a frame that doesn't fit: admitTexture turning a texture away, and an out-of-memory recovery for an allocation that could go to host memory reaching a sampled entry used in the last two presents. In Ghost of Tsushima the second is the common one: the cache stays at its budget, and the recoveries release the frame's own textures.

  • At each budget read (at most once a second) after either, the room grows by 256 MiB, up to 2 GiB and up to a quarter of the largest non-device-local heap's VK_EXT_memory_budget budget (its size without the extension) in whole steps (SampledSpillCeiling). Only a discrete GPU gets room at all.
  • It gives 256 MiB back at a read after 10 s without either, while the cache's bytes leave at least two steps of it unused.
  • SampledTextureSpill is that step, as a function of the previous room, whether the frame didn't fit since the last read, whether the cache is quiet, and the ceiling; room above a ceiling that fell is brought down to it.

While the budget has that room, ReleaseTextureCaches stops at the first sampled entry used in the last two presents when the allocation that ran out of device memory can go to host memory (ReclaimHasHostFallback, set by BufferPool::AllocateMemory around its recovery call). The allocation then goes to host memory through its existing fallback.

Without that second part the grown cache only fills the device-local heap sooner. Each out-of-memory recovery then releases about 270 MiB of the frame's own textures, and the frame rate doesn't change. So the two parts are one change. The textures past the device's share also go to host memory once the heap is at its reported budget, through the existing placement in Context::DeviceMemoryType.

The [gpu] sampled texture cache budget line now says how much of the budget is past the device's share, and the [gpu] texture caches released line says when a recovery stopped at a recently used entry. Those stops come several times a second in Ghost of Tsushima, so the line is printed for the first five and then at each power of two, with the running count.

A device whose frame fits its budget never turns textures away, so its budget doesn't change. That matters because USAGE.md records a title that got slower with a fixed larger budget (PPSA16064 with APS5_TEXTURE_CACHE_MIB=3072 on an 8 GB card). A GPU that isn't discrete gets no room: an integrated GPU's non-device-local heap (an APU's GTT heap under RADV, for example) is the same system memory the title uses. Neither does a device whose heaps are all device-local. On a discrete GPU the quarter bounds the room by what the host can give: here the host heap is 22.7 GiB of a 32 GB host, so the ceiling is the 2 GiB cap, and a host heap with a 6 GiB budget would get 1.5 GiB. APS5_TEXTURE_CACHE_MIB still fixes the budget.

The storage image cache is left as it is. In the experiments below, raising only its budget didn't change the frame rate.

USAGE.md describes the room. It has its own debt entry, which says where the step, the cap, the quarter and the 10 s came from; the texture cache budgets entry is as on main.

Tested

Linux (Ubuntu 26.04.1, GCC 15.2), RTX 4070 Ti 12 GB (NVIDIA 615.71.09), with about 2.2 GB of the card held by other processes. On main c9207624bc unless noted:

  • New agc_sampled_cache_spill (CPU only):

    • SampledTextureSpill grows by 256 MiB per read while the frame doesn't fit, stops at the ceiling (2 GiB or a lower one), keeps its room on a read that is neither, gives a step back on a quiet read (the rest when less than a step is left), and brings room above a lowered ceiling down to it.
    • SampledSpillCeiling is 2 GiB for a 22 GiB host heap and 1.5 GiB for a 6 GiB host budget. It uses the heap's size without a reported budget, rounds down to whole steps, and gives 0 for a heap whose quarter is under a step, for a GPU that isn't discrete and when every heap is device-local.
  • New execution modes of agc_driver_sampled_cache_budget_tests. They run without a fixed cache budget and with a fake VK_EXT_memory_budget hook reporting 64 GiB per heap:

    • agc_driver_recover_sampled-recent_allocation: with room, a host-fallback recovery keeps the current present's texture, and the new texture goes to host memory.
    • agc_driver_recover_sampled-recent-noroom_allocation: with no room, the same recovery releases the texture, and the next budget read is the device's share plus 256 MiB.
    • agc_driver_recover_sampled-recent-device_allocation: with every heap device-local, the recovery releases it.
    • agc_driver_sampled_cache_spill_growth: a texture turned away by a cache full of the current present's textures adds 256 MiB at the next read, a read with nothing turned away keeps it, and a GPU that isn't discrete gets none.
    • The two host-heap recovery modes skip on a device with no memory type outside its device-local heaps.
  • Each piece taken out alone fails its test (one run each). Without the stop at recent entries, recover_sampled-recent fails. With the stop regardless of room, recover_sampled-recent-noroom fails. Without admitTexture's count, spill_growth fails. Without the recovery's count, recover_sampled-recent-noroom fails. Without the discrete-GPU check, agc_sampled_cache_spill and spill_growth fail.

  • Area: at this head (ba0eaedff6), the 19 tests matching ^agc_driver_recover_|^agc_sampled_cache|^agc_driver_sampled_cache|^agc_driver_storage_cache|^agc_buffer_pool pass 3 of 3.

  • Validation layer (Khronos VK_LAYER_KHRONOS_validation 1.4.363, LunarG SDK), on main c9207624bc and at this head:
    VK_LAYER_PATH=<sdk>/layers VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest -R '^agc_driver_sampled_cache_budget$|^agc_driver_recover_|^agc_driver_sampled_cache_spill_growth$' -V

    • main passes 5 of 5 (the new modes don't exist there) and the head 9 of 9. Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS.
    • The layer checked the 5 and 9 devices those tests create, with no VUID- messages on either side.
    • At b31f5f73d9, the earlier comparison over ^agc_driver_sampled_cache_budget$|^agc_driver_sampled_cache_budget_memory$|^agc_driver_storage_cache_budget$|^agc_driver_image_table_reuse was also clean: 5 of 5 on each side, with 3 devices checked.
  • Ghost of Tsushima (PPSA02225 02.024.000). Plain main stops 9-29 s in on native multisample stencil or depth format import is not implemented (#9717). So this was a local stack that runs it, with and without this change: main d5ef780bb4 with #9717 (#9533 inside it), #9742, #10064, #10727, #12147, #8365, #8212, #12561, #12612, #12617 and env-gated diagnostics (a1012e1e49), then this change on top (fd488704ff, the same code as 662b49d7b7; b31f5f73d9 adds only the rate limit of its log line, and the head's ceiling is the 2 GiB cap on this machine). Runs alternate with and without, 600 s each, pad input, defaults otherwise. The brightness screen and opening start about 200 s in; I count presents from 210 to 600 s:

    Run Presents 210-600 s Sampled textures made 210-600 s Budget
    with, 1 20 55,000 4096 MiB (2048 past the device's share)
    without, 2 6 164,600 2048 MiB
    with, 3 20 65,400 4096 MiB
    without, 4 9 157,000 2048 MiB
    • The two runs with this change made 5,414 and 6,504 out-of-memory recoveries, and 5,385 and 6,252 of them stopped at a sampled texture of the last two presents. After that stop, the recovery releases storage images instead, so the textures still fit in device memory. None of the runs with this change placed a texture in host memory.
    • The lowest MemAvailable (32 GB host) was 4.2 and 4.5 GB with this change, and 2.7 and 4.5 GB without it.
    • An earlier version that grew only when admitTexture turned textures away gave 10 and 7 presents, against 9 and 6 without. In this scene the cache rarely turns textures away: the recoveries release them. That's why the recovery reaching a recent texture also counts.
  • Trace captures (APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_SECONDS=300:60, the same stack without and with this PR's three commits, a1012e1e49 and ee55f90649), attached as a release. In the interval lines from 195 s, the runs without the change presented 7 and 7 frames, and the runs with it 13 and 22. The details and the performance_compare.py output are in this comment.

  • Call of Duty: Black Ops II (PPSA34502), 300 s with pad input (main + #9656): its sampled cache held 365 MiB of a 3693 MiB budget and never turned a texture away. This change doesn't grow its budget.

  • Windows 11 VM (GeForce GT 1030, WinLibs GCC 15.2, Release), at this head: the 17 tests matching ^agc_buffer_pool|^agc_sampled_cache|^agc_driver_sampled_cache|^agc_driver_recover_ pass 3 of 3. On main c9207624bc, the 12 that exist there pass 3 of 3.

Not tested: AMD, and a title whose frame fits its budget on a smaller card, such as PPSA16064 from USAGE.md. I don't have those here.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none. Two open PRs conflict with this: #6194, which grows the storage image cache under eviction (ShaderResources.cpp/.hpp and the debt entry), and #12575, which keeps refused textures for their present (one hunk in ReleaseTextureCaches). The order is in the comments below.
  • Fixes: none
  • Unblocks: none (Ghost of Tsushima's opening frame rate, see Tested)
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti (Linux)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5060763637 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12684). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-29T01:59:05Z. --- ### What Ghost of Tsushima Director's Cut (PPSA02225 02.024.000) runs its brightness screen and opening at about one frame per 30 to 50 seconds on an RTX 4070 Ti (12 GB) here. The draws are CPU bound in their resource builds. The sampled texture cache's budget sits at its 2 GiB floor: the device-local heap's `VK_EXT_memory_budget` budget is about 9.2 GB, because other processes hold about 2.2 GB of the card, and about 6.4 GB of it is in use outside the texture caches. A frame's sampled textures don't fit in 2 GiB. One draw binds a 27,130-element image table, and the frame uses about 2.5 GiB of textures in all. `admitTexture` then finds every entry it could evict used in this or the previous present, so it turns the new texture away ("used uncached"), and the texture is made again at its next use. Over 210-600 s of a default run, the driver made 157,000 to 165,000 sampled textures. With this change, that stretch presents 20 frames instead of 6 and 9 (two runs each, see Tested). ### How `sampledBudget` adds room past the reported share while a frame's textures don't fit, when the device has a heap outside device-local memory. Two things count as a frame that doesn't fit: `admitTexture` turning a texture away, and an out-of-memory recovery for an allocation that could go to host memory reaching a sampled entry used in the last two presents. In Ghost of Tsushima the second is the common one: the cache stays at its budget, and the recoveries release the frame's own textures. - At each budget read (at most once a second) after either, the room grows by 256 MiB, up to 2 GiB and up to a quarter of the largest non-device-local heap's `VK_EXT_memory_budget` budget (its size without the extension) in whole steps (`SampledSpillCeiling`). Only a discrete GPU gets room at all. - It gives 256 MiB back at a read after 10 s without either, while the cache's bytes leave at least two steps of it unused. - `SampledTextureSpill` is that step, as a function of the previous room, whether the frame didn't fit since the last read, whether the cache is quiet, and the ceiling; room above a ceiling that fell is brought down to it. While the budget has that room, `ReleaseTextureCaches` stops at the first sampled entry used in the last two presents when the allocation that ran out of device memory can go to host memory (`ReclaimHasHostFallback`, set by `BufferPool::AllocateMemory` around its recovery call). The allocation then goes to host memory through its existing fallback. Without that second part the grown cache only fills the device-local heap sooner. Each out-of-memory recovery then releases about 270 MiB of the frame's own textures, and the frame rate doesn't change. So the two parts are one change. The textures past the device's share also go to host memory once the heap is at its reported budget, through the existing placement in `Context::DeviceMemoryType`. The `[gpu] sampled texture cache budget` line now says how much of the budget is past the device's share, and the `[gpu] texture caches released` line says when a recovery stopped at a recently used entry. Those stops come several times a second in Ghost of Tsushima, so the line is printed for the first five and then at each power of two, with the running count. A device whose frame fits its budget never turns textures away, so its budget doesn't change. That matters because USAGE.md records a title that got slower with a fixed larger budget (PPSA16064 with `APS5_TEXTURE_CACHE_MIB=3072` on an 8 GB card). A GPU that isn't discrete gets no room: an integrated GPU's non-device-local heap (an APU's GTT heap under RADV, for example) is the same system memory the title uses. Neither does a device whose heaps are all device-local. On a discrete GPU the quarter bounds the room by what the host can give: here the host heap is 22.7 GiB of a 32 GB host, so the ceiling is the 2 GiB cap, and a host heap with a 6 GiB budget would get 1.5 GiB. `APS5_TEXTURE_CACHE_MIB` still fixes the budget. The storage image cache is left as it is. In the experiments below, raising only its budget didn't change the frame rate. USAGE.md describes the room. It has its own debt entry, which says where the step, the cap, the quarter and the 10 s came from; the texture cache budgets entry is as on `main`. ### Tested Linux (Ubuntu 26.04.1, GCC 15.2), RTX 4070 Ti 12 GB (NVIDIA 615.71.09), with about 2.2 GB of the card held by other processes. On `main` `c9207624bc` unless noted: - **New `agc_sampled_cache_spill`** (CPU only): - `SampledTextureSpill` grows by 256 MiB per read while the frame doesn't fit, stops at the ceiling (2 GiB or a lower one), keeps its room on a read that is neither, gives a step back on a quiet read (the rest when less than a step is left), and brings room above a lowered ceiling down to it. - `SampledSpillCeiling` is 2 GiB for a 22 GiB host heap and 1.5 GiB for a 6 GiB host budget. It uses the heap's size without a reported budget, rounds down to whole steps, and gives 0 for a heap whose quarter is under a step, for a GPU that isn't discrete and when every heap is device-local. - **New execution modes** of `agc_driver_sampled_cache_budget_tests`. They run without a fixed cache budget and with a fake `VK_EXT_memory_budget` hook reporting 64 GiB per heap: - `agc_driver_recover_sampled-recent_allocation`: with room, a host-fallback recovery keeps the current present's texture, and the new texture goes to host memory. - `agc_driver_recover_sampled-recent-noroom_allocation`: with no room, the same recovery releases the texture, and the next budget read is the device's share plus 256 MiB. - `agc_driver_recover_sampled-recent-device_allocation`: with every heap device-local, the recovery releases it. - `agc_driver_sampled_cache_spill_growth`: a texture turned away by a cache full of the current present's textures adds 256 MiB at the next read, a read with nothing turned away keeps it, and a GPU that isn't discrete gets none. - The two host-heap recovery modes skip on a device with no memory type outside its device-local heaps. - **Each piece taken out alone fails its test** (one run each). Without the stop at recent entries, `recover_sampled-recent` fails. With the stop regardless of room, `recover_sampled-recent-noroom` fails. Without `admitTexture`'s count, `spill_growth` fails. Without the recovery's count, `recover_sampled-recent-noroom` fails. Without the discrete-GPU check, `agc_sampled_cache_spill` and `spill_growth` fail. - **Area:** at this head (`ba0eaedff6`), the 19 tests matching `^agc_driver_recover_|^agc_sampled_cache|^agc_driver_sampled_cache|^agc_driver_storage_cache|^agc_buffer_pool` pass 3 of 3. - **Validation layer** (Khronos `VK_LAYER_KHRONOS_validation` 1.4.363, LunarG SDK), on `main` `c9207624bc` and at this head: `VK_LAYER_PATH=<sdk>/layers VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest -R '^agc_driver_sampled_cache_budget$|^agc_driver_recover_|^agc_driver_sampled_cache_spill_growth$' -V` - `main` passes 5 of 5 (the new modes don't exist there) and the head 9 of 9. Neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. - The layer checked the 5 and 9 devices those tests create, with no `VUID-` messages on either side. - At `b31f5f73d9`, the earlier comparison over `^agc_driver_sampled_cache_budget$|^agc_driver_sampled_cache_budget_memory$|^agc_driver_storage_cache_budget$|^agc_driver_image_table_reuse` was also clean: 5 of 5 on each side, with 3 devices checked. - **Ghost of Tsushima (PPSA02225 02.024.000).** Plain `main` stops 9-29 s in on `native multisample stencil or depth format import is not implemented` (#9717). So this was a local stack that runs it, with and without this change: `main` `d5ef780bb4` with #9717 (#9533 inside it), #9742, #10064, #10727, #12147, #8365, #8212, #12561, #12612, #12617 and env-gated diagnostics (`a1012e1e49`), then this change on top (`fd488704ff`, the same code as `662b49d7b7`; `b31f5f73d9` adds only the rate limit of its log line, and the head's ceiling is the 2 GiB cap on this machine). Runs alternate with and without, 600 s each, pad input, defaults otherwise. The brightness screen and opening start about 200 s in; I count presents from 210 to 600 s: | Run | Presents 210-600 s | Sampled textures made 210-600 s | Budget | |---|---|---|---| | with, 1 | 20 | 55,000 | 4096 MiB (2048 past the device's share) | | without, 2 | 6 | 164,600 | 2048 MiB | | with, 3 | 20 | 65,400 | 4096 MiB | | without, 4 | 9 | 157,000 | 2048 MiB | - The two runs with this change made 5,414 and 6,504 out-of-memory recoveries, and 5,385 and 6,252 of them stopped at a sampled texture of the last two presents. After that stop, the recovery releases storage images instead, so the textures still fit in device memory. None of the runs with this change placed a texture in host memory. - The lowest `MemAvailable` (32 GB host) was 4.2 and 4.5 GB with this change, and 2.7 and 4.5 GB without it. - An earlier version that grew only when `admitTexture` turned textures away gave 10 and 7 presents, against 9 and 6 without. In this scene the cache rarely turns textures away: the recoveries release them. That's why the recovery reaching a recent texture also counts. - **Trace captures** (`APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_SECONDS=300:60`, the same stack without and with this PR's three commits, `a1012e1e49` and `ee55f90649`), [attached as a release](https://github.com/milescoviello/AnyPS5/releases/tag/pr12684-got-captures). In the interval lines from 195 s, the runs without the change presented 7 and 7 frames, and the runs with it 13 and 22. The details and the `performance_compare.py` output are in [this comment](https://github.com/boykopovar/AnyPS5/pull/12684#issuecomment-6487655563). - **Call of Duty: Black Ops II (PPSA34502)**, 300 s with pad input (`main` + #9656): its sampled cache held 365 MiB of a 3693 MiB budget and never turned a texture away. This change doesn't grow its budget. - **Windows 11 VM** (GeForce GT 1030, WinLibs GCC 15.2, Release), at this head: the 17 tests matching `^agc_buffer_pool|^agc_sampled_cache|^agc_driver_sampled_cache|^agc_driver_recover_` pass 3 of 3. On `main` `c9207624bc`, the 12 that exist there pass 3 of 3. Not tested: AMD, and a title whose frame fits its budget on a smaller card, such as PPSA16064 from USAGE.md. I don't have those here. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [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) - [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 - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none. Two open PRs conflict with this: #6194, which grows the storage image cache under eviction (`ShaderResources.cpp`/`.hpp` and the debt entry), and #12575, which keeps refused textures for their present (one hunk in `ReleaseTextureCaches`). The order is in the comments below. - [x] Fixes: none - [x] Unblocks: none (Ghost of Tsushima's opening frame rate, see Tested) - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti (Linux) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
adriadam10 commented 2026-10-29 02:10:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-29T02:10:08Z.

Review: CHANGES_REQUESTED


Thanks, the change is bounded (256 MiB steps, 2 GiB cap, given back after 10 quiet seconds) and the docs follow it. Before it can merge:

  • This PR is labelled perf, so it needs the aps5-summary.jsonl line of a capture on main and one with the change, from the same title, scene and machine, plus the output of tools/trace_digest.py on both (AGENTS.md, GAME_TESTING.md "Pull requests labelled perf"). The present counts in Tested are not a substitute; tools/performance_compare.py can produce the comparison. Attach both traces to the PR.
  • The new test (spill-cpu) pins only SampledTextureSpill. The part that changes behaviour, ReleaseTextureCaches stopping at an entry used in the last two presents when ReclaimHasHostFallback() is set and cache.spill != 0 (ShaderResources.cpp:1469-1482), and BufferPool::AllocateMemory setting the flag (BufferPool.cpp:94-97), has no test that fails without it. Please add one to agc_driver_sampled_cache_budget (sampled entries from the current present, a host-fallback reclaim keeps them; without fallback they are released).

#6194 conflicts textually with this one, as you noted; whichever lands second rebases.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692041086 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12684#pullrequestreview-5692041086). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-29T02:10:08Z. **Review:** CHANGES_REQUESTED --- Thanks, the change is bounded (256 MiB steps, 2 GiB cap, given back after 10 quiet seconds) and the docs follow it. Before it can merge: - This PR is labelled `perf`, so it needs the `aps5-summary.jsonl` line of a capture on `main` and one with the change, from the same title, scene and machine, plus the output of `tools/trace_digest.py` on both (AGENTS.md, GAME_TESTING.md "Pull requests labelled `perf`"). The present counts in Tested are not a substitute; `tools/performance_compare.py` can produce the comparison. Attach both traces to the PR. - The new test (`spill-cpu`) pins only `SampledTextureSpill`. The part that changes behaviour, `ReleaseTextureCaches` stopping at an entry used in the last two presents when `ReclaimHasHostFallback()` is set and `cache.spill != 0` (`ShaderResources.cpp:1469-1482`), and `BufferPool::AllocateMemory` setting the flag (`BufferPool.cpp:94-97`), has no test that fails without it. Please add one to `agc_driver_sampled_cache_budget` (sampled entries from the current present, a host-fallback reclaim keeps them; without fallback they are released). #6194 conflicts textually with this one, as you noted; whichever lands second rebases.
adriadam10 commented 2026-10-29 03:11:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-29T03:11:16Z.

Review: CHANGES_REQUESTED


Thanks, the new head covers Dean's points (discrete GPUs only, room bounded by a quarter of the host heap's budget) and the tests: recover-sampled-recent, -noroom, -device and spill-growth each pin a piece that changes behaviour (the stop at recent entries, the flag set in BufferPool::AllocateMemory, the count of a refused texture), and your table shows each failing without it.

One point is still open:

  • This PR is labelled perf: it needs the aps5-summary.jsonl line of a capture on main and one with the change, from the same title, scene and machine, plus the output of tools/trace_digest.py on both, and tools/performance_compare.py output. You said they are running; please attach them to the PR. Also add the VK_LAYER_KHRONOS_validation comparison of main vs the change for the focused tests (AGENTS.md, AGC changes), confirming no new VUID- errors.

Once those are in, this is ready from my side. #12575 conflicts in ReleaseTextureCaches; whichever lands second rebases.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692405577 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12684#pullrequestreview-5692405577). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-29T03:11:16Z. **Review:** CHANGES_REQUESTED --- Thanks, the new head covers Dean's points (discrete GPUs only, room bounded by a quarter of the host heap's budget) and the tests: `recover-sampled-recent`, `-noroom`, `-device` and `spill-growth` each pin a piece that changes behaviour (the stop at recent entries, the flag set in `BufferPool::AllocateMemory`, the count of a refused texture), and your table shows each failing without it. One point is still open: - This PR is labelled `perf`: it needs the `aps5-summary.jsonl` line of a capture on `main` and one with the change, from the same title, scene and machine, plus the output of `tools/trace_digest.py` on both, and `tools/performance_compare.py` output. You said they are running; please attach them to the PR. Also add the `VK_LAYER_KHRONOS_validation` comparison of `main` vs the change for the focused tests (AGENTS.md, AGC changes), confirming no new `VUID-` errors. Once those are in, this is ready from my side. #12575 conflicts in `ReleaseTextureCaches`; whichever lands second rebases.

Pull request closed

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!12684
No description provided.