From 849a0c13b5fbfc31b38e2b2593b1213b8adfb9f4 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sat, 25 Nov 2023 16:23:54 -0600 Subject: VideoCommon: move xf state management to its own class, so changes can be detected in places other than VertexShaderManager --- Source/Core/VideoCommon/CPUCull.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/CPUCull.cpp') diff --git a/Source/Core/VideoCommon/CPUCull.cpp b/Source/Core/VideoCommon/CPUCull.cpp index 92fdc81cc8..5225bbabe5 100644 --- a/Source/Core/VideoCommon/CPUCull.cpp +++ b/Source/Core/VideoCommon/CPUCull.cpp @@ -14,6 +14,7 @@ #include "VideoCommon/VertexShaderManager.h" #include "VideoCommon/VideoConfig.h" #include "VideoCommon/XFMemory.h" +#include "VideoCommon/XFStateManager.h" // We really want things like c.w * a.x - a.w * c.x to stay symmetric, so they cancel to zero on // degenerate triangles. Make sure the compiler doesn't optimize in fmas where not requested. @@ -153,7 +154,8 @@ bool CPUCull::AreAllVerticesCulled(VertexLoaderBase* loader, OpcodeDecoder::Prim } // transform functions need the projection matrix to tranform to clip space - Core::System::GetInstance().GetVertexShaderManager().SetProjectionMatrix(); + auto& system = Core::System::GetInstance(); + system.GetVertexShaderManager().SetProjectionMatrix(system.GetXFStateManager()); static constexpr Common::EnumMap cullmode_invert = { CullMode::None, CullMode::Front, CullMode::Back, CullMode::All}; -- cgit v1.2.3