fix(agc): keep half the host heap out of the host import budget #6472

Merged
ahir061 merged 1 commit from upstream-pr/6472 into main 2026-10-19 02:49:46 +00:00
ahir061 commented 2026-10-15 16:35:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ahir061 on 2026-10-15T16:35:00Z.


What

Imports, type-3 mirrors and the buffers and textures placed in host memory share the driver's system memory heap. On Windows that heap is half the physical memory, so on a 16 GiB machine (heap 8128 MiB, VK_EXT_memory_budget 7465 MiB on the RX 6600 XT below) the import budget, the heap less 2 GiB, let live imports hold 6080 MiB and left about 1.4 GiB for everything else. Host buffer allocations then fell back to the 256 MiB device-local host-visible heap (no Resizable BAR) and failed:

[gpu] driver failure: compute shader 0x11d032b100: AGC graphics: vkAllocateMemory buffer slab: allocation=2097152 memoryType=2 reclaimed=0 released=0 initialResult=-2 attempts=1: Vulkan result -2

The budget now keeps the larger of 2 GiB and half the largest host heap out of it. HostImportBudget holds the arithmetic so agc_driver_graphics can check it: 16 GiB machine 4064 MiB (6080 before), 32 GiB 8 GiB (14 before), 64 GiB 16 GiB (30 before); heaps of 4 GiB and less keep the 2 GiB reserve. APS5_HOST_IMPORT_MIB still overrides it. Imports past the budget retire the least recently used ones as before; in the runs below no import was refused.

