chore(agc): report heap budgets on buffer allocation failure #7119

Merged
MarcZX10 merged 3 commits from upstream-pr/7119 into main 2026-10-19 18:10:01 +00:00
MarcZX10 commented 2026-10-17 12:17:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T12:17:31Z.


What

Append VK_EXT_memory_budget usage and budget for every physical-device heap to failed AGC buffer allocations when the extension query is available. Keep allocation and retry policy unchanged; omit heap details when the extension is unavailable.

Tested

  • Linux: BufferPool.cpp and tests/BufferPool.cpp passed c++ -std=c++20 -fsyntax-only with the repository include paths.
  • The hosted agc_buffer_pool check exposed incorrect query-count assertions: allocation type selection queries the enabled budget extension, and a failed allocation then queries it again for diagnostics. The test now expects both calls and resets its counter before checking the missing-extension path.
  • Independent Linux validation from jotitadev on head d9ccae5fd: agc_buffer_pool, agc_buffer_pool_small_device_shared and agc_buffer_pool_small_device_no_staging all passed, three runs each. The full ^agc selection passed 649/649 on both an RTX 3070 and lavapipe. With BufferPool.hpp and BufferPool.cpp from main, the new diagnostic assertions failed as expected. These tests use mocked Vulkan functions; a real allocation failure and Windows were not tested.
  • python3 tools/check_conventions.py --base upstream/main: passed.
  • python3 tools/pr_overlap.py --branch codex/agc-allocation-heap-budget: no overlap with open pull requests.
  • git diff --check: passed.
  • Local Linux Release configuration succeeded after initializing pinned submodules. The agc_buffer_pool_tests build stopped before reaching the changed test at the unrelated GCC parse error in core/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp:183; no local runtime result is claimed.

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
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none; related to #7047
  • Unblocks: none
  • GPUs tested: n/a (the reported AGC test matrix uses mocked Vulkan functions; no real GPU behavior is claimed)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4899978530 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T12:17:31Z. --- ### What Append `VK_EXT_memory_budget` usage and budget for every physical-device heap to failed AGC buffer allocations when the extension query is available. Keep allocation and retry policy unchanged; omit heap details when the extension is unavailable. ### Tested - Linux: `BufferPool.cpp` and `tests/BufferPool.cpp` passed `c++ -std=c++20 -fsyntax-only` with the repository include paths. - The hosted `agc_buffer_pool` check exposed incorrect query-count assertions: allocation type selection queries the enabled budget extension, and a failed allocation then queries it again for diagnostics. The test now expects both calls and resets its counter before checking the missing-extension path. - Independent Linux validation from jotitadev on head `d9ccae5fd`: `agc_buffer_pool`, `agc_buffer_pool_small_device_shared` and `agc_buffer_pool_small_device_no_staging` all passed, three runs each. The full `^agc` selection passed 649/649 on both an RTX 3070 and lavapipe. With `BufferPool.hpp` and `BufferPool.cpp` from `main`, the new diagnostic assertions failed as expected. These tests use mocked Vulkan functions; a real allocation failure and Windows were not tested. - `python3 tools/check_conventions.py --base upstream/main`: passed. - `python3 tools/pr_overlap.py --branch codex/agc-allocation-heap-budget`: no overlap with open pull requests. - `git diff --check`: passed. - Local Linux Release configuration succeeded after initializing pinned submodules. The `agc_buffer_pool_tests` build stopped before reaching the changed test at the unrelated GCC parse error in `core/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp:183`; no local runtime result is claimed. ### 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 - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none; related to #7047 - [x] Unblocks: none - [x] GPUs tested: n/a (the reported AGC test matrix uses mocked Vulkan functions; no real GPU behavior is claimed) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-17 12:42:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T12:42:51Z.


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 4472 core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp
PR 7800 core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234012737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6234012737). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T12:42:51Z. --- <!-- pr-overlap --> 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 4472](https://www.github.com/boykopovar/AnyPS5/pull/4472) | `core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp` |
oneandonlydean commented 2026-10-17 12:55:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T12:55:31Z.


Full CI on 4b770187f (run 39032496156) fails agc_buffer_pool on both Linux and Windows. The same two checks from this PR's test fail on each:

FAIL: allocation failure did not query the memory budget exactly once
FAIL: missing-extension fallback attempted a memory budget query

agc_buffer_pool passes on main (c9e6c45de). So the budget query either runs a different number of times than the test expects on the failure path, or it still runs when the extension is missing. Could you take a look? We'll rerun full CI on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234133857 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6234133857). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T12:55:31Z. --- Full CI on 4b770187f (run 39032496156) fails `agc_buffer_pool` on both Linux and Windows. The same two checks from this PR's test fail on each: ``` FAIL: allocation failure did not query the memory budget exactly once FAIL: missing-extension fallback attempted a memory budget query ``` `agc_buffer_pool` passes on main (c9e6c45de). So the budget query either runs a different number of times than the test expects on the failure path, or it still runs when the extension is missing. Could you take a look? We'll rerun full CI on the new head.
MarcZX10 commented 2026-10-17 13:05:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T13:05:06Z.


Thanks for the failure report. I traced the counts: when the extension is enabled, Context::DeviceMemoryType queries the heap budget during memory-type selection, then BufferPool::AllocateMemory queries it again only when reporting the failed allocation. The regression expected one total call instead of two. The fallback assertion also carried the first case’s counter into the second case. I corrected both in commit d9ccae5fd and updated the Tested section; the new hosted run is pending. Local Release configuration succeeded, but the focused build is blocked before this test by an unrelated GCC parse error in SrtDescriptorEvaluation.cpp:183, so I do not claim a local test pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234222038 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6234222038). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T13:05:06Z. --- Thanks for the failure report. I traced the counts: when the extension is enabled, `Context::DeviceMemoryType` queries the heap budget during memory-type selection, then `BufferPool::AllocateMemory` queries it again only when reporting the failed allocation. The regression expected one total call instead of two. The fallback assertion also carried the first case’s counter into the second case. I corrected both in commit `d9ccae5fd` and updated the Tested section; the new hosted run is pending. Local Release configuration succeeded, but the focused build is blocked before this test by an unrelated GCC parse error in `SrtDescriptorEvaluation.cpp:183`, so I do not claim a local test pass.
MarcZX10 commented 2026-10-17 13:07:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T13:07:47Z.


