summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-08 18:27:15 +0200
committerbunnei <bunneidev@gmail.com>2018-07-08 22:16:24 +0200
commit854f474f52ea49e26d61680e775b1c91e644b2fc (patch)
tree5bc885ae05a37e24e9b2dc0eb9fa1d54a93744d6 /src/video_core/renderer_opengl
parentMerge pull request #625 from Subv/imnmx (diff)
downloadyuzu-854f474f52ea49e26d61680e775b1c91e644b2fc.tar
yuzu-854f474f52ea49e26d61680e775b1c91e644b2fc.tar.gz
yuzu-854f474f52ea49e26d61680e775b1c91e644b2fc.tar.bz2
yuzu-854f474f52ea49e26d61680e775b1c91e644b2fc.tar.lz
yuzu-854f474f52ea49e26d61680e775b1c91e644b2fc.tar.xz
yuzu-854f474f52ea49e26d61680e775b1c91e644b2fc.tar.zst
yuzu-854f474f52ea49e26d61680e775b1c91e644b2fc.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index bacb389e1..ea138d402 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -775,10 +775,13 @@ void RasterizerOpenGL::SyncCullMode() {
state.cull.front_face = MaxwellToGL::FrontFace(regs.cull.front_face);
state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face);
+ const bool flip_triangles{regs.screen_y_control.triangle_rast_flip == 0 ||
+ regs.viewport_transform[0].scale_y < 0.0f};
+
// If the GPU is configured to flip the rasterized triangles, then we need to flip the
// notion of front and back. Note: We flip the triangles when the value of the register is 0
// because OpenGL already does it for us.
- if (regs.screen_y_control.triangle_rast_flip == 0) {
+ if (flip_triangles) {
if (state.cull.front_face == GL_CCW)
state.cull.front_face = GL_CW;
else if (state.cull.front_face == GL_CW)