diff options
author | bunnei <bunneidev@gmail.com> | 2022-11-04 06:21:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 06:21:58 +0100 |
commit | 38e4382f532d606afbd3969990a9ca3bac70e557 (patch) | |
tree | b9af6ed0a26285f4b0dcd5c21028601004267607 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #9135 from liamwhite/service-thread-event (diff) | |
parent | Merge branch 'master' into mipmap (diff) | |
download | yuzu-38e4382f532d606afbd3969990a9ca3bac70e557.tar yuzu-38e4382f532d606afbd3969990a9ca3bac70e557.tar.gz yuzu-38e4382f532d606afbd3969990a9ca3bac70e557.tar.bz2 yuzu-38e4382f532d606afbd3969990a9ca3bac70e557.tar.lz yuzu-38e4382f532d606afbd3969990a9ca3bac70e557.tar.xz yuzu-38e4382f532d606afbd3969990a9ca3bac70e557.tar.zst yuzu-38e4382f532d606afbd3969990a9ca3bac70e557.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 1590b21de..79d7908d4 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -618,6 +618,16 @@ void RasterizerOpenGL::SyncViewport() { } flags[Dirty::Viewport0 + index] = false; + if (!regs.viewport_transform_enabled) { + const auto x = static_cast<GLfloat>(regs.render_area.x); + const auto y = static_cast<GLfloat>(regs.render_area.y); + const auto width = static_cast<GLfloat>(regs.render_area.width); + const auto height = static_cast<GLfloat>(regs.render_area.height); + glViewportIndexedf(static_cast<GLuint>(index), x, y, width != 0.0f ? width : 1.0f, + height != 0.0f ? height : 1.0f); + continue; + } + const auto& src = regs.viewport_transform[index]; GLfloat x = conv(src.translate_x - src.scale_x); GLfloat y = conv(src.translate_y - src.scale_y); |