Follow-up: on Linux, the updated tests/BufferPool.cpp and production Graphics/src/BufferPool.cpp translation units both compile with the repository C++20 command. The full agc_buffer_pool_tests target cannot link locally because the unrelated SrtDescriptorEvaluation.cpp:183 GCC parse error stops the driver build. The automatic checks on d9ccae5fd passed conventions/eligibility/report, but skipped Linux and Windows tests. I tried the documented manual Build workflow with the focused changed-test selection; GitHub rejected dispatch with HTTP 403 (Must have admin rights to Repository). Could a maintainer dispatch it on this head to verify agc_buffer_pool?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234247591 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6234247591). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T13:07:47Z. --- Follow-up: on Linux, the updated `tests/BufferPool.cpp` and production `Graphics/src/BufferPool.cpp` translation units both compile with the repository C++20 command. The full `agc_buffer_pool_tests` target cannot link locally because the unrelated `SrtDescriptorEvaluation.cpp:183` GCC parse error stops the driver build. The automatic checks on `d9ccae5fd` passed conventions/eligibility/report, but skipped Linux and Windows tests. I tried the documented manual Build workflow with the focused changed-test selection; GitHub rejected dispatch with HTTP 403 (`Must have admin rights to Repository`). Could a maintainer dispatch it on this head to verify `agc_buffer_pool`?
MarcZX10 commented 2026-10-17 13:43:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T13:43:04Z.


