diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 13 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 6 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 1 |
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() { | |||
| 1156 | void RasterizerOpenGL::SyncLogicOpState() { | 1156 | void RasterizerOpenGL::SyncLogicOpState() { |
| 1157 | const auto& regs = system.GPU().Maxwell3D().regs; | 1157 | const auto& regs = system.GPU().Maxwell3D().regs; |
| 1158 | 1158 | ||
| 1159 | state.logic_op.enabled = regs.logic_op.enable != 0; | 1159 | oglEnable(GL_COLOR_LOGIC_OP, regs.logic_op.enable); |
| 1160 | 1160 | if (regs.logic_op.enable) { | |
| 1161 | if (!state.logic_op.enabled) | 1161 | glLogicOp(MaxwellToGL::LogicOp(regs.logic_op.operation)); |
| 1162 | return; | 1162 | } |
| 1163 | |||
| 1164 | ASSERT_MSG(regs.blend.enable[0] == 0, | ||
| 1165 | "Blending and logic op can't be enabled at the same time."); | ||
| 1166 | |||
| 1167 | state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation); | ||
| 1168 | } | 1163 | } |
| 1169 | 1164 | ||
| 1170 | void RasterizerOpenGL::SyncScissorTest(OpenGLState& current_state) { | 1165 | 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() { | |||
| 332 | cur_state.independant_blend.enabled = independant_blend.enabled; | 332 | cur_state.independant_blend.enabled = independant_blend.enabled; |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | void OpenGLState::ApplyLogicOp() { | ||
| 336 | Enable(GL_COLOR_LOGIC_OP, cur_state.logic_op.enabled, logic_op.enabled); | ||
| 337 | |||
| 338 | if (UpdateValue(cur_state.logic_op.operation, logic_op.operation)) { | ||
| 339 | glLogicOp(logic_op.operation); | ||
| 340 | } | ||
| 341 | } | ||
| 342 | |||
| 343 | void OpenGLState::ApplyClipControl() { | 335 | void OpenGLState::ApplyClipControl() { |
| 344 | if (UpdateTie(std::tie(cur_state.clip_control.origin, cur_state.clip_control.depth_mode), | 336 | if (UpdateTie(std::tie(cur_state.clip_control.origin, cur_state.clip_control.depth_mode), |
| 345 | std::tie(clip_control.origin, clip_control.depth_mode))) { | 337 | std::tie(clip_control.origin, clip_control.depth_mode))) { |
| @@ -400,7 +392,6 @@ void OpenGLState::Apply() { | |||
| 400 | ApplyDepth(); | 392 | ApplyDepth(); |
| 401 | ApplyPrimitiveRestart(); | 393 | ApplyPrimitiveRestart(); |
| 402 | ApplyBlending(); | 394 | ApplyBlending(); |
| 403 | ApplyLogicOp(); | ||
| 404 | ApplyTextures(); | 395 | ApplyTextures(); |
| 405 | ApplySamplers(); | 396 | ApplySamplers(); |
| 406 | ApplyImages(); | 397 | 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: | |||
| 81 | bool enabled = false; | 81 | bool enabled = false; |
| 82 | } independant_blend; | 82 | } independant_blend; |
| 83 | 83 | ||
| 84 | struct { | ||
| 85 | bool enabled = false; // GL_LOGIC_OP_MODE | ||
| 86 | GLenum operation = GL_COPY; | ||
| 87 | } logic_op; | ||
| 88 | |||
| 89 | static constexpr std::size_t NumSamplers = 32 * 5; | 84 | static constexpr std::size_t NumSamplers = 32 * 5; |
| 90 | static constexpr std::size_t NumImages = 8 * 5; | 85 | static constexpr std::size_t NumImages = 8 * 5; |
| 91 | std::array<GLuint, NumSamplers> textures = {}; | 86 | std::array<GLuint, NumSamplers> textures = {}; |
| @@ -154,7 +149,6 @@ public: | |||
| 154 | void ApplyTargetBlending(std::size_t target, bool force); | 149 | void ApplyTargetBlending(std::size_t target, bool force); |
| 155 | void ApplyGlobalBlending(); | 150 | void ApplyGlobalBlending(); |
| 156 | void ApplyBlending(); | 151 | void ApplyBlending(); |
| 157 | void ApplyLogicOp(); | ||
| 158 | void ApplyTextures(); | 152 | void ApplyTextures(); |
| 159 | void ApplySamplers(); | 153 | void ApplySamplers(); |
| 160 | void ApplyImages(); | 154 | 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, | |||
| 574 | 574 | ||
| 575 | // TODO: Signal state tracker about these changes | 575 | // TODO: Signal state tracker about these changes |
| 576 | glEnable(GL_CULL_FACE); | 576 | glEnable(GL_CULL_FACE); |
| 577 | glDisable(GL_COLOR_LOGIC_OP); | ||
| 577 | glDisable(GL_ALPHA_TEST); | 578 | glDisable(GL_ALPHA_TEST); |
| 578 | glDisable(GL_POLYGON_OFFSET_FILL); | 579 | glDisable(GL_POLYGON_OFFSET_FILL); |
| 579 | glCullFace(GL_BACK); | 580 | glCullFace(GL_BACK); |