diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-07 03:02:27 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-30 23:10:35 +0100 |
commit | 704744bb72972f99fa992e286b3de5967b48af37 (patch) | |
tree | d3e7f51187daf4bba5f93df6cb72503961d210d0 /src/video_core/renderer_opengl/gl_state.cpp | |
parent | gl_state: Use DSA and multi bind to update texture bindings (diff) | |
download | yuzu-704744bb72972f99fa992e286b3de5967b48af37.tar yuzu-704744bb72972f99fa992e286b3de5967b48af37.tar.gz yuzu-704744bb72972f99fa992e286b3de5967b48af37.tar.bz2 yuzu-704744bb72972f99fa992e286b3de5967b48af37.tar.lz yuzu-704744bb72972f99fa992e286b3de5967b48af37.tar.xz yuzu-704744bb72972f99fa992e286b3de5967b48af37.tar.zst yuzu-704744bb72972f99fa992e286b3de5967b48af37.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 997325efc..81af803bc 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -463,7 +463,8 @@ void OpenGLState::ApplyPolygonOffset() const { void OpenGLState::ApplyTextures() const { bool has_delta{}; - std::size_t first{}, last{}; + std::size_t first{}; + std::size_t last{}; std::array<GLuint, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> textures; for (std::size_t i = 0; i < std::size(texture_units); ++i) { @@ -478,16 +479,6 @@ void OpenGLState::ApplyTextures() const { } last = i; } - - // Update the texture swizzle - if (textures[i] != 0 && (texture_unit.swizzle.r != cur_state_texture_unit.swizzle.r || - texture_unit.swizzle.g != cur_state_texture_unit.swizzle.g || - texture_unit.swizzle.b != cur_state_texture_unit.swizzle.b || - texture_unit.swizzle.a != cur_state_texture_unit.swizzle.a)) { - std::array<GLint, 4> mask = {texture_unit.swizzle.r, texture_unit.swizzle.g, - texture_unit.swizzle.b, texture_unit.swizzle.a}; - glTextureParameteriv(texture_unit.texture, GL_TEXTURE_SWIZZLE_RGBA, mask.data()); - } } if (has_delta) { @@ -498,7 +489,8 @@ void OpenGLState::ApplyTextures() const { void OpenGLState::ApplySamplers() const { bool has_delta{}; - std::size_t first{}, last{}; + std::size_t first{}; + std::size_t last{}; std::array<GLuint, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> samplers; for (std::size_t i = 0; i < std::size(samplers); ++i) { samplers[i] = texture_units[i].sampler; |