I tried a focused local build of the PR test target at head d9ccae5fdd346bcb3031247e120c2020fee15a8a, but the build stops earlier in SrtDescriptorEvaluation.cpp:183: GCC requires the dependent call to be written read.read->template Flags<MemoryFlags>(). That is outside this PR and prevents me from reproducing agc_buffer_pool locally at this head. I have not changed the branch or inferred which budget-query assertion is wrong from the hosted failure alone; the two CI failures remain actionable and need a corrected test expectation or implementation before the PR is ready.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234593518 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6234593518). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T13:43:04Z. --- I tried a focused local build of the PR test target at head `d9ccae5fdd346bcb3031247e120c2020fee15a8a`, but the build stops earlier in `SrtDescriptorEvaluation.cpp:183`: GCC requires the dependent call to be written `read.read->template Flags<MemoryFlags>()`. That is outside this PR and prevents me from reproducing `agc_buffer_pool` locally at this head. I have not changed the branch or inferred which budget-query assertion is wrong from the hosted failure alone; the two CI failures remain actionable and need a corrected test expectation or implementation before the PR is ready.
MarcZX10 commented 2026-10-17 13:50:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T13:50:40Z.


Local validation update at the exact head d9ccae5fdd346bcb3031247e120c2020fee15a8a: the agc_driver_tests target now builds successfully on Linux after applying the unrelated dependent-template keyword fix only in the temporary review worktree; that file was restored afterward and the worktree is clean. Running agc_driver_tests --buffer-pool-only then stops before test selection because this host CPU lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA. So the target compilation is confirmed locally, but this machine cannot provide a runtime result for the buffer-pool test. The new hosted run remains needed for runtime confirmation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234675315 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6234675315). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T13:50:40Z. --- Local validation update at the exact head `d9ccae5fdd346bcb3031247e120c2020fee15a8a`: the `agc_driver_tests` target now builds successfully on Linux after applying the unrelated dependent-template keyword fix only in the temporary review worktree; that file was restored afterward and the worktree is clean. Running `agc_driver_tests --buffer-pool-only` then stops before test selection because this host CPU lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA. So the target compilation is confirmed locally, but this machine cannot provide a runtime result for the buffer-pool test. The new hosted run remains needed for runtime confirmation.
jotitadev commented 2026-10-17 15:09:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-17T15:09:14Z.

Review: COMMENTED


@MarcZX100 here is the runtime result you could not get locally. The Linux and Windows CI jobs were also skipped on d9ccae5fd.

Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head d9ccae5fd merged onto main 47a266cf9 (clean). The full tree builds with GCC 15.2, including SrtDescriptorEvaluation.cpp.

Run Result
agc_buffer_pool, agc_buffer_pool_small_device_shared, agc_buffer_pool_small_device_no_staging all pass, 3 runs
same, with BufferPool.hpp and BufferPool.cpp from main agc_buffer_pool fails: allocation failure omitted the first heap's memory budget, ... a later heap's memory budget, ... did not query the memory budget for both type selection and its diagnostic
^agc (649 tests) on the RTX 3070 and on lavapipe 649/649 on both, same as main

So the two checks @oneandonlydean reported on 4b770187f pass on this head, and the new checks fail without the change. The missing-extension case passes in both runs, as expected, because main never queries the budget there.

These tests use the mocked Vulkan functions. ANYPS5_GPU (RTX 3070 or lavapipe) does not change the result.

