summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-11-23 01:17:29 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-11-23 01:28:50 +0100
commite3d7334be9c63e4aba7e90fec6c3bdedc743a785 (patch)
treee8a6f5ea742d750255c0ba7b283c758bb6c3c462 /src/video_core/renderer_opengl/gl_state.cpp
parentgl_rasterizer: Disable compute shaders on Intel (diff)
downloadyuzu-e3d7334be9c63e4aba7e90fec6c3bdedc743a785.tar
yuzu-e3d7334be9c63e4aba7e90fec6c3bdedc743a785.tar.gz
yuzu-e3d7334be9c63e4aba7e90fec6c3bdedc743a785.tar.bz2
yuzu-e3d7334be9c63e4aba7e90fec6c3bdedc743a785.tar.lz
yuzu-e3d7334be9c63e4aba7e90fec6c3bdedc743a785.tar.xz
yuzu-e3d7334be9c63e4aba7e90fec6c3bdedc743a785.tar.zst
yuzu-e3d7334be9c63e4aba7e90fec6c3bdedc743a785.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 4cf3d0a8a..39b3986d3 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]);
+ }
}
}
}