summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-04-09 10:39:39 +0200
committerGitHub <noreply@github.com>2022-04-09 10:39:39 +0200
commitbf3c6f88126d0167329c4a18759cdabc7584f8b3 (patch)
tree764a99b58782c5b35606cfe2db151f4993f32649
parentMerge pull request #8138 from german77/data-no-race (diff)
parentOpenGL: propagate face flip condition (diff)
downloadyuzu-bf3c6f88126d0167329c4a18759cdabc7584f8b3.tar
yuzu-bf3c6f88126d0167329c4a18759cdabc7584f8b3.tar.gz
yuzu-bf3c6f88126d0167329c4a18759cdabc7584f8b3.tar.bz2
yuzu-bf3c6f88126d0167329c4a18759cdabc7584f8b3.tar.lz
yuzu-bf3c6f88126d0167329c4a18759cdabc7584f8b3.tar.xz
yuzu-bf3c6f88126d0167329c4a18759cdabc7584f8b3.tar.zst
yuzu-bf3c6f88126d0167329c4a18759cdabc7584f8b3.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 7ab7f0c0a..8ef79753f 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -559,12 +559,19 @@ void RasterizerOpenGL::SyncViewport() {
const bool dirty_viewport = flags[Dirty::Viewports] || rescale_viewports;
const bool dirty_clip_control = flags[Dirty::ClipControl];
- if (dirty_clip_control || flags[Dirty::FrontFace]) {
+ if (dirty_viewport || dirty_clip_control || flags[Dirty::FrontFace]) {
flags[Dirty::FrontFace] = false;
GLenum mode = MaxwellToGL::FrontFace(regs.front_face);
+ bool flip_faces = false;
if (regs.screen_y_control.triangle_rast_flip != 0 &&
regs.viewport_transform[0].scale_y < 0.0f) {
+ flip_faces = !flip_faces;
+ }
+ if (regs.viewport_transform[0].scale_z < 0.0f) {
+ flip_faces = !flip_faces;
+ }
+ if (flip_faces) {
switch (mode) {
case GL_CW:
mode = GL_CCW;