fix(agc): texture cache budgets from device memory #1181

Closed
MichonGoddijn231849 wants to merge 1 commit from upstream-pr/1181 into main
MichonGoddijn231849 commented 2026-10-07 16:44:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-07T16:44:31Z.


What

The sampled-texture and storage-image caches evicted at a fixed 2 GiB each. That is below a bindless table's working set (GTA V's ray tracing binds about 4500 textures), so every table dispatch recreated its images.

Both budgets are now a quarter of the largest device-local heap, at least 2 GiB. APS5_TEXTURE_CACHE_MIB still overrides.

Tested

Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB, MinGW-w64 GCC 15.2.0.

  • GTA V PPSA04264 (01.005) runs with this change on the combined gta-v/testing branch (Performance mode, the prologue).
  • On this branch: builds, and ctest passes. Not run here: the relinker's Python tests (my local Python does not find their helper modules) and guest_gameupdate.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes. Written with Claude (Anthropic) under my direction; I reviewed and tested it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4775677053 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1181). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-07T16:44:31Z. --- ### What The sampled-texture and storage-image caches evicted at a fixed 2 GiB each. That is below a bindless table's working set (GTA V's ray tracing binds about 4500 textures), so every table dispatch recreated its images. Both budgets are now a quarter of the largest device-local heap, at least 2 GiB. `APS5_TEXTURE_CACHE_MIB` still overrides. ### Tested Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB, MinGW-w64 GCC 15.2.0. - GTA V PPSA04264 (01.005) runs with this change on the combined [`gta-v/testing`](https://github.com/MichonGoddijn231849/AnyPS5-fork/tree/gta-v/testing) branch (Performance mode, the prologue). - On this branch: builds, and `ctest` passes. Not run here: the relinker's Python tests (my local Python does not find their helper modules) and `guest_gameupdate`. ### Checklist - [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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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 - [x] AI-assisted: yes. Written with Claude (Anthropic) under my direction; I reviewed and tested it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
oneandonlydean commented 2026-10-08 02:44:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T02:44:25Z.


Closing: #1059, opened first, sizes both texture caches from the device-local heap with the same 2 GiB floor and APS5_TEXTURE_CACHE_MIB override, and also fixes the accounting. If the GTA V bindless case needs more than that, comment on #1059 with what's missing.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6051104160 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1181#issuecomment-6051104160). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-08T02:44:25Z. --- Closing: #1059, opened first, sizes both texture caches from the device-local heap with the same 2 GiB floor and `APS5_TEXTURE_CACHE_MIB` override, and also fixes the accounting. If the GTA V bindless case needs more than that, comment on #1059 with what's missing.

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