Repository navigation
feat(agc): trace draw-key cache misses - #5364
Conversation
|
I ran this head merged into
|
|
|
|
Fixed the component mix-up: shader snapshot identities and offsets now feed the shader-set key in |
|
Checked the new head: |
|
Ran this in a title: PPSA25344 (Sword of the Sea), title screen, It printed 217
Among the sampled repeat misses, user-data registers changed in all but one, and stable registers changed along with them in about half. One note from using it: there's no per-10 s total, so the lines show which components change but not how many draws miss in all. A count line like #5408's |
adriadam10
left a comment
There was a problem hiding this comment.
This now conflicts with main in DrawRegisterKey.hpp/.cpp, Driver.hpp and Draw.cpp, and it is not a mechanical rebase: #58b6ddf72 added APS5_TRACE_DRAW_CACHE (traceDrawCache(), absentUserWords / absentNewRegisters / absentEvicted counters) and changed RegisterStateKey/drawRegisterKey to return a shapeKey through the same parameter slot this PR uses for RegisterStateKeyParts / components.
Could you rebase onto current main and:
- reuse the existing
traceDrawCache()gate and shape key instead of adding a second env var and a second miss path inDriver::draw, or say why a separate trace is needed; - keep only what
maindoes not already report (the per-group breakdown: stable / user-data / auxiliary / device / shader-set), and say in the PR body what it adds over theabsentUserWords/absentNewRegisterssplit; - rerun
agc_driver_register_key_testswithAPS5_VERIFY_REGISTER_KEYS=1on the rebased head.
The components[4] fix and the new shader-set test looked right on the previous head; they only need to survive the rebase.
2dd5ecd to
fdba064
Compare
|
Rebased onto current Validation on the rebased head: the focused |
|
@MarcZX100 the force-push at 23:58 UTC left this branch with a single commit, fdba064 |
fdba064 to
d1afc59
Compare
|
You were right: I accidentally pushed the unrelated diagnostics commit to this branch. I restored the intended rebased trace work; the current head is I also corrected the PR description: this version uses the existing |
d1afc59 to
4f142b1
Compare
|
Rebased onto current |
|
I built 4f142b1 on main 8cd937e and ran I also ran Astro's Playroom (PPSA01325) into its heavy gameplay scene with
So every register-key miss there has changed user data, and only about 2% also changed stable registers. That is what the data-only path work in PR 5656 and PR 5609 goes after, and this report makes it easy to see. |
|
I believe the requested updates are now present in head For validation, fma-rc reports |
4f142b1 to
63c46c6
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Re-checked the rebased head: it now reuses traceDrawCache() and the existing 10 s [draw-cache] report, components[4] carries the shader-set key and components[3] the device serial. agc_driver_register_key and the four agc_driver_draw_cache_reuse* tests pass with APS5_VERIFY_REGISTER_KEYS=1, and the new test does not build without the change. Default behaviour is unchanged with the variable unset. Confirmed by @fma-rc on RTX 5080, RADV and lavapipe.
Added on top as a small commit: dropped the unused identity temporary in drawRegisterKey (DrawRegisterKey.cpp) and a stray blank line. Merging once the full Build is green.
Since #5364, Draw/DrawRegisterKey.hpp includes Shaders/ShaderRegistry.hpp, which reaches ShaderMemory.hpp and its "Recompiler.hpp". tests/Pm4.cpp includes DrawRegisterKey.hpp, but agc_driver_pm4_tests only links libSceAgcDriver, libc and libkernel, so the recompiler's include directories are not on its path and Pm4.cpp no longer compiles. The test targets that already reach ShaderMemory.hpp link shader_recompiler_agc_driver; this one now does too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Adds per-group attribution for draw register-key cache misses: stable registers, user-data registers, auxiliary registers, device, and shader set, plus misses where none of those components changed.
This extends the existing
APS5_TRACE_DRAW_CACHEreport, which already distinguishes new-register misses, user-word/pointer-only misses, evictions, and keys seen but never inserted. It reusestraceDrawCache()and its 10-second report; there is no separate environment variable or stderr logging path. Shader-set identity is included so distinct snapshots are tracked separately.Tested
agc_driver_register_key_testsandlibSceAgcDriver.prxsuccessfully with Ninja Release.APS5_VERIFY_REGISTER_KEYS=1 ctest --test-dir /tmp/anyps5-open-diagnostics-main-build -R '^agc_driver_register_key$' --output-on-failure— the test executable cannot enter its test body on this host: Xeon E5-1620 v2 lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, and FMA.python3 tools/check_conventions.py --base upstream/main— passed.git diff --check upstream/main...HEAD— passed.Checklist
main; no other open PR implements the same functions