diff options
author | Subv <subv2112@gmail.com> | 2018-08-21 01:44:47 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-08-21 01:44:47 +0200 |
commit | 2b9eee4d1ed13e98de21d88d8920288b58d7f4eb (patch) | |
tree | 81069cd0009f52ea42087bc332c3adf0a2951155 /src/video_core/renderer_opengl/maxwell_to_gl.h | |
parent | GLState: Allow enabling/disabling GL_COLOR_LOGIC_OP independently from blending. (diff) | |
download | yuzu-2b9eee4d1ed13e98de21d88d8920288b58d7f4eb.tar yuzu-2b9eee4d1ed13e98de21d88d8920288b58d7f4eb.tar.gz yuzu-2b9eee4d1ed13e98de21d88d8920288b58d7f4eb.tar.bz2 yuzu-2b9eee4d1ed13e98de21d88d8920288b58d7f4eb.tar.lz yuzu-2b9eee4d1ed13e98de21d88d8920288b58d7f4eb.tar.xz yuzu-2b9eee4d1ed13e98de21d88d8920288b58d7f4eb.tar.zst yuzu-2b9eee4d1ed13e98de21d88d8920288b58d7f4eb.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 5d91a0c2f..ff2f7b8b6 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -317,4 +317,44 @@ inline GLenum CullFace(Maxwell::Cull::CullFace cull_face) { return {}; } +inline GLenum LogicOp(Maxwell::LogicOperation operation) { + switch (operation) { + case Maxwell::LogicOperation::Clear: + return GL_CLEAR; + case Maxwell::LogicOperation::And: + return GL_AND; + case Maxwell::LogicOperation::AndReverse: + return GL_AND_REVERSE; + case Maxwell::LogicOperation::Copy: + return GL_COPY; + case Maxwell::LogicOperation::AndInverted: + return GL_AND_INVERTED; + case Maxwell::LogicOperation::NoOp: + return GL_NOOP; + case Maxwell::LogicOperation::Xor: + return GL_XOR; + case Maxwell::LogicOperation::Or: + return GL_OR; + case Maxwell::LogicOperation::Nor: + return GL_NOR; + case Maxwell::LogicOperation::Equiv: + return GL_EQUIV; + case Maxwell::LogicOperation::Invert: + return GL_INVERT; + case Maxwell::LogicOperation::OrReverse: + return GL_OR_REVERSE; + case Maxwell::LogicOperation::CopyInverted: + return GL_COPY_INVERTED; + case Maxwell::LogicOperation::OrInverted: + return GL_OR_INVERTED; + case Maxwell::LogicOperation::Nand: + return GL_NAND; + case Maxwell::LogicOperation::Set: + return GL_SET; + } + LOG_CRITICAL(Render_OpenGL, "Unimplemented logic operation={}", static_cast<u32>(operation)); + UNREACHABLE(); + return {}; +} + } // namespace MaxwellToGL |