summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp13
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp9
-rw-r--r--src/video_core/renderer_opengl/gl_state.h6
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp1
4 files changed, 5 insertions, 24 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 5c5273b5d..9d4b351fb 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1156,15 +1156,10 @@ void RasterizerOpenGL::SyncBlendState() {
void RasterizerOpenGL::SyncLogicOpState() {
const auto& regs = system.GPU().Maxwell3D().regs;
- state.logic_op.enabled = regs.logic_op.enable != 0;
-
- if (!state.logic_op.enabled)
- return;
-
- ASSERT_MSG(regs.blend.enable[0] == 0,
- "Blending and logic op can't be enabled at the same time.");
-
- state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation);
+ oglEnable(GL_COLOR_LOGIC_OP, regs.logic_op.enable);
+ if (regs.logic_op.enable) {
+ glLogicOp(MaxwellToGL::LogicOp(regs.logic_op.operation));
+ }
}
void RasterizerOpenGL::SyncScissorTest(OpenGLState& current_state) {
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index e8463da7e..ddc534eb4 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -332,14 +332,6 @@ void OpenGLState::ApplyBlending() {
cur_state.independant_blend.enabled = independant_blend.enabled;
}
-void OpenGLState::ApplyLogicOp() {
- Enable(GL_COLOR_LOGIC_OP, cur_state.logic_op.enabled, logic_op.enabled);
-
- if (UpdateValue(cur_state.logic_op.operation, logic_op.operation)) {
- glLogicOp(logic_op.operation);
- }
-}
-
void OpenGLState::ApplyClipControl() {
if (UpdateTie(std::tie(cur_state.clip_control.origin, cur_state.clip_control.depth_mode),
std::tie(clip_control.origin, clip_control.depth_mode))) {
@@ -400,7 +392,6 @@ void OpenGLState::Apply() {
ApplyDepth();
ApplyPrimitiveRestart();
ApplyBlending();
- ApplyLogicOp();
ApplyTextures();
ApplySamplers();
ApplyImages();
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index b06a88f01..958af5771 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -81,11 +81,6 @@ public:
bool enabled = false;
} independant_blend;
- struct {
- bool enabled = false; // GL_LOGIC_OP_MODE
- GLenum operation = GL_COPY;
- } logic_op;
-
static constexpr std::size_t NumSamplers = 32 * 5;
static constexpr std::size_t NumImages = 8 * 5;
std::array<GLuint, NumSamplers> textures = {};
@@ -154,7 +149,6 @@ public:
void ApplyTargetBlending(std::size_t target, bool force);
void ApplyGlobalBlending();
void ApplyBlending();
- void ApplyLogicOp();
void ApplyTextures();
void ApplySamplers();
void ApplyImages();
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index affc6137a..104b11b0d 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -574,6 +574,7 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x,
// TODO: Signal state tracker about these changes
glEnable(GL_CULL_FACE);
+ glDisable(GL_COLOR_LOGIC_OP);
glDisable(GL_ALPHA_TEST);
glDisable(GL_POLYGON_OFFSET_FILL);
glCullFace(GL_BACK);