refactor(agc): share storage budget snapshots with memory reports #14219
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14219"
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-01T00:29:42Z.
What
Follow up #10194 by calculating the storage-cache decision and its diagnostic fields together.
CalculateStorageTextureBudgetreturns the chosen heap, sampled/cached inputs, reservation, available bytes, ceiling andselectedBudget. The existing scalar functions consume that calculation, andMemoryAccounting::Reportformats its snapshot. Budget formulas, fallback behavior, cache policy and report keys remain unchanged.The final snapshot, including any re-read after idle reclaim, is captured under the budget-cache mutex. The active limit and its optional calculation timestamp are copied before releasing that mutex. Ledger snapshotting and report output then run outside it.
CTest ignores the process exit code when
PASS_REGULAR_EXPRESSIONis set, so a failedExpectcan still pass when the report line matches (CTest documentation). Existing cap/floor tests rejectFAIL:explicitly; the snapshot test checks pressure, unavailable/zero Vulkan budget information and the 512 MiB floor, with its own failure guard.Depends on #14891: it adds the age annotation to the sampled-cache report while retaining the scalar storage-budget API. This branch is rebased on its exact head, preserving the timestamp copy inside the cache mutex. #14220 at
d2cad1510164merges cleanly. #6194 still conflicts with main itself and must preserve its final adjusted budget when integrated; coordination remains in the existing discussion.Tested
Windows 10 Pro 10.0.19045, AMD Ryzen 7 7700, NVIDIA GeForce RTX 3080, NVIDIA 617.14, validation layer 1.4.350.0, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON, CCACHE_DISABLE=1.
f03f72490132ed55d81c664b570d0bd26bc96694.55940bd5c49d44adf0bf1ede28901bed627ee403.e0ace57ec2263c62a3d8e9adbde6d68ec7c795a6.agc_driver_sampled_cache_budget_tests,agc_driver_graphics_testsandagc_buffer_pool_testsfor all three states.Same machine/GPU and environment for every run:
Main passes the same 7/7 existing cases, the dependency passes 8/8 including report age, and this PR passes 9/9 including the snapshot case. Validation-layer insertion is confirmed in all comparison logs; none has a missing-layer warning or VUID validation errors. No cases skipped.
Mutation controls: deliberately incorrect cap and snapshot assertions are both rejected with CTest exit 8 even though their numeric reports still match. Restoring the assertions passes both cases.
Conventions and
git diff --checkpass. Full builds/test suites, Linux/macOS, games and FPS were not tested.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 MarcZX10 on 2026-11-01T01:19:04Z.
Review: DISMISSED
Reviewed — changes requested
The PR conflicts with both #6194 and #14220, and its description says the landing order with #6194 has not been agreed.
What I ran
Reviewed head
7d9f2a1f03367de6f92f9ecfba36f8b52b9a0970against PR base1ffd2b81f5960e51bef0d539891e2528eafff642on Debian 12 x86_64, Python 3.11.2 and GCC 12.2.0. The preview onto currentmainc763ea56aae3bb60cd6e22064a6a21482a58a980merged cleanly. Pairwise previews against #6194 and #14220 conflicted. I did not build locally.Results
0ed87fc8de56eb065b2c723e5cc6ea6c5e994a4a.ShaderResources.hpp,ShaderResources.cpp, anddocs/dev/debt/libSceAgcDriver.md.Selected unedited output
Negative control
FAIL:guard rejects it.Findings
Blocking
The PR names #6194 as an open change to the same storage-budget policy, and the pairwise preview confirms content conflicts with it. The preview against #14220 also conflicts because that PR changes the storage-cache policy and shared debt entry. The repository requires overlapping PR authors to agree which lands first and declare the order in
Depends on; this PR says no order is agreed and its checklist currently declares no dependency. Please coordinate a landing sequence with the authors of #6194 and #14220, then update the relevant checklist lines before this stack proceeds.Non-blocking
The current-main preview is clean. The hosted Windows job passed; no Linux product job ran. The PR describes its RTX 3080 validation-layer run and paired baseline tests in detail, but I did not independently reproduce them.
Sources
Not verified
No local build, CTest, or GPU/validation-layer run. The author-reported RTX 3080 results and negative control were not independently reproduced; hosted Linux product tests were skipped.
To get this to a good state
Agree with the authors of #6194 and #14220 on the landing sequence and record it in the affected
Depends onchecklist lines. I will rerun the pairwise previews against the updated heads.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T01:56:16Z.
Review: DISMISSED
Re-checked — new head, changes requested
The updated head now merges cleanly with #14220, but the proposed #14219-before-#6194 order is still unagreed and the exact heads still conflict.
What I ran
Reviewed #14219 head
f997c0e0072b2c36e41355203e7d97d0ce3e7ada; its recorded PR base is5f438847c5064961808425ce0465ed8675474dde, and currentmainisf485df1f8c660bbabc495dd34415f8d6e982ea24. The current-main preview is clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0.Results
f485df1f8c660bbabc495dd34415f8d6e982ea24ShaderResources.hpp,ShaderResources.cpp, anddocs/dev/debt/libSceAgcDriver.mdUnedited command output
Negative control
Findings
Blocking
The proposed landing order is #14219 before #6194, but the exact current heads still conflict in three shared files and the author says agreement is pending. The repository overlap rule requires agreement on order and that it be declared with
Depends on. Please confirm the order with #6194's author; then record the dependency on the PR that lands second and rebase/resolve the conflict.Non-blocking
The current #14219 and #14220 heads merge cleanly together. The PR's summary and test-guard changes are otherwise reflected in the updated description; their runtime evidence remains author-reported.
Sources
mainNot verified
No local build, CTest, GPU run, or independent reproduction of the author's mutation check. The Windows and test results above are hosted or author-reported; Linux and specialized hosted jobs were skipped.
To get this to a good state
Confirm the landing sequence with #6194's author, update the dependent PR's
Depends online, and resolve the remaining exact-head conflict. I will rerun the same current-main and pairwise checks on the updated heads.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T02:23:27Z.
Review: DISMISSED
Re-checked — new head, changes still requested
Head
520f1ecd916f1c0f897d91bdcd7832c4e3b08babnow merges cleanly with #14220, but the landing order with #6194 remains unagreed and their exact heads still conflict.What I ran
Reviewed head
520f1ecd916f1c0f897d91bdcd7832c4e3b08bab; GitHub records base41f9c911dadca8aa735ad5063d8630712a9985dc, while currentmainis0e9dc7bc4c9755c3ce803f6bbdff9dc9f25d68bb. Environment: Debian 12 x86-64, Python 3.11.2, GCC 12.2.0. The precheck reported a clean preview against currentmain.Results
mainShaderResources.hpp,ShaderResources.cpp, anddocs/dev/debt/libSceAgcDriver.md.agc_memory_accounting_budget_snapshottest is registered in the changed CMake fragment.Selected unedited output
Findings
Blocking
The exact #14219 and #6194 heads still conflict in three shared files, and the latest discussion on #6194 says the proposed #14219-before-#6194 order is awaiting the other author's confirmation. This PR still lists
Depends on: none. Please confirm the landing order with the #6194 author and record it on the PR that lands second; then refresh the affected branch and I will rerun the pairwise preview.Non-blocking
The latest head fixes the CTest registration placement, and the current pairwise preview with #14220 is clean. The Windows focused-test result is author-reported; it is not a local run.
Sources
mainNot verified
No local build, CTest, GPU validation run, or independent reproduction of the reported mutation check. Hosted Windows CI is still pending; Linux and specialized product jobs were skipped.
To get this to a good state
Confirm the sequence with the #6194 author. If #14219 lands first, declare that order in #6194's
Depends online; refresh the second branch and resolve the remaining conflicts. I will rerun the same pairwise checks on the updated heads.