VERY experimental Nintendo Switch 2 emulator
C++
gl_state: Skip null texture binds
ReinUsesLispfb6a01233fd8
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cppindex 4cf3d0a8a3..39b3986d32 100644--- a/src/video_core/renderer_opengl/gl_state.cpp+++ b/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]);+ }}}}