Tested

  • agc_driver_graphics (Windows 11 26200, GCC 15.2.0 UCRT, Release, BUILD_TESTING=ON): passes. With the old 2 GiB reserve put back, hostImportBudgetTests fails with "imports on a 16 GiB machine take more than half its 8128 MiB host heap".

  • python tools/check_conventions.py --base upstream/main: passes.

  • Marvel's Wolverine PPSA03671 01.001.005, Windows 11, Ryzen 7 5800X3D, 16 GiB RAM, RX 6600 XT 8 GB (AMD 26.9.2), --windows. main alone aborts earlier on this card (device memory, #5961), so the runs use a local branch: main a5e2a80c6 + #5998, #6340, #5987, #6174, plus a local storage-cache budget of 4 GiB (APS5_STORAGE_CACHE_MIB=4096). The 464 s run and the 600 and 1500 s runs predate a commit that makes two texture creation logs debug-only (a separate PR); every other run has it. Only the import budget differs:

    import budget runs result
    default before this PR, 6080 MiB 2 aborted after 464 s (the error above) and after 84 s, before the first frame, in the host heap itself: vkAllocateMemory buffer: allocation=196083712 memoryType=3 reclaimed=0 released=1048576 initialResult=-2 attempts=2
    default with this PR, 4064 MiB (the branch plus this commit, no override) 1 no abort in 904 s (stopped at the time limit), 40 frames, about 13 s per frame
    APS5_HOST_IMPORT_MIB=4096 4 no abort in 600, 1500 and 900 s; the fourth, of 60 minutes, aborted after 3052 s (below)

    The 3052 s abort took the same path: heap 1 full, then a 187 MiB buffer sent to the BAR heap.

    [gpu] driver failure: compute shader 0x11d0323c00: AGC graphics: vkAllocateMemory buffer: allocation=196083712 memoryType=2 reclaimed=0 released=0 initialResult=-2 attempts=1: Vulkan result -2
    

    The imports stayed within the budget then, and none was refused. Heap 1 had filled with storage textures that the full device-local heap placed in host memory: [gpu] storage texture: device-local heap 0 uses 6583 of its 6583 MiB budget, 3670016 bytes placed in host memory type 1; 524288 such allocations, 1507919 MiB. That placement has no host-heap budget of its own; it is a separate topic, not in this PR.

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
  • Unblocks: none on its own; on PPSA03671 #5516 (16 GiB machines, with #5998) it removes the early abort above, not the later one under Tested
  • GPUs tested: AMD Radeon RX 6600 XT, AMD proprietary driver 26.9.2, Windows 11 26200
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4876593532 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6472). Originally posted by [ahir061](https://github.com/ahir061) on 2026-10-15T16:35:00Z. --- ### What Imports, type-3 mirrors and the buffers and textures placed in host memory share the driver's system memory heap. On Windows that heap is half the physical memory, so on a 16 GiB machine (heap 8128 MiB, `VK_EXT_memory_budget` 7465 MiB on the RX 6600 XT below) the import budget, the heap less 2 GiB, let live imports hold 6080 MiB and left about 1.4 GiB for everything else. Host buffer allocations then fell back to the 256 MiB device-local host-visible heap (no Resizable BAR) and failed: ``` [gpu] driver failure: compute shader 0x11d032b100: AGC graphics: vkAllocateMemory buffer slab: allocation=2097152 memoryType=2 reclaimed=0 released=0 initialResult=-2 attempts=1: Vulkan result -2 ``` The budget now keeps the larger of 2 GiB and half the largest host heap out of it. `HostImportBudget` holds the arithmetic so `agc_driver_graphics` can check it: 16 GiB machine 4064 MiB (6080 before), 32 GiB 8 GiB (14 before), 64 GiB 16 GiB (30 before); heaps of 4 GiB and less keep the 2 GiB reserve. `APS5_HOST_IMPORT_MIB` still overrides it. Imports past the budget retire the least recently used ones as before; in the runs below no import was refused. ### Tested - `agc_driver_graphics` (Windows 11 26200, GCC 15.2.0 UCRT, Release, `BUILD_TESTING=ON`): passes. With the old 2 GiB reserve put back, `hostImportBudgetTests` fails with "imports on a 16 GiB machine take more than half its 8128 MiB host heap". - `python tools/check_conventions.py --base upstream/main`: passes. - Marvel's Wolverine PPSA03671 01.001.005, Windows 11, Ryzen 7 5800X3D, 16 GiB RAM, RX 6600 XT 8 GB (AMD 26.9.2), `--windows`. `main` alone aborts earlier on this card (device memory, #5961), so the runs use a local branch: `main` a5e2a80c6 + #5998, #6340, #5987, #6174, plus a local storage-cache budget of 4 GiB (`APS5_STORAGE_CACHE_MIB=4096`). The 464 s run and the 600 and 1500 s runs predate a commit that makes two texture creation logs debug-only (a separate PR); every other run has it. Only the import budget differs: | import budget | runs | result | |---|---|---| | default before this PR, 6080 MiB | 2 | aborted after 464 s (the error above) and after 84 s, before the first frame, in the host heap itself: `vkAllocateMemory buffer: allocation=196083712 memoryType=3 reclaimed=0 released=1048576 initialResult=-2 attempts=2` | | default with this PR, 4064 MiB (the branch plus this commit, no override) | 1 | no abort in 904 s (stopped at the time limit), 40 frames, about 13 s per frame | | `APS5_HOST_IMPORT_MIB=4096` | 4 | no abort in 600, 1500 and 900 s; the fourth, of 60 minutes, aborted after 3052 s (below) | The 3052 s abort took the same path: heap 1 full, then a 187 MiB buffer sent to the BAR heap. ``` [gpu] driver failure: compute shader 0x11d0323c00: AGC graphics: vkAllocateMemory buffer: allocation=196083712 memoryType=2 reclaimed=0 released=0 initialResult=-2 attempts=1: Vulkan result -2 ``` The imports stayed within the budget then, and none was refused. Heap 1 had filled with storage textures that the full device-local heap placed in host memory: `[gpu] storage texture: device-local heap 0 uses 6583 of its 6583 MiB budget, 3670016 bytes placed in host memory type 1; 524288 such allocations, 1507919 MiB`. That placement has no host-heap budget of its own; it is a separate topic, not in this PR. ### 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 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 - [x] Unblocks: none on its own; on PPSA03671 #5516 (16 GiB machines, with #5998) it removes the early abort above, not the later one under Tested - [x] GPUs tested: AMD Radeon RX 6600 XT, AMD proprietary driver 26.9.2, Windows 11 26200 - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-15 16:44:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T16:44:44Z.


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 6646 docs/dev/debt/libSceAgcDriver.md L181
PR 6647 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp L5831
PR 6958 docs/dev/debt/libSceAgcDriver.md L181
PR 7292 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp L79

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 1191 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1324 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1395 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4650 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
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
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6185 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6457 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6479 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6498 docs/dev/debt/libSceAgcDriver.md
PR 6523 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6529 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6535 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6543 docs/dev/debt/libSceAgcDriver.md
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6563 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6567 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6571 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6639 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6683 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6730 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6762 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6786 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.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 6868 docs/dev/debt/libSceAgcDriver.md
PR 6941 docs/dev/debt/libSceAgcDriver.md
PR 6946 docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6966 docs/dev/debt/libSceAgcDriver.md
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6972 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6977 docs/dev/debt/libSceAgcDriver.md
PR 7008 docs/dev/debt/libSceAgcDriver.md
PR 7085 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7201 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7233 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7254 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7258 docs/dev/debt/libSceAgcDriver.md
PR 7332 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7371 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7390 docs/dev/debt/libSceAgcDriver.md
PR 7432 docs/dev/debt/libSceAgcDriver.md
PR 7505 docs/dev/debt/libSceAgcDriver.md
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7618 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7650 docs/dev/debt/libSceAgcDriver.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6197337128 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6472#issuecomment-6197337128). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T16:44:44Z. --- <!-- 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 6646](https://www.github.com/boykopovar/AnyPS5/pull/6646) | `docs/dev/debt/libSceAgcDriver.md` [L181](https://github.com/boykopovar/AnyPS5/blob/8a526d4495d3a3d355289ccc86939bc2cc7aee7e/docs/dev/debt/libSceAgcDriver.md#L181) | | | | [PR 6647](https://www.github.com/boykopovar/AnyPS5/pull/6647) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` [L5831](https://github.com/boykopovar/AnyPS5/blob/8a526d4495d3a3d355289ccc86939bc2cc7aee7e/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp#L5831) | | | | [PR 6958](https://www.github.com/boykopovar/AnyPS5/pull/6958) | `docs/dev/debt/libSceAgcDriver.md` [L181](https://github.com/boykopovar/AnyPS5/blob/8a526d4495d3a3d355289ccc86939bc2cc7aee7e/docs/dev/debt/libSceAgcDriver.md#L181) | | | | [PR 7292](https://www.github.com/boykopovar/AnyPS5/pull/7292) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp` [L79](https://github.com/boykopovar/AnyPS5/blob/8a526d4495d3a3d355289ccc86939bc2cc7aee7e/core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp#L79) | | | 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 1191](https://www.github.com/boykopovar/AnyPS5/pull/1191) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 1324](https://www.github.com/boykopovar/AnyPS5/pull/1324) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [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) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`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) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`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 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [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) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`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` | | [PR 6177](https://www.github.com/boykopovar/AnyPS5/pull/6177) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6185](https://www.github.com/boykopovar/AnyPS5/pull/6185) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6197](https://www.github.com/boykopovar/AnyPS5/pull/6197) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `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 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6457](https://www.github.com/boykopovar/AnyPS5/pull/6457) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6479](https://www.github.com/boykopovar/AnyPS5/pull/6479) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6498](https://www.github.com/boykopovar/AnyPS5/pull/6498) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6523](https://www.github.com/boykopovar/AnyPS5/pull/6523) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6529](https://www.github.com/boykopovar/AnyPS5/pull/6529) | `core/libs/prx/libSceAgcDriver/tests/Graphics.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 6543](https://www.github.com/boykopovar/AnyPS5/pull/6543) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6549](https://www.github.com/boykopovar/AnyPS5/pull/6549) | `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 6567](https://www.github.com/boykopovar/AnyPS5/pull/6567) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6571](https://www.github.com/boykopovar/AnyPS5/pull/6571) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6639](https://www.github.com/boykopovar/AnyPS5/pull/6639) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6727](https://www.github.com/boykopovar/AnyPS5/pull/6727) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6730](https://www.github.com/boykopovar/AnyPS5/pull/6730) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6762](https://www.github.com/boykopovar/AnyPS5/pull/6762) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6786](https://www.github.com/boykopovar/AnyPS5/pull/6786) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.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 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6941](https://www.github.com/boykopovar/AnyPS5/pull/6941) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6966](https://www.github.com/boykopovar/AnyPS5/pull/6966) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6970](https://www.github.com/boykopovar/AnyPS5/pull/6970) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6972](https://www.github.com/boykopovar/AnyPS5/pull/6972) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7008](https://www.github.com/boykopovar/AnyPS5/pull/7008) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7233](https://www.github.com/boykopovar/AnyPS5/pull/7233) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7254](https://www.github.com/boykopovar/AnyPS5/pull/7254) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`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) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7371](https://www.github.com/boykopovar/AnyPS5/pull/7371) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7390](https://www.github.com/boykopovar/AnyPS5/pull/7390) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7432](https://www.github.com/boykopovar/AnyPS5/pull/7432) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7618](https://www.github.com/boykopovar/AnyPS5/pull/7618) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7650](https://www.github.com/boykopovar/AnyPS5/pull/7650) | `docs/dev/debt/libSceAgcDriver.md` |
EagleBearerYS commented 2026-10-15 16:52:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-15T16:52:12Z.


Data point from Resident Evil Village (PPSA01556) on Windows 11, RTX 3070 Laptop GPU, 16 GB: main's default import budget here is 5,840 MiB. Village fills it by its title screen and keeps refusing imports (21,138 refusals in one boot), each one falling back to a CPU copy. With this rule the budget on this machine would be about 3,944 MiB. At 6,864 MiB we did see vkAllocateMemory return -2 here; at 6,400 MiB and below we haven't.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6197485344 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6472#issuecomment-6197485344). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-15T16:52:12Z. --- Data point from Resident Evil Village (PPSA01556) on Windows 11, RTX 3070 Laptop GPU, 16 GB: main's default import budget here is 5,840 MiB. Village fills it by its title screen and keeps refusing imports (21,138 refusals in one boot), each one falling back to a CPU copy. With this rule the budget on this machine would be about 3,944 MiB. At 6,864 MiB we did see `vkAllocateMemory` return -2 here; at 6,400 MiB and below we haven't.
coltken95 commented 2026-10-15 20:26:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by coltken95 on 2026-10-15T20:26:24Z.


Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with d46210a6e merged into main 44df21632:

  • With the PR: all 8 tests built from Graphics.cpp pass, including the new HostImportBudget checks in agc_driver_graphics.
  • No comparison against main: HostImportBudget is new in this PR, so the test doesn't link without it (undefined symbol: AgcDriver::Graphics::HostImportBudget).

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6201578847 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6472#issuecomment-6201578847). Originally posted by [coltken95](https://github.com/coltken95) on 2026-10-15T20:26:24Z. --- Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with d46210a6e merged into main 44df21632: - With the PR: all 8 tests built from `Graphics.cpp` pass, including the new `HostImportBudget` checks in `agc_driver_graphics`. - No comparison against main: `HostImportBudget` is new in this PR, so the test doesn't link without it (`undefined symbol: AgcDriver::Graphics::HostImportBudget`). AI-assisted: yes (Claude Code)
SoRadGaming commented 2026-10-19 04:54:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SoRadGaming on 2026-10-19T04:54:43Z.


ASTRO BOT no longer boots on a 32 GiB host after this change

Windows 11, Ryzen 7 5800X3D, 32 GiB RAM, RX 9070 XT (16 GiB, Adrenalin 26.8.1). The driver's host heap is 16,345.5 MiB. ASTRO BOT (PPSA21564), on main 676d42396 plus the open PRs #6188 #6273 #6292 #6503 #6566 #6609 #6615 #6617 and some local experiments, none of which change the import budget.

The budget used to be the heap less 2 GiB, 14,297 MiB here; it is now half the heap, 8,172 MiB. During the boot, the title's large registered ranges then stop fitting:

[gpu] host import budget: 8125 MiB live of 8172 MiB (APS5_HOST_IMPORT_MIB); 5 imports (9858 MiB) refused so far, last 0x33d024000+0x3c7dc000
FATAL: an address-based build copies 966 MiB of 1 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x33d19c000+0x3c664000 (966.4 MiB committed, outside the write-watched arena)

The refused range falls back to a copy, and AddressCopyOverflow makes that fatal, so the game aborts during the boot (here an empty-shader-cache boot, about 9 minutes in and before its first frame; I have not tried a warm-cache boot with the new budget). With APS5_HOST_IMPORT_MIB=14297 (the old budget), the same build boots without the abort and reaches the Crash Site hub, as it did before this merged.

So on hosts where half the heap is well above the 2 GiB floor, the reservation costs titles with large imports more than the 16 GiB case needed. A few options, in case they help:

  • cap the reservation (for example the 2 GiB floor plus a fixed share, not half the heap);
  • reserve half only when the heap is small;
  • or let a refused import that would exceed APS5_ADDRESS_COPY_MAX_MIB retry after the budget is trimmed instead of aborting.

Happy to test a change on this machine.

Written with AI assistance (Claude); measured on the machine above.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6259966780 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6472#issuecomment-6259966780). Originally posted by [SoRadGaming](https://github.com/SoRadGaming) on 2026-10-19T04:54:43Z. --- ### ASTRO BOT no longer boots on a 32 GiB host after this change Windows 11, Ryzen 7 5800X3D, 32 GiB RAM, RX 9070 XT (16 GiB, Adrenalin 26.8.1). The driver's host heap is 16,345.5 MiB. ASTRO BOT (PPSA21564), on main 676d42396 plus the open PRs #6188 #6273 #6292 #6503 #6566 #6609 #6615 #6617 and some local experiments, none of which change the import budget. The budget used to be the heap less 2 GiB, 14,297 MiB here; it is now half the heap, 8,172 MiB. During the boot, the title's large registered ranges then stop fitting: ``` [gpu] host import budget: 8125 MiB live of 8172 MiB (APS5_HOST_IMPORT_MIB); 5 imports (9858 MiB) refused so far, last 0x33d024000+0x3c7dc000 FATAL: an address-based build copies 966 MiB of 1 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x33d19c000+0x3c664000 (966.4 MiB committed, outside the write-watched arena) ``` The refused range falls back to a copy, and `AddressCopyOverflow` makes that fatal, so the game aborts during the boot (here an empty-shader-cache boot, about 9 minutes in and before its first frame; I have not tried a warm-cache boot with the new budget). With `APS5_HOST_IMPORT_MIB=14297` (the old budget), the same build boots without the abort and reaches the Crash Site hub, as it did before this merged. So on hosts where half the heap is well above the 2 GiB floor, the reservation costs titles with large imports more than the 16 GiB case needed. A few options, in case they help: - cap the reservation (for example the 2 GiB floor plus a fixed share, not half the heap); - reserve half only when the heap is small; - or let a refused import that would exceed `APS5_ADDRESS_COPY_MAX_MIB` retry after the budget is trimmed instead of aborting. Happy to test a change on this machine. Written with AI assistance (Claude); measured on the machine above.
Sevthered commented 2026-10-19 14:40:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Sevthered on 2026-10-19T14:40:35Z.


A data point from a 32 GB machine where the new budget is too small for a title: ASTRO BOT PPSA21567 v01.019.000 on main 5eba12d6b, Windows 11, Ryzen 7 5800X, 32 GB, RTX 3080 Ti, NVIDIA 616.56, WinLibs GCC 15.2.0 r7. The copy is my own, from a repack folder. Relinked with that commit's relinker, libraries from the same commit, no switches, no input, 160 s from start.

With this PR the budget here is 8172 MiB, which puts the host heap at about 16.0 GiB. The title imports 2172 MiB at 0x500000000, 4608 MiB at 0x10ca000000, 1434 MiB at 0x324618000 and 3232 MiB at 0x1000000000 before its first frame (17 s in), and not enough of that is evictable yet, so the refusals start at the third one (lines from run r-M1):

[gpu] host import budget: 7737 MiB live of 8172 MiB (APS5_HOST_IMPORT_MIB); 1 imports (1433 MiB) refused so far, last 0x324618000+0x599e8000
[gpu] host import budget: 8022 MiB live of 8172 MiB (APS5_HOST_IMPORT_MIB); 5 imports (10227 MiB) refused so far, last 0x3360d8000+0x47f28000
[gpu] host import budget: 8025 MiB live of 8172 MiB (APS5_HOST_IMPORT_MIB); 19 imports (40891 MiB) refused so far, last 0x336424000+0x47bdc000

That is 3 of 3 runs on main (19 and 17 refusals by 160 s in two of them, 5 by the abort in the third). In that third run, the one with a cold shader cache, an address-based build then hit the refused range and the title aborted at 146 s, 54 s after its first frame and still in the PlayStation logo sequence:

FATAL: an address-based build copies 1148 MiB of 1 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x3363ac000+0x47c54000 (1148.3 MiB committed, outside the write-watched arena)
FATAL: abort() (SIGABRT) on thread 10284

With #6499 reverted on top of the same main (a local build, since #6499 merged four hours after this PR) the same abort is 2 of 2: the frames stop at 33 s, 16 s after the first frame and still in the logo, and the process exits at 50 s. So between the two merges the title did not get past the logos on this machine. With APS5_HOST_IMPORT_MIB=14336, about the 14 GiB the old formula gave on 32 GB, there is no refusal and no abort in 7 runs (5 on main, 2 on the reverted build), and every run reaches the title screen; live imports peak at 12.4 GiB. On main 82f0c9aec of 2026-10-17 the same runs never printed a budget line.

So on 32 GB the half-heap reserve takes the budget from 14 GiB to 8 GiB, and this title holds about 12.4 GiB of imports live at its title screen. Is the reserve meant to keep growing with the heap, or should it stop near the 4 GiB the 16 GB machine in this PR needed? A reserve capped there would give about 12 GiB here, which is marginal for this title, so maybe the answer is elsewhere; I can run whatever formula you have in mind on this machine.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6269899202 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6472#issuecomment-6269899202). Originally posted by [Sevthered](https://github.com/Sevthered) on 2026-10-19T14:40:35Z. --- A data point from a 32 GB machine where the new budget is too small for a title: ASTRO BOT PPSA21567 v01.019.000 on `main` `5eba12d6b`, Windows 11, Ryzen 7 5800X, 32 GB, RTX 3080 Ti, NVIDIA 616.56, WinLibs GCC 15.2.0 r7. The copy is my own, from a repack folder. Relinked with that commit's relinker, libraries from the same commit, no switches, no input, 160 s from start. With this PR the budget here is 8172 MiB, which puts the host heap at about 16.0 GiB. The title imports 2172 MiB at `0x500000000`, 4608 MiB at `0x10ca000000`, 1434 MiB at `0x324618000` and 3232 MiB at `0x1000000000` before its first frame (17 s in), and not enough of that is evictable yet, so the refusals start at the third one (lines from run `r-M1`): ``` [gpu] host import budget: 7737 MiB live of 8172 MiB (APS5_HOST_IMPORT_MIB); 1 imports (1433 MiB) refused so far, last 0x324618000+0x599e8000 [gpu] host import budget: 8022 MiB live of 8172 MiB (APS5_HOST_IMPORT_MIB); 5 imports (10227 MiB) refused so far, last 0x3360d8000+0x47f28000 [gpu] host import budget: 8025 MiB live of 8172 MiB (APS5_HOST_IMPORT_MIB); 19 imports (40891 MiB) refused so far, last 0x336424000+0x47bdc000 ``` That is 3 of 3 runs on `main` (19 and 17 refusals by 160 s in two of them, 5 by the abort in the third). In that third run, the one with a cold shader cache, an address-based build then hit the refused range and the title aborted at 146 s, 54 s after its first frame and still in the PlayStation logo sequence: ``` FATAL: an address-based build copies 1148 MiB of 1 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x3363ac000+0x47c54000 (1148.3 MiB committed, outside the write-watched arena) FATAL: abort() (SIGABRT) on thread 10284 ``` With #6499 reverted on top of the same `main` (a local build, since #6499 merged four hours after this PR) the same abort is 2 of 2: the frames stop at 33 s, 16 s after the first frame and still in the logo, and the process exits at 50 s. So between the two merges the title did not get past the logos on this machine. With `APS5_HOST_IMPORT_MIB=14336`, about the 14 GiB the old formula gave on 32 GB, there is no refusal and no abort in 7 runs (5 on `main`, 2 on the reverted build), and every run reaches the title screen; live imports peak at 12.4 GiB. On `main` `82f0c9aec` of 2026-10-17 the same runs never printed a budget line. So on 32 GB the half-heap reserve takes the budget from 14 GiB to 8 GiB, and this title holds about 12.4 GiB of imports live at its title screen. Is the reserve meant to keep growing with the heap, or should it stop near the 4 GiB the 16 GB machine in this PR needed? A reserve capped there would give about 12 GiB here, which is marginal for this title, so maybe the answer is elsewhere; I can run whatever formula you have in mind on this machine. 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!6472
No description provided.