summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp8
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 {
471 const auto& texture_unit = texture_units[i]; 471 const auto& texture_unit = texture_units[i];
472 auto& cur_state_texture_unit = cur_state.texture_units[i]; 472 auto& cur_state_texture_unit = cur_state.texture_units[i];
473 textures[i] = texture_unit.texture; 473 textures[i] = texture_unit.texture;
474 if (cur_state_texture_unit.texture == textures[i]) 474 if (cur_state_texture_unit.texture == textures[i]) {
475 continue; 475 continue;
476 }
476 cur_state_texture_unit.texture = textures[i]; 477 cur_state_texture_unit.texture = textures[i];
477 if (!has_delta) { 478 if (!has_delta) {
478 first = i; 479 first = i;
@@ -493,10 +494,11 @@ void OpenGLState::ApplySamplers() const {
493 std::array<GLuint, Maxwell::NumTextureSamplers> samplers; 494 std::array<GLuint, Maxwell::NumTextureSamplers> samplers;
494 495
495 for (std::size_t i = 0; i < std::size(samplers); ++i) { 496 for (std::size_t i = 0; i < std::size(samplers); ++i) {
496 if (cur_state.texture_units[i].sampler == texture_units[i].sampler) 497 samplers[i] = texture_units[i].sampler;
498 if (cur_state.texture_units[i].sampler == texture_units[i].sampler) {
497 continue; 499 continue;
500 }
498 cur_state.texture_units[i].sampler = texture_units[i].sampler; 501 cur_state.texture_units[i].sampler = texture_units[i].sampler;
499 samplers[i] = texture_units[i].sampler;
500 if (!has_delta) { 502 if (!has_delta) {
501 first = i; 503 first = i;
502 has_delta = true; 504 has_delta = true;