Browse Source
gl_state: Skip null texture binds
glBindTextureUnit doesn't support null textures. Skip binding these.
pull/15/merge
ReinUsesLisp
6 years ago
No known key found for this signature in database
GPG Key ID: 2DFC508897B39CFE
1 changed files with
5 additions and
1 deletions
-
src/video_core/renderer_opengl/gl_state.cpp
|
|
|
@ -420,7 +420,11 @@ void OpenGLState::ApplyTextures() { |
|
|
|
const std::size_t size = std::size(textures); |
|
|
|
for (std::size_t i = 0; i < size; ++i) { |
|
|
|
if (UpdateValue(cur_state.textures[i], textures[i])) { |
|
|
|
glBindTextureUnit(static_cast<GLuint>(i), textures[i]); |
|
|
|
// BindTextureUnit doesn't support binding null textures, skip those binds.
|
|
|
|
// TODO(Rodrigo): Stop using null textures
|
|
|
|
if (textures[i] != 0) { |
|
|
|
glBindTextureUnit(static_cast<GLuint>(i), textures[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|