Not run: Windows, a real allocation failure on a device.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5558396334 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#pullrequestreview-5558396334). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-17T15:09:14Z. **Review:** COMMENTED --- @MarcZX100 here is the runtime result you could not get locally. The Linux and Windows CI jobs were also skipped on `d9ccae5fd`. **Machine:** Ubuntu 26.04, i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. Head `d9ccae5fd` merged onto `main` `47a266cf9` (clean). The full tree builds with GCC 15.2, including `SrtDescriptorEvaluation.cpp`. | Run | Result | |---|---| | `agc_buffer_pool`, `agc_buffer_pool_small_device_shared`, `agc_buffer_pool_small_device_no_staging` | all pass, 3 runs | | same, with `BufferPool.hpp` and `BufferPool.cpp` from `main` | `agc_buffer_pool` fails: `allocation failure omitted the first heap's memory budget`, `... a later heap's memory budget`, `... did not query the memory budget for both type selection and its diagnostic` | | `^agc` (649 tests) on the RTX 3070 and on lavapipe | 649/649 on both, same as `main` | So the two checks @oneandonlydean reported on `4b770187f` pass on this head, and the new checks fail without the change. The missing-extension case passes in both runs, as expected, because `main` never queries the budget there. These tests use the mocked Vulkan functions. `ANYPS5_GPU` (RTX 3070 or lavapipe) does not change the result. Not run: Windows, a real allocation failure on a device. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-17 15:15:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T15:15:53Z.


Thanks for running the native test matrix. Your result confirms the two original assertions pass on d9ccae5fd, the new allocation-failure diagnostics are covered by the mocked Vulkan tests, and all 649 AGC tests pass on both the RTX 3070 and lavapipe. I’ve added your exact Linux validation to the PR description; Windows and a real device allocation failure remain untested.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235585791 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6235585791). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T15:15:53Z. --- Thanks for running the native test matrix. Your result confirms the two original assertions pass on `d9ccae5fd`, the new allocation-failure diagnostics are covered by the mocked Vulkan tests, and all 649 AGC tests pass on both the RTX 3070 and lavapipe. I’ve added your exact Linux validation to the PR description; Windows and a real device allocation failure remain untested.
MarcZX10 commented 2026-10-18 01:13:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T01:13:39Z.


Rebased the PR onto current upstream main at 5229b5b82; the updated head is dd81b1129. The rebase preserves the heap-budget diagnostic and corrected query-count assertions. check_conventions.py and git diff --check pass. A local Linux Release build of agc_driver_tests succeeds when the unrelated dependent-template parse fix in SrtDescriptorEvaluation.cpp is applied only in the temporary review worktree and then restored; the focused tests cannot run on this Xeon E5-1620 v2 host because the executable exits at its CPU feature guard (LZCNT/BMI1/BMI2/MOVBE/AVX2/FMA). Current GitHub conventions, eligibility and report checks pass; the Linux/Windows and relinker jobs are skipped for this pull request. I manually checked the overlap warnings from #4472/#5987/#6553: those change buffer pooling or host-memory fallback policy, while this PR only adds heap diagnostics after allocation failure, so the behavior does not overlap.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244103144 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6244103144). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T01:13:39Z. --- Rebased the PR onto current upstream main at `5229b5b82`; the updated head is `dd81b1129`. The rebase preserves the heap-budget diagnostic and corrected query-count assertions. `check_conventions.py` and `git diff --check` pass. A local Linux Release build of `agc_driver_tests` succeeds when the unrelated dependent-template parse fix in `SrtDescriptorEvaluation.cpp` is applied only in the temporary review worktree and then restored; the focused tests cannot run on this Xeon E5-1620 v2 host because the executable exits at its CPU feature guard (LZCNT/BMI1/BMI2/MOVBE/AVX2/FMA). Current GitHub conventions, eligibility and report checks pass; the Linux/Windows and relinker jobs are skipped for this pull request. I manually checked the overlap warnings from #4472/#5987/#6553: those change buffer pooling or host-memory fallback policy, while this PR only adds heap diagnostics after allocation failure, so the behavior does not overlap.
MarcZX10 commented 2026-10-18 05:37:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T05:37:41Z.


