Merge pull request #10029 from Tilka/clipdisable

VideoCommon: report games that set bits in XFMEM_CLIPDISABLE
This commit is contained in:
Tilka 2021-08-15 07:07:41 +01:00 committed by GitHub
commit 4c179fe448
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

View File

@ -133,7 +133,7 @@ void DolphinAnalytics::ReportGameStart()
} }
// Keep in sync with enum class GameQuirk definition. // Keep in sync with enum class GameQuirk definition.
constexpr std::array<const char*, 21> GAME_QUIRKS_NAMES{ constexpr std::array<const char*, 24> GAME_QUIRKS_NAMES{
"icache-matters", "icache-matters",
"directly-reads-wiimote-input", "directly-reads-wiimote-input",
"uses-DVDLowStopLaser", "uses-DVDLowStopLaser",
@ -155,6 +155,9 @@ constexpr std::array<const char*, 21> GAME_QUIRKS_NAMES{
"uses-cp-perf-command", "uses-cp-perf-command",
"uses-unimplemented-ax-command", "uses-unimplemented-ax-command",
"uses-ax-initial-time-delay", "uses-ax-initial-time-delay",
"sets-xf-clipdisable-bit-0",
"sets-xf-clipdisable-bit-1",
"sets-xf-clipdisable-bit-2",
}; };
static_assert(GAME_QUIRKS_NAMES.size() == static_cast<u32>(GameQuirk::COUNT), static_assert(GAME_QUIRKS_NAMES.size() == static_cast<u32>(GameQuirk::COUNT),
"Game quirks names and enum definition are out of sync."); "Game quirks names and enum definition are out of sync.");

View File

@ -76,6 +76,11 @@ enum class GameQuirk
USES_UNIMPLEMENTED_AX_COMMAND, USES_UNIMPLEMENTED_AX_COMMAND,
USES_AX_INITIAL_TIME_DELAY, USES_AX_INITIAL_TIME_DELAY,
// We don't implement XFMEM_CLIPDISABLE yet.
SETS_XF_CLIPDISABLE_BIT_0,
SETS_XF_CLIPDISABLE_BIT_1,
SETS_XF_CLIPDISABLE_BIT_2,
COUNT, COUNT,
}; };

View File

@ -48,10 +48,16 @@ static void XFRegWritten(int transferSize, u32 baseAddress, DataReader src)
break; break;
case XFMEM_CLIPDISABLE: case XFMEM_CLIPDISABLE:
// if (data & 1) {} // disable clipping detection {
// if (data & 2) {} // disable trivial rejection ClipDisable setting{.hex = newValue};
// if (data & 4) {} // disable cpoly clipping acceleration if (setting.disable_clipping_detection)
DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::SETS_XF_CLIPDISABLE_BIT_0);
if (setting.disable_trivial_rejection)
DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::SETS_XF_CLIPDISABLE_BIT_1);
if (setting.disable_cpoly_clipping_acceleration)
DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::SETS_XF_CLIPDISABLE_BIT_2);
break; break;
}
case XFMEM_VTXSPECS: //__GXXfVtxSpecs, wrote 0004 case XFMEM_VTXSPECS: //__GXXfVtxSpecs, wrote 0004
break; break;