VideoCommon: fix projection graphics mod affecting more than the intended draw call

This commit is contained in:
iwubcode 2022-06-29 20:04:59 -05:00
parent 5d04e1e1de
commit 4788a05c76
1 changed files with 4 additions and 1 deletions

View File

@ -38,6 +38,7 @@ static bool bProjectionChanged;
static bool bViewportChanged; static bool bViewportChanged;
static bool bTexMtxInfoChanged; static bool bTexMtxInfoChanged;
static bool bLightingConfigChanged; static bool bLightingConfigChanged;
static bool bProjectionGraphicsModChange;
static BitSet32 nMaterialsChanged; static BitSet32 nMaterialsChanged;
static std::array<int, 2> nTransformMatricesChanged; // min,max static std::array<int, 2> nTransformMatricesChanged; // min,max
static std::array<int, 2> nNormalMatricesChanged; // min,max static std::array<int, 2> nNormalMatricesChanged; // min,max
@ -63,6 +64,7 @@ void VertexShaderManager::Init()
bViewportChanged = false; bViewportChanged = false;
bTexMtxInfoChanged = false; bTexMtxInfoChanged = false;
bLightingConfigChanged = false; bLightingConfigChanged = false;
bProjectionGraphicsModChange = false;
std::memset(static_cast<void*>(&xfmem), 0, sizeof(xfmem)); std::memset(static_cast<void*>(&xfmem), 0, sizeof(xfmem));
constants = {}; constants = {};
@ -322,9 +324,10 @@ void VertexShaderManager::SetConstants(const std::vector<std::string>& textures)
} }
if (bProjectionChanged || g_freelook_camera.GetController()->IsDirty() || if (bProjectionChanged || g_freelook_camera.GetController()->IsDirty() ||
!projection_actions.empty()) !projection_actions.empty() || bProjectionGraphicsModChange)
{ {
bProjectionChanged = false; bProjectionChanged = false;
bProjectionGraphicsModChange = !projection_actions.empty();
const auto& rawProjection = xfmem.projection.rawProjection; const auto& rawProjection = xfmem.projection.rawProjection;