Thanks for running the focused tests and full AGC suite on d9ccae5fd; that independently validates the allocation diagnostic and its negative control. I also tried the three focused tests at current head dd81b1129 on Linux, but each process aborted at the host CPU feature guard before assertions (this Xeon E5-1620 v2 lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA). The current head adds the follow-up test commit, so a focused rerun there on a supported host would close that small validation gap if convenient.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6246170265 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6246170265). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T05:37:41Z. --- Thanks for running the focused tests and full AGC suite on `d9ccae5fd`; that independently validates the allocation diagnostic and its negative control. I also tried the three focused tests at current head `dd81b1129` on Linux, but each process aborted at the host CPU feature guard before assertions (this Xeon E5-1620 v2 lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA). The current head adds the follow-up test commit, so a focused rerun there on a supported host would close that small validation gap if convenient.
LeandroLP23 commented 2026-10-18 17:10:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T17:10:47Z.


Windows run: agc_buffer_pool fails with this PR, on main 6efb7261b with only this PR (dd81b1129) merged, 3 runs of 3. On the same main without it, it passes. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON.

FAIL: allocation failure did not query the memory budget for both type selection and its diagnostic

With a local print, since removed, diagnosticBudgetQueries is 3 at that check, not 2. main has not changed BufferPool.cpp, BufferPool.hpp or any memoryProperties2 caller since this branch's base 5229b5b82, so this does not look like drift. One candidate for the third query is BufferPool::deviceBudget (BufferPool.cpp:229), which queries the budget whenever DeviceTierEnabled(), the default without APS5_STAGING_POOL_MIB. I could not confirm it with APS5_STAGING_POOL_MIB=0: the suite then stops earlier, at the device buffer size class check. The test mocks every Vulkan call, so the GPU should not matter. I have not run it on Linux to compare.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252730898 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6252730898). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T17:10:47Z. --- Windows run: `agc_buffer_pool` fails with this PR, on `main` `6efb7261b` with only this PR (`dd81b1129`) merged, 3 runs of 3. On the same `main` without it, it passes. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. ``` FAIL: allocation failure did not query the memory budget for both type selection and its diagnostic ``` With a local print, since removed, `diagnosticBudgetQueries` is 3 at that check, not 2. `main` has not changed `BufferPool.cpp`, `BufferPool.hpp` or any `memoryProperties2` caller since this branch's base `5229b5b82`, so this does not look like drift. One candidate for the third query is `BufferPool::deviceBudget` (`BufferPool.cpp:229`), which queries the budget whenever `DeviceTierEnabled()`, the default without `APS5_STAGING_POOL_MIB`. I could not confirm it with `APS5_STAGING_POOL_MIB=0`: the suite then stops earlier, at the device buffer size class check. The test mocks every Vulkan call, so the GPU should not matter. I have not run it on Linux to compare. AI-assisted
MarcZX10 commented 2026-10-18 17:20:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T17:20:44Z.


Thanks for tracing the extra call. The pool constructor does query the budget once to size its device tier, which made the test count include setup. In e6fb74fd7 the test explicitly initializes and stores the mock BufferPool before taking its allocation-path count, then asserts exactly two calls for DeviceMemoryType and the allocation-failure diagnostic. The changed test translation unit compiles, and conventions pass. I could not run the focused executable here: it exits at startup because this Xeon E5-1620 v2 lacks the AVX2/LZCNT/BMI/MOVBE/FMA features required by the project. Please rerun the Windows/Linux focused check on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252835067 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6252835067). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T17:20:44Z. --- Thanks for tracing the extra call. The pool constructor does query the budget once to size its device tier, which made the test count include setup. In e6fb74fd7 the test explicitly initializes and stores the mock BufferPool before taking its allocation-path count, then asserts exactly two calls for DeviceMemoryType and the allocation-failure diagnostic. The changed test translation unit compiles, and conventions pass. I could not run the focused executable here: it exits at startup because this Xeon E5-1620 v2 lacks the AVX2/LZCNT/BMI/MOVBE/FMA features required by the project. Please rerun the Windows/Linux focused check on this head.
LeandroLP23 commented 2026-10-18 17:27:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T17:27:19Z.


