Repository navigation
Conversation
…e memo ResolveImageTablesShared keeps resolutions within 8 Mi words (32 MiB), counting the columns they keep alive. A title with large bindless image tables holds more than that in live resolutions, so they push each other out and every result memo miss resolves its tables again: in Marvel's Wolverine (PPSA03671) about 135 resolutions per 10 s found no entry for their variant, ~12 ms each. Its live set settles at ~240 resolutions of 0.6-0.9 MiB, so the budget becomes 64 Mi words (256 MiB); the 256-entry and 4-per-variant bounds stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This pull request is labeled |
|
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.
|
adriadam10
left a comment
There was a problem hiding this comment.
The change itself is small and the ARCHITECTURE.md update matches it. Two things are missing before it can merge:
- Peak memory. The memo is a single global (
resolutionMemo()inResourceMaterializer.cpp) and this raises what it can keep alive from 32 MiB to 256 MiB of columns for every title and every host. docs/dev/CONVENTIONS and the memory rules ask for the bound (given) plus peak RSS before/after on a large workload. Please add the process RSS peak onmainand with the change in the scene you measured, and say what frees the entries on a low-memory host. - Performance report. The PR is labeled
perf: please paste theaps5-summary.jsonlline and thetools/trace_digest.pyoutput of a capture onmainand one with the change, same title, scene and machine, as the bot asked. The local counters are useful context but are not that report.
Once both are in, this looks mergeable.
|
Thanks for the review. Closing this one instead of adding the report.
The cost isn't worth it for every title, so I'm dropping it. |
What
ResolveImageTablesShared(077bc20) hands out an earlier resolution of a variant's image tables when the columns match. It keeps at most 4 per variant and 256 in all withinResolutionMemoWords= 8 Mi words (32 MiB), counting the columns the entries keep alive.A title with large bindless image tables has more live resolutions than fit in 32 MiB, so they push each other out: the next result memo miss of a variant finds no entry for it and resolves its tables again, although its columns did not change.
This raises
ResolutionMemoWordsto 64 Mi words (256 MiB). The 256-entry and 4-per-variant bounds stay, so the memo still holds at most 256 resolutions.docs/dev/ARCHITECTURE.mdgets the new number.Tested
Windows 11, MinGW-w64 GCC (WinLibs 15.2), Release,
BUILD_TESTING=ON, onmaind0852de:ctest -R "agc|shader|spirv|recomp|scalar_call" -j 12, 846 tests. All pass exceptshader_cache_runtime_sources(no Ninja on this machine),agc_shader_replay_toolandagc_driver_pm4_replay_tool(0xc0000139, the MinGW runtime), which fail the same way on plainmainhere.agc_driver_image_array_window_past_layer_limitdoes not build with this compiler on plainmaineither (requested alignment '65536' exceeds object file maximum 8192).Marvel's Wolverine (PPSA03671), RTX 3070 8 GB, i7-11700KF, 1440p, opening in-game scene. I counted, every 10 s, why
ResolveImageTablesSharedresolves (local counters, not part of this PR):Last four 10 s windows of each run, same scene and settings:
main)main)With the larger budget almost no resolution misses for lack of an entry; the ones left are real column changes, which come in bursts as the scene moves (the high windows). The live set settles at ~235-245 entries of 0.6-0.9 MiB each, inside 64 Mi words. (The 64 Mi words run had a build running beside it, so its times are less clean than its counts.)
The frame rate of this title does not change (~0.25 fps in this scene): its frame time is set by the GPU mutex, which draw recording holds ~60 % of the time, and the resolutions run outside it. In the quiet windows the change saves ~1.4 s of CPU per 10 s there.
Not a stock-
mainrun: the title needs unmerged PRs (fix(shader): give the frontend's call analysis the dispatch's wave size #7816, feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395, feat(shader): resolve nested image tables through runtime pointers #7223, perf(agc): resolve DISPATCH_INDIRECT thread dimensions on the GPU #8066, perf(agc): keep released image memory in the buffer pool for reuse by type and size #7870, fix(agc): reserve only the sampled textures alive from the storage image budget #7862, perf(agc): skip CPU-path indirect draws that draw nothing before buil… #7930) and local changes to reach this scene. So the numbers show the memo behaviour, not amainresult.Checklist
main(d0852de); no open PR changes the resolution memo's bounds or eviction.mdfiles or images added🤖 Generated with Claude Code