Merge pull request #8717 from stenzek/mismatched-xf-bp

VertexManagerBase: Skip drawing objects with mismatched xf/bp stages
This commit is contained in:
JMC47
2020-04-21 10:07:36 -04:00
committed by GitHub
3 changed files with 45 additions and 12 deletions

View File

@ -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,