diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-19 22:04:58 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-19 22:07:56 +0200 |
commit | d74cb1653532435f04648f2f8450f9a60f4b39e2 (patch) | |
tree | 237da44c693ceed96eae015ab4a509ed23c99396 /src/video_core | |
parent | Merge pull request #2397 from lioncash/thread-unused (diff) | |
download | yuzu-d74cb1653532435f04648f2f8450f9a60f4b39e2.tar yuzu-d74cb1653532435f04648f2f8450f9a60f4b39e2.tar.gz yuzu-d74cb1653532435f04648f2f8450f9a60f4b39e2.tar.bz2 yuzu-d74cb1653532435f04648f2f8450f9a60f4b39e2.tar.lz yuzu-d74cb1653532435f04648f2f8450f9a60f4b39e2.tar.xz yuzu-d74cb1653532435f04648f2f8450f9a60f4b39e2.tar.zst yuzu-d74cb1653532435f04648f2f8450f9a60f4b39e2.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 52d569a1b..7425fbe5d 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -471,8 +471,9 @@ void OpenGLState::ApplyTextures() const { const auto& texture_unit = texture_units[i]; auto& cur_state_texture_unit = cur_state.texture_units[i]; textures[i] = texture_unit.texture; - if (cur_state_texture_unit.texture == textures[i]) + if (cur_state_texture_unit.texture == textures[i]) { continue; + } cur_state_texture_unit.texture = textures[i]; if (!has_delta) { first = i; @@ -493,10 +494,11 @@ void OpenGLState::ApplySamplers() const { std::array<GLuint, Maxwell::NumTextureSamplers> samplers; for (std::size_t i = 0; i < std::size(samplers); ++i) { - if (cur_state.texture_units[i].sampler == texture_units[i].sampler) + samplers[i] = texture_units[i].sampler; + if (cur_state.texture_units[i].sampler == texture_units[i].sampler) { continue; + } cur_state.texture_units[i].sampler = texture_units[i].sampler; - samplers[i] = texture_units[i].sampler; if (!has_delta) { first = i; has_delta = true; |