Rechecked e6fb74fd7 on the same Windows machine (Radeon 860M, Windows 11 26300, WinLibs GCC 15.2.0 r7, Release), merged alone onto main 6efb7261b. agc_buffer_pool, agc_buffer_pool_small_device_no_staging and agc_buffer_pool_small_device_shared now pass, 3 runs of 3.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252906595 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6252906595). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T17:27:19Z. --- Rechecked `e6fb74fd7` on the same Windows machine (Radeon 860M, Windows 11 26300, WinLibs GCC 15.2.0 r7, Release), merged alone onto `main` `6efb7261b`. `agc_buffer_pool`, `agc_buffer_pool_small_device_no_staging` and `agc_buffer_pool_small_device_shared` now pass, 3 runs of 3. AI-assisted
MarcZX10 commented 2026-10-18 22:09:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T22:09:28Z.


Thanks for rerunning the updated head on Windows. The three buffer-pool tests passing 3/3 each complements the Linux run, where the new checks fail with the production files reverted and the 649-test AGC suite matches main. The Linux/Windows focused behavior is now covered; real allocation failure on a device remains untested.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6255761325 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6255761325). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T22:09:28Z. --- Thanks for rerunning the updated head on Windows. The three buffer-pool tests passing 3/3 each complements the Linux run, where the new checks fail with the production files reverted and the 649-test AGC suite matches main. The Linux/Windows focused behavior is now covered; real allocation failure on a device remains untested.
fdfawef324 commented 2026-10-18 23:16:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-18T23:16:01Z.


I am updating #6553 after #5987 merged, retaining only the host-room placement guard and its tests while preserving main's allocation/refusal/reclaim routing. This PR's allocation-failure diagnostics are a separate topic.

Both branches already conflict with newer main in the buffer-pool test area. Proposed landing order: #6553 first, then preserve its budget and allocation-attempt assertions alongside this PR's failure diagnostics. No combined build is claimed; if this PR should land first, I can rebase the guard afterward and rerun that composition.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256388868 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6256388868). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-18T23:16:01Z. --- I am updating #6553 after #5987 merged, retaining only the host-room placement guard and its tests while preserving main's allocation/refusal/reclaim routing. This PR's allocation-failure diagnostics are a separate topic. Both branches already conflict with newer main in the buffer-pool test area. Proposed landing order: #6553 first, then preserve its budget and allocation-attempt assertions alongside this PR's failure diagnostics. No combined build is claimed; if this PR should land first, I can rebase the guard afterward and rerun that composition. AI-assisted: yes
MarcZX10 commented 2026-10-19 16:52:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T16:52:24Z.


Thanks for clarifying the proposed landing order. I agree that #6553 should land first, then this PR should retain its allocation-failure diagnostics together with the guard’s budget and allocation-attempt assertions. Since no combined build has been run, I’ll keep the composition unverified until that combined validation is available.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6272479878 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6272479878). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T16:52:24Z. --- Thanks for clarifying the proposed landing order. I agree that #6553 should land first, then this PR should retain its allocation-failure diagnostics together with the guard’s budget and allocation-attempt assertions. Since no combined build has been run, I’ll keep the composition unverified until that combined validation is available.
adriadam10 commented 2026-10-19 18:10:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T18:10:52Z.


Checked the heap-budget diagnostic against main: the production code merges cleanly and the only conflict was adjacent blocks in tests/BufferPool.cpp. Rebased onto current main keeping both, full build and ctest 805/805 green (agc_buffer_pool* included), consistent with the Linux (jotitadev) and Windows (LeandroLP23) runs; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273995361 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7119#issuecomment-6273995361). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T18:10:52Z. --- Checked the heap-budget diagnostic against `main`: the production code merges cleanly and the only conflict was adjacent blocks in `tests/BufferPool.cpp`. Rebased onto current `main` keeping both, full build and ctest 805/805 green (`agc_buffer_pool*` included), consistent with the Linux (jotitadev) and Windows (LeandroLP23) runs; merged.
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!7119
No description provided.