summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2021-02-24 23:04:51 +0100
committerKelebek1 <eeeedddccc@hotmail.co.uk>2021-02-24 23:26:53 +0100
commitd31dbb1bc12505d503cb97b57518a3e48cb2da11 (patch)
tree505b0290cfc653238966e1e32a88530a7d4d30b1 /src/video_core/renderer_opengl/gl_rasterizer.cpp
parentMerge pull request #5981 from lat9nq/ci-add-clang (diff)
downloadyuzu-d31dbb1bc12505d503cb97b57518a3e48cb2da11.tar
yuzu-d31dbb1bc12505d503cb97b57518a3e48cb2da11.tar.gz
yuzu-d31dbb1bc12505d503cb97b57518a3e48cb2da11.tar.bz2
yuzu-d31dbb1bc12505d503cb97b57518a3e48cb2da11.tar.lz
yuzu-d31dbb1bc12505d503cb97b57518a3e48cb2da11.tar.xz
yuzu-d31dbb1bc12505d503cb97b57518a3e48cb2da11.tar.zst
yuzu-d31dbb1bc12505d503cb97b57518a3e48cb2da11.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 418644108..4610fd160 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -889,7 +889,11 @@ void RasterizerOpenGL::SyncViewport() {
const GLdouble reduce_z = regs.depth_mode == Maxwell::DepthMode::MinusOneToOne;
const GLdouble near_depth = src.translate_z - src.scale_z * reduce_z;
const GLdouble far_depth = src.translate_z + src.scale_z;
- glDepthRangeIndexed(static_cast<GLuint>(i), near_depth, far_depth);
+ if (device.HasDepthBufferFloat()) {
+ glDepthRangeIndexeddNV(static_cast<GLuint>(i), near_depth, far_depth);
+ } else {
+ glDepthRangeIndexed(static_cast<GLuint>(i), near_depth, far_depth);
+ }
if (!GLAD_GL_NV_viewport_swizzle) {
continue;