diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-30 03:34:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 03:34:00 +0100 |
commit | c5a849212f6a1ee2945e4584bcda50a082872336 (patch) | |
tree | 580b80a9c68c78f6e28b49bff2263fe421377972 /src/video_core/renderer_opengl/maxwell_to_gl.h | |
parent | Merge pull request #1617 from FearlessTobi/fix-stretch-delay (diff) | |
parent | Fixed black textures, pixelation and we no longer require to auto-generate mipmaps (diff) | |
download | yuzu-c5a849212f6a1ee2945e4584bcda50a082872336.tar yuzu-c5a849212f6a1ee2945e4584bcda50a082872336.tar.gz yuzu-c5a849212f6a1ee2945e4584bcda50a082872336.tar.bz2 yuzu-c5a849212f6a1ee2945e4584bcda50a082872336.tar.lz yuzu-c5a849212f6a1ee2945e4584bcda50a082872336.tar.xz yuzu-c5a849212f6a1ee2945e4584bcda50a082872336.tar.zst yuzu-c5a849212f6a1ee2945e4584bcda50a082872336.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/maxwell_to_gl.h')
-rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 0f6dcab2b..87d511c38 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -135,12 +135,29 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { return {}; } -inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode) { +inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode, + Tegra::Texture::TextureMipmapFilter mip_filter_mode) { switch (filter_mode) { - case Tegra::Texture::TextureFilter::Linear: - return GL_LINEAR; - case Tegra::Texture::TextureFilter::Nearest: - return GL_NEAREST; + case Tegra::Texture::TextureFilter::Linear: { + switch (mip_filter_mode) { + case Tegra::Texture::TextureMipmapFilter::None: + return GL_LINEAR; + case Tegra::Texture::TextureMipmapFilter::Nearest: + return GL_NEAREST_MIPMAP_LINEAR; + case Tegra::Texture::TextureMipmapFilter::Linear: + return GL_LINEAR_MIPMAP_LINEAR; + } + } + case Tegra::Texture::TextureFilter::Nearest: { + switch (mip_filter_mode) { + case Tegra::Texture::TextureMipmapFilter::None: + return GL_NEAREST; + case Tegra::Texture::TextureMipmapFilter::Nearest: + return GL_NEAREST_MIPMAP_NEAREST; + case Tegra::Texture::TextureMipmapFilter::Linear: + return GL_LINEAR_MIPMAP_NEAREST; + } + } } LOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode={}", static_cast<u32>(filter_mode)); |