summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexManagerBase.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2020-04-21 10:07:36 -0400
committerGitHub <noreply@github.com>2020-04-21 10:07:36 -0400
commitd845b31579a136d1b6d610110bec1bbd02fcbebb (patch)
treeed3ed954d75a7a7b5fd031dc2026e2809519a657 /Source/Core/VideoCommon/VertexManagerBase.cpp
parent2d8758daaa2e07a7fbfc4a17d5cb089b27a6d10c (diff)
parentff7180cac422cf20c174031d7d41c05961234828 (diff)
Merge pull request #8717 from stenzek/mismatched-xf-bp
VertexManagerBase: Skip drawing objects with mismatched xf/bp stages
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp
index c9be06cd48..ce80f0008a 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.cpp
+++ b/Source/Core/VideoCommon/VertexManagerBase.cpp
@@ -14,6 +14,7 @@
#include "Common/Logging/Log.h"
#include "Common/MathUtil.h"
+#include "Core/Analytics.h"
#include "Core/ConfigManager.h"
#include "VideoCommon/BPMemory.h"
@@ -353,6 +354,31 @@ void VertexManagerBase::Flush()
m_is_flushed = true;
+ if (xfmem.numTexGen.numTexGens != bpmem.genMode.numtexgens ||
+ xfmem.numChan.numColorChans != bpmem.genMode.numcolchans)
+ {
+ ERROR_LOG(VIDEO,
+ "Mismatched configuration between XF and BP stages - %u/%u texgens, %u/%u colors. "
+ "Skipping draw. Please report on the issue tracker.",
+ xfmem.numTexGen.numTexGens, bpmem.genMode.numtexgens.Value(),
+ xfmem.numChan.numColorChans, bpmem.genMode.numcolchans.Value());
+
+ // Analytics reporting so we can discover which games have this problem, that way when we
+ // eventually simulate the behavior we have test cases for it.
+ if (xfmem.numTexGen.numTexGens != bpmem.genMode.numtexgens)
+ {
+ DolphinAnalytics::Instance().ReportGameQuirk(
+ GameQuirk::MISMATCHED_GPU_TEXGENS_BETWEEN_XF_AND_BP);
+ }
+ if (xfmem.numChan.numColorChans != bpmem.genMode.numcolchans)
+ {
+ DolphinAnalytics::Instance().ReportGameQuirk(
+ GameQuirk::MISMATCHED_GPU_TEXGENS_BETWEEN_XF_AND_BP);
+ }
+
+ return;
+ }
+
#if defined(_DEBUG) || defined(DEBUGFAST)
PRIM_LOG("frame%d:\n texgen=%u, numchan=%u, dualtex=%u, ztex=%u, cole=%u, alpe=%u, ze=%u",
g_ActiveConfig.iSaveTargetId, xfmem.numTexGen.numTexGens, xfmem.numChan.numColorChans,