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/gl_rasterizer.cpp | |
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/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index b23b8fb29..2e90ebcf4 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -681,6 +681,14 @@ u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, GLuint program, Surface surface = res_cache.GetTextureSurface(texture); if (surface != nullptr) { state.texture_units[current_bindpoint].texture_2d = surface->texture.handle; + state.texture_units[current_bindpoint].swizzle.r = + MaxwellToGL::SwizzleSource(texture.tic.x_source); + state.texture_units[current_bindpoint].swizzle.g = + MaxwellToGL::SwizzleSource(texture.tic.y_source); + state.texture_units[current_bindpoint].swizzle.b = + MaxwellToGL::SwizzleSource(texture.tic.z_source); + state.texture_units[current_bindpoint].swizzle.a = + MaxwellToGL::SwizzleSource(texture.tic.w_source); } else { // Can occur when texture addr is null or its memory is unmapped/invalid state.texture_units[current_bindpoint].texture_2d = 0; |