summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-03-27 04:41:05 +0200
committerJames Rowe <jroweboy@gmail.com>2018-04-07 04:40:23 +0200
commitf73a280eebbd729f70b6e3b807440f1b6ea3340a (patch)
tree90182a01f56af8af6b6de57de90080ccc282a578
parentTextures: Added a helper function to know if a texture is blocklinear or pitch. (diff)
downloadyuzu-f73a280eebbd729f70b6e3b807440f1b6ea3340a.tar
yuzu-f73a280eebbd729f70b6e3b807440f1b6ea3340a.tar.gz
yuzu-f73a280eebbd729f70b6e3b807440f1b6ea3340a.tar.bz2
yuzu-f73a280eebbd729f70b6e3b807440f1b6ea3340a.tar.lz
yuzu-f73a280eebbd729f70b6e3b807440f1b6ea3340a.tar.xz
yuzu-f73a280eebbd729f70b6e3b807440f1b6ea3340a.tar.zst
yuzu-f73a280eebbd729f70b6e3b807440f1b6ea3340a.zip
-rw-r--r--src/video_core/renderer_opengl/maxwell_to_gl.h23
1 files changed, 23 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 d847317ac..48ee80125 100644
--- a/src/video_core/renderer_opengl/maxwell_to_gl.h
+++ b/src/video_core/renderer_opengl/maxwell_to_gl.h
@@ -47,4 +47,27 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) {
return {};
}
+inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode) {
+ switch (filter_mode) {
+ case Tegra::Texture::TextureFilter::Linear:
+ return GL_LINEAR;
+ case Tegra::Texture::TextureFilter::Nearest:
+ return GL_NEAREST;
+ }
+ LOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode=%u",
+ static_cast<u32>(filter_mode));
+ UNREACHABLE();
+ return {};
+}
+
+inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) {
+ switch (wrap_mode) {
+ case Tegra::Texture::WrapMode::ClampToEdge:
+ return GL_CLAMP_TO_EDGE;
+ }
+ LOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode=%u", static_cast<u32>(wrap_mode));
+ UNREACHABLE();
+ return {};
+}
+
} // namespace MaxwellToGL