diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-25 01:02:32 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-13 06:30:34 +0200 |
commit | 76615b9f34efe72dd8f5dcae0d192aa4dc29e970 (patch) | |
tree | 0ce8326404380a1eeb257d4c24ca2dcc0ac9f0ad /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #3606 from ReinUsesLisp/nvflinger (diff) | |
download | yuzu-76615b9f34efe72dd8f5dcae0d192aa4dc29e970.tar yuzu-76615b9f34efe72dd8f5dcae0d192aa4dc29e970.tar.gz yuzu-76615b9f34efe72dd8f5dcae0d192aa4dc29e970.tar.bz2 yuzu-76615b9f34efe72dd8f5dcae0d192aa4dc29e970.tar.lz yuzu-76615b9f34efe72dd8f5dcae0d192aa4dc29e970.tar.xz yuzu-76615b9f34efe72dd8f5dcae0d192aa4dc29e970.tar.zst yuzu-76615b9f34efe72dd8f5dcae0d192aa4dc29e970.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 368f399df..75ef8d541 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -496,6 +496,7 @@ void RasterizerOpenGL::Draw(bool is_indexed, bool is_instanced) { SyncPrimitiveRestart(); SyncScissorTest(); SyncPointState(); + SyncLineState(); SyncPolygonOffset(); SyncAlphaTest(); SyncFramebufferSRGB(); @@ -1311,6 +1312,19 @@ void RasterizerOpenGL::SyncPointState() { glDisable(GL_PROGRAM_POINT_SIZE); } +void RasterizerOpenGL::SyncLineState() { + auto& gpu = system.GPU().Maxwell3D(); + auto& flags = gpu.dirty.flags; + if (!flags[Dirty::LineWidth]) { + return; + } + flags[Dirty::LineWidth] = false; + + const auto& regs = gpu.regs; + oglEnable(GL_LINE_SMOOTH, regs.line_smooth_enable); + glLineWidth(regs.line_smooth_enable ? regs.line_width_smooth : regs.line_width_aliased); +} + void RasterizerOpenGL::SyncPolygonOffset() { auto& gpu = system.GPU().Maxwell3D(); auto& flags = gpu.dirty.flags; |