summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/CPUCull.cpp
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2023-11-28 02:04:26 +0000
committerGitHub <noreply@github.com>2023-11-28 02:04:26 +0000
commitb8a897fda76e8979b82472cfd7caf8911bef9145 (patch)
tree0c1a7ddc01c583f334ff63528be98108eb0d9588 /Source/Core/VideoCommon/CPUCull.cpp
parent074de243e30eeda7fedf2971161a82279a36a2e0 (diff)
parent095f946b6648a30faed9601538cf8a2bf8bf8f59 (diff)
Merge pull request #12328 from iwubcode/xf_state_manager
VideoCommon: move xf state management to its own class
Diffstat (limited to 'Source/Core/VideoCommon/CPUCull.cpp')
-rw-r--r--Source/Core/VideoCommon/CPUCull.cpp4
1 files changed, 3 insertions, 1 deletions
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, CullMode::All> cullmode_invert = {
CullMode::None, CullMode::Front, CullMode::Back, CullMode::All};