summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-17 18:25:24 +0200
committerGitHub <noreply@github.com>2018-04-17 18:25:24 +0200
commit2b082e2710fa826bc9f4141ecf07da4eb302c3a9 (patch)
treedf113c7fe6ec783fff411ceae73aa1feda7f9ead /src/video_core
parentVarious service name fixes - part 2 (rebased) (#322) (diff)
parentMaxwellToGL: Implemented tex wrap mode 1 (Wrap, GL_REPEAT). (diff)
downloadyuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.tar
yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.tar.gz
yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.tar.bz2
yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.tar.lz
yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.tar.xz
yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.tar.zst
yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/maxwell_to_gl.h7
1 files changed, 7 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 632d14b78..aa5026cce 100644
--- a/src/video_core/renderer_opengl/maxwell_to_gl.h
+++ b/src/video_core/renderer_opengl/maxwell_to_gl.h
@@ -86,8 +86,15 @@ inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode) {
inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) {
switch (wrap_mode) {
+ case Tegra::Texture::WrapMode::Wrap:
+ return GL_REPEAT;
case Tegra::Texture::WrapMode::ClampToEdge:
return GL_CLAMP_TO_EDGE;
+ case Tegra::Texture::WrapMode::ClampOGL:
+ // TODO(Subv): GL_CLAMP was removed as of OpenGL 3.1, to implement GL_CLAMP, we can use
+ // GL_CLAMP_TO_BORDER to get the border color of the texture, and then sample the edge to
+ // manually mix them. However the shader part of this is not yet implemented.
+ return GL_CLAMP_TO_BORDER;
}
NGLOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode={}",
static_cast<u32>(wrap_mode));