summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/maxwell_to_gl.h
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2018-09-19 07:18:20 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2018-10-06 17:27:54 +0200
commit752faff2bcfa536a9efc81416156b1d42d05a2cc (patch)
treec048696cd6e5a7798ef5985662d30d197a8d90e1 /src/video_core/renderer_opengl/maxwell_to_gl.h
parentImplemented Texture Processing Modes in TEXS and TLDS (diff)
downloadyuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.gz
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.bz2
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.lz
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.xz
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.zst
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.zip
Diffstat (limited to 'src/video_core/renderer_opengl/maxwell_to_gl.h')
-rw-r--r--src/video_core/renderer_opengl/maxwell_to_gl.h25
1 files changed, 25 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 67273e164..3c3bcaae4 100644
--- a/src/video_core/renderer_opengl/maxwell_to_gl.h
+++ b/src/video_core/renderer_opengl/maxwell_to_gl.h
@@ -159,6 +159,31 @@ inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) {
return {};
}
+inline GLenum DepthCompareFunc(Tegra::Texture::DepthCompareFunc func) {
+ switch (func) {
+ case Tegra::Texture::DepthCompareFunc::Never:
+ return GL_NEVER;
+ case Tegra::Texture::DepthCompareFunc::Less:
+ return GL_LESS;
+ case Tegra::Texture::DepthCompareFunc::LessEqual:
+ return GL_LEQUAL;
+ case Tegra::Texture::DepthCompareFunc::Equal:
+ return GL_EQUAL;
+ case Tegra::Texture::DepthCompareFunc::NotEqual:
+ return GL_NOTEQUAL;
+ case Tegra::Texture::DepthCompareFunc::Greater:
+ return GL_GREATER;
+ case Tegra::Texture::DepthCompareFunc::GreaterEqual:
+ return GL_GEQUAL;
+ case Tegra::Texture::DepthCompareFunc::Always:
+ return GL_ALWAYS;
+ }
+ LOG_CRITICAL(Render_OpenGL, "Unimplemented texture depth compare function ={}",
+ static_cast<u32>(func));
+ UNREACHABLE();
+ return {};
+}
+
inline GLenum BlendEquation(Maxwell::Blend::Equation equation) {
switch (equation) {
case Maxwell::Blend::Equation::Add: