summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-03 05:48:52 +0200
committerGitHub <noreply@github.com>2018-07-03 05:48:52 +0200
commite3ca561ea0aa2e38dd1bba6757c7170448579554 (patch)
tree7eeeda369d77431fc2f915d0265a47f308c0be46 /src
parentMerge pull request #611 from Subv/enabled_depth_test (diff)
parentgl_rasterizer: Only set cull mode and front face if enabled. (diff)
downloadyuzu-e3ca561ea0aa2e38dd1bba6757c7170448579554.tar
yuzu-e3ca561ea0aa2e38dd1bba6757c7170448579554.tar.gz
yuzu-e3ca561ea0aa2e38dd1bba6757c7170448579554.tar.bz2
yuzu-e3ca561ea0aa2e38dd1bba6757c7170448579554.tar.lz
yuzu-e3ca561ea0aa2e38dd1bba6757c7170448579554.tar.xz
yuzu-e3ca561ea0aa2e38dd1bba6757c7170448579554.tar.zst
yuzu-e3ca561ea0aa2e38dd1bba6757c7170448579554.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 1ced31e84..dea88dfce 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -718,8 +718,11 @@ void RasterizerOpenGL::SyncCullMode() {
const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs;
state.cull.enabled = regs.cull.enabled != 0;
- state.cull.front_face = MaxwellToGL::FrontFace(regs.cull.front_face);
- state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face);
+
+ if (state.cull.enabled) {
+ state.cull.front_face = MaxwellToGL::FrontFace(regs.cull.front_face);
+ state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face);
+ }
}
void RasterizerOpenGL::SyncDepthScale() {