diff options
| author | 2018-04-17 12:25:24 -0400 | |
|---|---|---|
| committer | 2018-04-17 12:25:24 -0400 | |
| commit | 2b082e2710fa826bc9f4141ecf07da4eb302c3a9 (patch) | |
| tree | df113c7fe6ec783fff411ceae73aa1feda7f9ead /src | |
| parent | Various service name fixes - part 2 (rebased) (#322) (diff) | |
| parent | MaxwellToGL: Implemented tex wrap mode 1 (Wrap, GL_REPEAT). (diff) | |
| download | yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.tar.gz yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.tar.xz yuzu-2b082e2710fa826bc9f4141ecf07da4eb302c3a9.zip | |
Merge pull request #343 from Subv/tex_wrap_4
GPU: Implement some wrap modes
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 7 |
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) { | |||
| 86 | 86 | ||
| 87 | inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) { | 87 | inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) { |
| 88 | switch (wrap_mode) { | 88 | switch (wrap_mode) { |
| 89 | case Tegra::Texture::WrapMode::Wrap: | ||
| 90 | return GL_REPEAT; | ||
| 89 | case Tegra::Texture::WrapMode::ClampToEdge: | 91 | case Tegra::Texture::WrapMode::ClampToEdge: |
| 90 | return GL_CLAMP_TO_EDGE; | 92 | return GL_CLAMP_TO_EDGE; |
| 93 | case Tegra::Texture::WrapMode::ClampOGL: | ||
| 94 | // TODO(Subv): GL_CLAMP was removed as of OpenGL 3.1, to implement GL_CLAMP, we can use | ||
| 95 | // GL_CLAMP_TO_BORDER to get the border color of the texture, and then sample the edge to | ||
| 96 | // manually mix them. However the shader part of this is not yet implemented. | ||
| 97 | return GL_CLAMP_TO_BORDER; | ||
| 91 | } | 98 | } |
| 92 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode={}", | 99 | NGLOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode={}", |
| 93 | static_cast<u32>(wrap_mode)); | 100 | static_cast<u32>(wrap_mode)); |