summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-01-03 02:42:56 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-02-28 21:56:43 +0100
commit62437943a72d5ec2d5e0734767855ea54ea257a0 (patch)
treee6a968ee591f0381e2f1d5eb8024bb829c62ebdb /src
parentgl_state_tracker: Implement dirty flags for depth clamp enabling (diff)
downloadyuzu-62437943a72d5ec2d5e0734767855ea54ea257a0.tar
yuzu-62437943a72d5ec2d5e0734767855ea54ea257a0.tar.gz
yuzu-62437943a72d5ec2d5e0734767855ea54ea257a0.tar.bz2
yuzu-62437943a72d5ec2d5e0734767855ea54ea257a0.tar.lz
yuzu-62437943a72d5ec2d5e0734767855ea54ea257a0.tar.xz
yuzu-62437943a72d5ec2d5e0734767855ea54ea257a0.tar.zst
yuzu-62437943a72d5ec2d5e0734767855ea54ea257a0.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 3ffa9988e..8a762fd0d 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1312,9 +1312,12 @@ void RasterizerOpenGL::SyncPolygonOffset() {
oglEnable(GL_POLYGON_OFFSET_LINE, regs.polygon_offset_line_enable);
oglEnable(GL_POLYGON_OFFSET_POINT, regs.polygon_offset_point_enable);
- // Hardware divides polygon offset units by two
- glPolygonOffsetClamp(regs.polygon_offset_factor, regs.polygon_offset_units / 2.0f,
- regs.polygon_offset_clamp);
+ if (regs.polygon_offset_fill_enable || regs.polygon_offset_line_enable ||
+ regs.polygon_offset_point_enable) {
+ // Hardware divides polygon offset units by two
+ glPolygonOffsetClamp(regs.polygon_offset_factor, regs.polygon_offset_units / 2.0f,
+ regs.polygon_offset_clamp);
+ }
}
void RasterizerOpenGL::SyncAlphaTest() {