From 915d73f3b8871fc31b9b6571d645ced6f766bc43 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 25 Dec 2019 20:13:43 -0300 Subject: [PATCH] gl_state: Remove blend color tracking --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 5 +---- src/video_core/renderer_opengl/gl_state.cpp | 7 ------- src/video_core/renderer_opengl/gl_state.h | 7 ------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 744892618..5c5273b5d 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -1117,10 +1117,7 @@ void RasterizerOpenGL::SyncBlendState() { auto& maxwell3d = system.GPU().Maxwell3D(); const auto& regs = maxwell3d.regs; - state.blend_color.red = regs.blend_color.r; - state.blend_color.green = regs.blend_color.g; - state.blend_color.blue = regs.blend_color.b; - state.blend_color.alpha = regs.blend_color.a; + glBlendColor(regs.blend_color.r, regs.blend_color.g, regs.blend_color.b, regs.blend_color.a); state.independant_blend.enabled = regs.independent_blend_enable; if (!state.independant_blend.enabled) { diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 05c271ad2..e8463da7e 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -330,13 +330,6 @@ void OpenGLState::ApplyBlending() { ApplyGlobalBlending(); } cur_state.independant_blend.enabled = independant_blend.enabled; - - if (UpdateTie( - std::tie(cur_state.blend_color.red, cur_state.blend_color.green, - cur_state.blend_color.blue, cur_state.blend_color.alpha), - std::tie(blend_color.red, blend_color.green, blend_color.blue, blend_color.alpha))) { - glBlendColor(blend_color.red, blend_color.green, blend_color.blue, blend_color.alpha); - } } void OpenGLState::ApplyLogicOp() { diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 71a2cad2e..b06a88f01 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -81,13 +81,6 @@ public: bool enabled = false; } independant_blend; - struct { - GLclampf red = 0.0f; - GLclampf green = 0.0f; - GLclampf blue = 0.0f; - GLclampf alpha = 0.0f; - } blend_color; // GL_BLEND_COLOR - struct { bool enabled = false; // GL_LOGIC_OP_MODE GLenum operation = GL_COPY;