graphics: quiet two misleading render diagnostics (#416)

* graphics: quiet two misleading render diagnostics

The three PM4 register-offset normalization messages logged once per occurrence with no
limit. They are printed in the colour reserved for problems, and normalizing the offset is
routine, so a short session buries the log in them: PAC-MAN WORLD 2 Re-PAC (PPSA18189)
emitted 24969 of them in about a minute, a fifth of a megabyte and 1.9% of every line
written. Rate-limit all three the way the surrounding diagnostics in these files already
are, which keeps the first occurrences without drowning what follows.

The EQAA check warned whenever a control register was set, including on single-sample
targets where those controls do nothing. That title never multisamples -- all 128 of its
render targets are samples=1 -- yet it still produced the warning, pointing at a cause that
could not apply. Return early when multisampling is off, matching how the neighbouring
sample-location check already reads msaa_num_samples.

Log output only; no rendering behaviour changes.

* graphics: silence normalized offset diagnostics

---------

Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
Mehmet Cambaz
2026-08-31 02:33:32 +03:00
committed by GitHub
parent 6758d67942
commit cd0f0a428a
2 changed files with 25 additions and 20 deletions
@@ -2433,12 +2433,12 @@ KYTY_CP_OP_PARSER(CpOpIndirectShRegs) {
auto value = indirect_buffer[1];
// Not sure if this is correct
if (raw_cmd_offset != cmd_offset) {
LOGF_COLOR(Log::Color::Red,
"\t temporary: normalized indirect SH register offset 0x%08" PRIx32
" -> 0x%08" PRIx32 "\n",
raw_cmd_offset, cmd_offset);
}
// if (raw_cmd_offset != cmd_offset) {
// LOGF_COLOR(Log::Color::Red,
// "\t temporary: normalized indirect SH register offset 0x%08" PRIx32
// " -> 0x%08" PRIx32 "\n",
// raw_cmd_offset, cmd_offset);
// }
// Not sure if this is correct
if (cmd_offset == Pm4::SH_NOP || raw_cmd_offset == 0xffffffffu) {
@@ -2494,12 +2494,12 @@ KYTY_CP_OP_PARSER(CpOpIndirectUcRegs) {
auto value = indirect_buffer[1];
// Not sure if this is correct
if (raw_cmd_offset != cmd_offset) {
LOGF_COLOR(Log::Color::Red,
"\t temporary: normalized indirect UC register offset 0x%08" PRIx32
" -> 0x%08" PRIx32 "\n",
raw_cmd_offset, cmd_offset);
}
// if (raw_cmd_offset != cmd_offset) {
// LOGF_COLOR(Log::Color::Red,
// "\t temporary: normalized indirect UC register offset 0x%08" PRIx32
// " -> 0x%08" PRIx32 "\n",
// raw_cmd_offset, cmd_offset);
// }
if (HwUcTrySetFakeRegister(cmd_offset, value)) {
continue;
}
@@ -2855,12 +2855,12 @@ KYTY_CP_OP_PARSER(CpOpSetUconfigReg) {
cmd_offset = raw_cmd_offset & 0x0fffffffu;
}
if (raw_cmd_offset != cmd_offset) {
LOGF_COLOR(Log::Color::Red,
"\t temporary: normalized UC register offset 0x%08" PRIx32 " -> 0x%08" PRIx32
"\n",
raw_cmd_offset, cmd_offset);
}
// if (raw_cmd_offset != cmd_offset) {
// LOGF_COLOR(Log::Color::Red,
// "\t temporary: normalized UC register offset 0x%08" PRIx32 " -> 0x%08" PRIx32
// "\n",
// raw_cmd_offset, cmd_offset);
// }
if (HwUcTrySetFakeRegisterRange(cmd_offset, buffer + 1, KYTY_PM4_LEN(cmd_id) - 2u)) {
return KYTY_PM4_LEN(cmd_id) - 1u;
}
+7 -2
View File
@@ -827,7 +827,12 @@ static void EqaaPrint(const char* func, const HW::EqaaControl& c) {
c.static_anchor_associations ? "true" : "false");
}
static void EqaaCheck(const HW::EqaaControl& c) {
static void EqaaCheck(const HW::EqaaControl& c, const HW::AaConfig& cf) {
// The EQAA controls only take effect while multisampling is on, so a single-sample
// target leaves them inert and has nothing to warn about.
if (cf.msaa_num_samples == 0) {
return;
}
if (c.max_anchor_samples != 0 || c.ps_iter_samples != 0 || c.mask_export_num_samples != 0 ||
c.alpha_to_mask_num_samples != 0 || c.high_quality_intersections ||
c.incoherent_eqaa_reads || c.interpolate_comp_z || c.static_anchor_associations) {
@@ -1192,7 +1197,7 @@ void hw_check(const CommandBuffer& buffer) {
log_phase("blend");
BcCheck(bc, bclr, cc);
log_phase("eqaa");
EqaaCheck(eqaa);
EqaaCheck(eqaa, ac);
log_phase("aa");
AaCheck(aa, ac);
log_phase("done");