perf(agc): size the unit shadow from the reported device-local budget #12066
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12066"
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 JJenkx on 2026-10-27T18:25:08Z.
What
The unit shadow caches host imports in device-local 8 MiB slabs. Default its cap to one eighth of the first context's reported device-local heap budget, clamped to 128 MiB–1 GiB. An absent/zero budget retains 1 GiB.
APS5_UNIT_SHADOW_MIBremains an explicit override. The first context fixes the process-wide cap; later budget changes do not refresh it.This reduces the default reservation on smaller budgets to leave memory for other caches. It does not increase the 1 GiB maximum. The earlier one-sixteenth policy regressed the measured Trek working set; this PR retains one eighth. No new repeatable title-speed gain is established by the pair below.
Tested
Refreshed 2026-11-05 onto plain main
1e24993fa3a7da25e8fc27152af654687ba64552with a single topic commitbb89ab2f85c6e0defc44aa52b6702e9586906f9a; no prerequisite PRs or merge commits. The performance run used d456a306626b, preserved onevidence/12066-change-20261105. Its complete source tree and the refreshed public head's tree are identical (84b6f24e4e85bb82880e1147fa1ae5a2553135f8). The actual summary commits below are retained unchanged. After preparing the public commit, rebuilt its full SDK/relinker and reran the focused tests on that exact head.Linux 7.2.11-arch1-1, GCC 16.2.1, Ryzen 9 7950X (16 cores/32 threads), 128 GB RAM, RX 6650 XT 8 GB, RADV Mesa 26.2.6-arch1.1.
libsandrelinkerbuild passed.ctest --test-dir build -R '^(agc_driver_graphics|agc_driver_sparse_dma_buf_cpu_lead)$' -V -j1 --no-tests=errorwithANYPS5_REQUIRE_CPU_LEAD_TEST=ON,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Each arm passed 2/2, no skips, one verified real validation-layer insertion, no missing-layer warning and zero VUID IDs. The exact public head passed the same gate again after rebuilding.agc_driver_graphicsincludes the budget policy vectors. The strict shared-backing test imports memfd/dma-buf memory and verifies GPU fill, shadow publication, guest bytes and boundary canaries with--require-cpu-lead. The originally selected private-anonymous backing tests skipped three paths on this RADV host and were rejected as qualification; their results remain in the archive. The strict shared test does not establish coverage of those unavailable private-import paths.Current-head Windows validation: RX 6700 XT 12 GB report, exact
bb89ab2f85c6against plain main1e24993fa3a7: each arm had six passing focused tests plus the Linux-only sparse-dma-buf test skipped, repeated three times, with 15 real validation-layer insertions per arm and zero VUIDs. The Windows run did not log the device-local budget; the 12 GB card is expected to reach the existing 1 GiB cap, so this is not evidence of a reduced default on that GPU or a title-performance result.Trek to Yomi PPSA02629 v02.000.000, same idle COMBAT MOVEMENT dojo scene on both arms. Actual guest rendering was 3840×2160.
APS5_OUTPUT_RESOLUTION=1920x1080changes advertised output information and did not force this title's framebuffer size. Both arms used byte-identical initial save and warm shader/Mesa cache seeds, fixed startup inputs, normal cache behavior,APS5_PLAYGO_UNLISTED_CHUNKS=absent, andAPS5_HOST_IMPORT_MIB=16384. This is a warm-cache comparison, not a cold-load benchmark or an installed-content coverage claim.Main ran first, then the change; each bounded 690-second run separately held the host FIFO through preparation and cleanup. Traces cover seconds 540–660 with only
APS5_TRACE_DIRandAPS5_TRACE_SECONDS=540:120: no otherAPS5_TRACE_*orAPS5_PROFILE_*switch. Both runs exited 0; source, SDK, seed and protected-input integrity checks passed, with no native leftovers. No external compiler jobs appeared in the sampled measurement-window process records. Twelve before/during/after window captures (both capture channels at 535/605/675 seconds) were reviewed and show the same scene; these are not atomic physical scan-out captures.The point difference is +4.898% in one pair. The predeclared plan required at least 5% for a reverse-order confirmation pair; this result is below that threshold, so there was no further run seeking a favorable outcome. It does not demonstrate repeatability or a general speedup.
Both detailed traces dropped events (
totals_full=false); frame/present statistics remain available separately. Slice-based waits and phase inventories are incomplete, missing slices are not idle time, and inclusive phase timings must not be added as exclusive CPU/GPU costs. Full digests and the original raw traces are attached in the evidence archive.Plain main original summary:
Change, actual evaluated commit original summary:
Evidence archive (17,933,938 bytes; uploaded and downloaded SHA-256 verified):
b590147c108bbadfd8f3d12226cc3d6c2d587f0473f2090412044c39b4de6350Contains both raw traces, complete digests, 12 reviewed scene captures, per-file hashes, provenance/source-tree pins, predeclared plan, final analysis, focused gate logs/results, evaluated patch and prior PR description. Historical Echoes/private-stack results in that prior description are not current-main measurements. Earlier Windows report and NVIDIA CI report concern earlier heads and are not claimed as exact-head Windows/NVIDIA validation for this refresh.
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-10-27T18:30:44Z.
Review: DISMISSED
The change and its unit budget vectors look coherent on inspection. The reported Vulkan validation gate is detailed and compares
main, an intentionally broken eighth-budget variant, and the change on the same RX 6650 XT. I have not independently run the AGC runtime gate on equivalent hardware.I checked both linked traces with
tools/trace_digest.py. Their summaries are internally paired on the same title, GPU, driver and OS, but this report does not meet the repository's performance-report protocol yet:CONTRIBUTING.mdrequires a capture onmainand one with the change. The reported baseline is explicitly a private integration tree containing several additional PRs, and the summary commits7e4a65226453ande039da84f6faare not present in the public repository, so I cannot verify a main-versus-PR comparison.APS5_PROFILE_DRAW=1. The performance issue form says not to set otherAPS5_TRACE_*orAPS5_PROFILE_*switches for these captures.resolution: 3840x2160despiteAPS5_OUTPUT_RESOLUTION=1920x1080. Please clarify the actual capture resolution and correct the description or evidence.The digests also report
dropped: yes: the before trace lost 291,165 slices and the after trace lost 959,791 slices. The summaries saytotals_full: false, so the aggregate totals remain available, but most per-event trace detail is missing. Please include each digest in the PR and account for this limitation when presenting the result.Please recapture the comparison on current
mainand this PR, in the same session with the same scene/settings and withoutAPS5_PROFILE_DRAW, then replace the summary lines/traces and clarify resolution. I am requesting changes for the required performance evidence, not asserting that the code change itself is defective.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-28T18:17:17Z.
Review: DISMISSED
@MarcZX10 the author's recapture of 2026-10-28 addresses the three points of your request: the base and change are public commits (
evidence/12066-base,evidence/12066-change), noAPS5_PROFILE_DRAWis set, and the 3840x2160 resolution is explained. The dropped trace slices are accounted for (the figures come from the presenter, which dropped nothing). The head is unchanged (9ba10e7a84), so the merge queue keeps refusing the PR until you re-review or dismiss the request. Could you take another look?Nothing is needed from @JJenkx for now.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T07:13:59Z.
Review: DISMISSED
Re-checked — new head, changes still requested
The author’s Windows validation run and refreshed A/B report address several earlier evidence gaps, but the A/B still uses
main439d03db387and the focused gate usesmain750cf6cf48; currentmainisedf6804cf5.What I ran
9ba10e7a842cca14e797e9f76655a29dad83bbf5against currentmainedf6804cf52c62eacafc592dd6142cb4efe5bd05.git merge-tree --write-tree, compared AGC/shader paths changed since the reported A/B base and unit-shadow paths changed since the Windows test base, and rangit diff --check.Results
1c2e2f27c8404a9bcfa6f6b83aea12b23654ff75439d03db387/edf6804cf5750cf6cf48Graphics.cpptest and environment documentation changed750cf6cf48and the PR head439d03db387Unedited available command output
Negative control
439d03db387, not currentmainFindings
Blocking
mainplus the same exact prerequisite PR revisions that let the title boot, then compare that tree with this PR added. Main has changed many AGC and shader execution paths since439d03db387, so the reported performance result does not represent current integration. Also rerun the focused unit-shadow gate because the shared test file changed after its base.Non-blocking
Sources
Not verified
To get this to a good state