summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderManager.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-03-26 19:37:51 -0700
committerPokechu22 <Pokechu022@gmail.com>2021-04-06 11:54:49 -0700
commitcde6cf2ab583d383601146219d5e199004f51844 (patch)
treeb9b0e8a4f92d2bd1e527fdb86666d35adac5552a /Source/Core/VideoCommon/VertexLoaderManager.cpp
parent193f6a67a7c3a59ccc7980392bdeb6476720356a (diff)
Track and log CP commands 0x00/0x10/0x20 differently from other unknown commands
They appear to relate to perf queries, and combining them with truely unknown commands would probably hide useful information. Furthermore, 0x20 is issued by every title, so without this every title would be recorded as using an unknown command, which is very unhelpful.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp
index 33e340cfd3..94a331a0d2 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp
@@ -323,6 +323,18 @@ void LoadCPReg(u32 sub_cmd, u32 value, bool is_preprocess)
CPState* state = is_preprocess ? &g_preprocess_cp_state : &g_main_cp_state;
switch (sub_cmd & CP_COMMAND_MASK)
{
+ case UNKNOWN_00:
+ case UNKNOWN_10:
+ case UNKNOWN_20:
+ if (!(sub_cmd == UNKNOWN_20 && value == 0))
+ {
+ // All titles using libogc or the official SDK issue 0x20 with value=0 on startup
+ DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::USES_CP_PERF_COMMAND);
+ DEBUG_LOG_FMT(VIDEO, "Unknown CP command possibly relating to perf queries used: {:02x}",
+ sub_cmd);
+ }
+ break;
+
case MATINDEX_A:
if (sub_cmd != MATINDEX_A)
{