graphics: quiet two misleading render diagnostics #416
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!416
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/416/head"
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?
@MehmetCambaz on GitHub · 2026-08-30 16:11 UTC · original
MehmetCambaz:fix/log-noise→main· +25 −20 · 2 files · 2 commits · merged 2026-08-30 23:33 UTCProblem
Two render diagnostics point at the wrong thing, and one of them dominates the log.
Register-offset normalization.
pm4Handlers.cppnormalizes a PM4 register offset in threeplaces -- the direct UCONFIG path and the two indirect SH/UC paths -- and each logs every single
time it happens, with no limit, in
Log::Color::Red. Normalizing the offset is routine, so a shortsession fills the log with it. Both titles I have hit the same path, and in both the message is
always the same one:
normalized UC register offset 0x20000243 -> 0x00000243.PAC-MAN WORLD 2 Re-PAC (PPSA18189) emitted 35350 of them in about 40 seconds, carrying exactly one
distinct offset value between them. It grows linearly with session length, and it is coloured as if
something were wrong. The two indirect sites are inside per-register loops, so they have more room
to run away still.
Every neighbouring diagnostic in these same files is already rate-limited --
< 4,< 16,< 64and
< 128all appear withinpm4Handlers.cpp. These three were simply missed.EQAA controls.
EqaaCheckwarns whenever an EQAA control register is non-zero, withoutchecking whether multisampling is on. Those controls only take effect while multisampling, so on a
single-sample target they are inert. PAC-MAN never multisamples -- all 128 of its render targets
report
samples=1-- yet it still produced the warning, sending anyone reading the log after ananti-aliasing problem that cannot exist.
Fix
Rate-limit all three normalization sites at 16, matching the convention already used throughout
these files. The first occurrences are kept; the repetition is dropped.
Return early from
EqaaCheckwhenmsaa_num_samples == 0, which is how the neighbouringAaCheckalready reads that field. A title that does multisample still gets the warning.Log output only. No rendering path is touched.
Measured
Same title, same scene, before and after:
The count is now bounded rather than merely smaller -- it stays at 16 however long the session
runs, where before it grew without limit.
Testing
ctest-- 35/35 passing.captured throughout and compared against the previous build. Rendering is unchanged.
logs capped at 16.
run carry a single distinct offset value, so capping hides nothing in either title.
Two things worth stating plainly. Only the direct UCONFIG site fires in the titles I can test; the
two indirect sites are rate-limited for consistency rather than from an observed problem. And a
plain counter is a count, not a set -- if some other title normalized a second distinct offset only
after the first 16 occurrences, that value would not appear. I kept the simple counter because it
is what the surrounding code does and because it costs nothing on a path that runs tens of
thousands of times a minute, but a per-value cap would be the stricter choice if you prefer it.
AI use disclosure
Per the AI Use policy in the README. I used an AI assistant for development assistance here:
analysing the emulator log to find what was flooding it, and drafting the change.
I reviewed the change in full and ran the testing above myself. The numbers quoted are measurements
from my own machine, not the model's estimates -- including the distinct-value check, which I ran
specifically to confirm that a plain counter does not discard information before accepting that
approach.