Repository navigation
perf(agc): keep a smaller staging pool on system-memory heaps - #5893
Merged
oneandonlydean merged 1 commit intoOct 15, 2026
Merged
Conversation
On a device whose largest device-local heap has only host-visible memory types (integrated GPUs), the staging pool's device tier holds system RAM: it now retains a sixty-fourth of the heap, at least 128 MiB.
11 tasks done
10 tasks done
11 tasks done
Contributor
|
#6174 changes |
TheBlenDed
pushed a commit
to TheBlenDed/AnyPS5
that referenced
this pull request
Oct 25, 2026
Main brings the pipelined-draw stack (boykopovar#1193/boykopovar#1201/boykopovar#1202), boykopovar#6316 after boykopovar#6060, boykopovar#5893, boykopovar#5910 and depth/HTILE work (boykopovar#454, boykopovar#5496, boykopovar#5554, boykopovar#5524, boykopovar#5627, 626cff7). Our SharedSpirv / cold-SPIR-V storage is replaced by main's mapped cache entries (CreateFileMappingW on Windows), so cached variants' words are views into the cache files instead of heap copies; APS5_COLD_SPIRV, APS5_COLD_SPIRV_FILE and APS5_CACHE_SPIRV_BACKING are gone. Kept local: lane hang fixes, boykopovar#5815, boykopovar#6227, table stores and storage tables, option 1 substitutes (.slots), stencil remap and alias path (a written storage view our alias path serves seeds from the depth surface instead of retiring it), 10_11_11 blending next to main's reversed-order blending, VRAM share/spill/fallbacks, diagnostics. Versions: FormatVersion 43, RuntimeAbi 17, request serializer v31. Notes in work/sync-20261013/*-4.md. AI-assisted: yes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The staging pool's device tier (
BufferPool::DeviceBudget, #1147) retains up tomax(512 MiB, heap / 8)of idle buffers, sized from the largest device-local heap as if it were video memory. On an integrated GPU that heap is system RAM: 1.4 GiB of idle buffers on an Arc iGPU whose heap is 11.5 GiB, taken from the title.When every memory type of that heap is host-visible, which is how integrated GPUs report their memory and never true of a discrete GPU (it always has a device-only type), the tier now retains a sixty-fourth of the heap, at least 128 MiB: 180 MiB on that Arc. Discrete GPUs keep today's budget, and
APS5_STAGING_POOL_MIBstill overrides it.The storage image cache has the same problem (
max(2 GiB, heap / 4), 2.9 GiB there), but #5483 already changes that budget, so it is left to it.Tested
Fedora 44, GCC 16.2.1, Release, Intel Arc (Meteor Lake iGPU, Mesa 26.2.3 ANV), 15 GiB RAM.
cteston Arc and on lavapipe: 1158 of 1160 pass on both.agc_host_import_sparsefails on plainmainhere too.guest_kernel_fcntl, new onmain, aborted once in each full parallel run and passes alone (5 of 5) and with the 366guest_tests in parallel, on this branch and onmain.stagingPoolBudgetTestschecks a heap of host-visible types (16 GiB gives 256 MiB, 4 GiB the 128 MiB floor) and that one device-only type keeps the old budget.mainto get past its calibration on this iGPU (compute programs of 0.6 to 1.9 M SPIR-V words that ANV can't compile in time, see AGC: vkQuake's ray-traced shadow compute shader becomes 519,500 SPIR-V words; Intel ANV compiles it for minutes under GpuMutex and crashes (PPSA99010, Linux) #4977 and feat(recompiler): run single-wave wave64 compute programs at one lane per invocation on 32-lane hosts #5405), so both runs usemain66f8947 with feat(recompiler): run single-wave wave64 compute programs at one lane per invocation on 32-lane hosts #5405, perf(shader): keep only evaluable branch conditions in resource plans #5181 and a local change that lets feat(recompiler): run single-wave wave64 compute programs at one lane per invocation on 32-lane hosts #5405's spanned waves run without a required subgroup size, with this commit, and the old budget forced throughAPS5_STAGING_POOL_MIB=1437for the comparison. The storage image cache is at itsmainsize in both. Enter is held once at 90 s, which leads through the main menu into loading, in a cgroup of 12 GiB RAM plus 4 GiB swap:APS5_TRACE_SECONDS=20:20. Frame p50 is 16.7 or 21.0 ms in both builds (one fast run each) and the cgroup peak is about 900 MiB in both. Summary lines (traces inevidence/unified-memory-budgets):The PR lines are from
0f58cb53b, the first form of this branch, which also shrank the storage image cache; Dreaming Sarah reaches neither budget.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)