From 4788a05c76358b90782aa0d922f497ce9490184b Mon Sep 17 00:00:00 2001 From: iwubcode Date: Wed, 29 Jun 2022 20:04:59 -0500 Subject: [PATCH] VideoCommon: fix projection graphics mod affecting more than the intended draw call --- Source/Core/VideoCommon/VertexShaderManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 680d1ad3eee5..555819e0729d 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -38,6 +38,7 @@ static bool bProjectionChanged; static bool bViewportChanged; static bool bTexMtxInfoChanged; static bool bLightingConfigChanged; +static bool bProjectionGraphicsModChange; static BitSet32 nMaterialsChanged; static std::array nTransformMatricesChanged; // min,max static std::array nNormalMatricesChanged; // min,max @@ -63,6 +64,7 @@ void VertexShaderManager::Init() bViewportChanged = false; bTexMtxInfoChanged = false; bLightingConfigChanged = false; + bProjectionGraphicsModChange = false; std::memset(static_cast(&xfmem), 0, sizeof(xfmem)); constants = {}; @@ -322,9 +324,10 @@ void VertexShaderManager::SetConstants(const std::vector& textures) } if (bProjectionChanged || g_freelook_camera.GetController()->IsDirty() || - !projection_actions.empty()) + !projection_actions.empty() || bProjectionGraphicsModChange) { bProjectionChanged = false; + bProjectionGraphicsModChange = !projection_actions.empty(); const auto& rawProjection = xfmem.projection.rawProjection;