diff options
author | Subv <subv2112@gmail.com> | 2018-06-07 01:28:09 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-06-07 01:36:15 +0200 |
commit | 47629c89a872cb35919b1d264973e8d6633bb654 (patch) | |
tree | 13cd7b27b562641e0eafe15df637f2f5d09e70fe /src/video_core/renderer_opengl/maxwell_to_gl.h | |
parent | GLState: Support changing the GL_TEXTURE_SWIZZLE parameter of each texture unit. (diff) | |
download | yuzu-47629c89a872cb35919b1d264973e8d6633bb654.tar yuzu-47629c89a872cb35919b1d264973e8d6633bb654.tar.gz yuzu-47629c89a872cb35919b1d264973e8d6633bb654.tar.bz2 yuzu-47629c89a872cb35919b1d264973e8d6633bb654.tar.lz yuzu-47629c89a872cb35919b1d264973e8d6633bb654.tar.xz yuzu-47629c89a872cb35919b1d264973e8d6633bb654.tar.zst yuzu-47629c89a872cb35919b1d264973e8d6633bb654.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 | 21 |
1 files changed, 21 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 cf11983cf..2155fb019 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -180,4 +180,25 @@ inline GLenum BlendFunc(Maxwell::Blend::Factor factor) { return {}; } +inline GLenum SwizzleSource(Tegra::Texture::SwizzleSource source) { + switch (source) { + case Tegra::Texture::SwizzleSource::Zero: + return GL_ZERO; + case Tegra::Texture::SwizzleSource::R: + return GL_RED; + case Tegra::Texture::SwizzleSource::G: + return GL_GREEN; + case Tegra::Texture::SwizzleSource::B: + return GL_BLUE; + case Tegra::Texture::SwizzleSource::A: + return GL_ALPHA; + case Tegra::Texture::SwizzleSource::OneInt: + case Tegra::Texture::SwizzleSource::OneFloat: + return GL_ONE; + } + NGLOG_CRITICAL(Render_OpenGL, "Unimplemented swizzle source={}", static_cast<u32>(source)); + UNREACHABLE(); + return {}; +} + } // namespace MaxwellToGL |