fix(agc): identify cached storage budgets in sampled reports #14891
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14891"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hamb3r on 2026-11-01T23:08:14Z.
What
The sampled-cache report reads a fresh Vulkan memory budget but may reuse a storage-cache limit calculated up to one refresh interval earlier. With a reported budget changing from 8 GiB to 2 GiB, the active storage limit can still be 4 GiB while a fresh calculation would select 1 GiB. The old message did not identify that difference in time.
Label the storage limit as active and append the machine-readable
storage_limit_age_msfield. Record its calculation time separately from the existing refresh timer, and copy the optional timestamp under the same mutex as the returned limit. Ordinary callers retain the scalar return value; only the report requests the timestamp. Formatting stays inside the existing report gate. If no calculated timestamp is available, the field saysunavailable.Example:
active storage image cache budget 4096 MiB; storage_limit_age_ms=25.The regression test changes the reported budget from 8 GiB to 2 GiB, checks the active 4 GiB limit and its age annotation, verifies exactly one fresh sampled query and no reporting-induced storage refresh, then checks the storage limit becomes 1 GiB after its own interval. Its CTest failure guard rejects failed assertions even when a report matches.
Same-author landing order: #14891 first, then #14219. Its snapshot refactor is rebased on this exact head and declares
Depends on: #14891. #14220 atd2cad1510164merges cleanly with this branch. #6194 still conflicts with main itself; integration and author coordination remain tracked in the existing discussion.pr_overlap.pyreturned exit 2: after moving the new test registration and dispatch away from unrelated additions, the only reported comparable overlap was #14219, now resolved by that declared dependency and rebase. Another 23 heads conflict with the comparison base and could not be compared automatically; their shared-file patches were inspected for this budget/report scope. This is not combined runtime validation.Tested
Windows 10 Pro 10.0.19045, AMD Ryzen 7 7700, NVIDIA GeForce RTX 3080, NVIDIA 617.14, Vulkan validation layer 1.4.350.0, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON, CCACHE_DISABLE=1.
f03f72490132ed55d81c664b570d0bd26bc96694.55940bd5c49d44adf0bf1ede28901bed627ee403.agc_driver_sampled_cache_budget_tests,agc_driver_graphics_testsandagc_buffer_pool_testson both.Same machine/GPU and environment for both runs:
Main passes the same 7/7 existing cases; the PR passes 8/8 including the new report-age case. Both logs confirm the validation layer was inserted, contain no missing-layer warning and have zero VUID validation errors. No cases skipped.
The new test executable also runs against the unmodified main driver: numeric assertions pass, but CTest returns exit 8 because the age annotation is absent. A deliberately wrong assertion after a matching annotated report is rejected with exit 8; restoring it passes.
Conventions and
git diff --checkpass. Games, FPS, full test suites, Linux and macOS were not tested; this PR makes no performance claim.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T01:45:50Z.
Review: APPROVED
Windows 11, WinLibs GCC 15.2.0 r7, Release, AMD Radeon RX 9070 XT (driver 32.0.32015.7029), Vulkan SDK 1.4.363 validation layer. Head
55940bd5c4merged into upstream/main93dbd0f82a.ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -R '^agc_driver_sampled_cache_budget':ShaderResources.cppagc_driver_sampled_cache_budget..._memory..._without_storage_image_multisample..._report_age(new)active storage image cache budget 4096 MiB.*storage_limit_age_ms=[1-9][0-9]*not foundNeither log has the missing-layer message or any
VUID-ID. Nothing intools/ordocs/parses the[gpu] sampled texture cache budgetline, so renaming the field to "active storage image cache budget" breaks no consumer.