diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-22 06:35:31 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-08-23 17:08:49 +0200 |
commit | a4ac3bed6cfd8ea8c2f13eacc73412a3f7395d58 (patch) | |
tree | 37c8529b9f2037dfb2072a248e4d257edc6144d7 /src/video_core/renderer_opengl/maxwell_to_gl.h | |
parent | gl_rasterizer: Implement partial color clear and stencil clear. (diff) | |
download | yuzu-a4ac3bed6cfd8ea8c2f13eacc73412a3f7395d58.tar yuzu-a4ac3bed6cfd8ea8c2f13eacc73412a3f7395d58.tar.gz yuzu-a4ac3bed6cfd8ea8c2f13eacc73412a3f7395d58.tar.bz2 yuzu-a4ac3bed6cfd8ea8c2f13eacc73412a3f7395d58.tar.lz yuzu-a4ac3bed6cfd8ea8c2f13eacc73412a3f7395d58.tar.xz yuzu-a4ac3bed6cfd8ea8c2f13eacc73412a3f7395d58.tar.zst yuzu-a4ac3bed6cfd8ea8c2f13eacc73412a3f7395d58.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 24 |
1 files changed, 24 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 0343759a6..67273e164 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -295,6 +295,30 @@ inline GLenum ComparisonOp(Maxwell::ComparisonOp comparison) { return {}; } +inline GLenum StencilOp(Maxwell::StencilOp stencil) { + switch (stencil) { + case Maxwell::StencilOp::Keep: + return GL_KEEP; + case Maxwell::StencilOp::Zero: + return GL_ZERO; + case Maxwell::StencilOp::Replace: + return GL_REPLACE; + case Maxwell::StencilOp::Incr: + return GL_INCR; + case Maxwell::StencilOp::Decr: + return GL_DECR; + case Maxwell::StencilOp::Invert: + return GL_INVERT; + case Maxwell::StencilOp::IncrWrap: + return GL_INCR_WRAP; + case Maxwell::StencilOp::DecrWrap: + return GL_DECR_WRAP; + } + LOG_CRITICAL(Render_OpenGL, "Unimplemented stencil op={}", static_cast<u32>(stencil)); + UNREACHABLE(); + return {}; +} + inline GLenum FrontFace(Maxwell::Cull::FrontFace front_face) { switch (front_face) { case Maxwell::Cull::FrontFace::ClockWise: |