diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index 1e5f7d753b2..1d870ed2fdc 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -1771,22 +1771,19 @@ void GPU_texture_unbind(GPUTexture *tex) void GPU_texture_unbind_all(void) { - /* Unbinding can be costly. Skip in normal condition. */ - if (G.debug & G_DEBUG_GPU) { - for (int i = 0; i < GPU_max_textures(); i++) { - glActiveTexture(GL_TEXTURE0 + i); - glBindTexture(GL_TEXTURE_2D, 0); - glBindTexture(GL_TEXTURE_2D_ARRAY, 0); - glBindTexture(GL_TEXTURE_1D, 0); - glBindTexture(GL_TEXTURE_1D_ARRAY, 0); - glBindTexture(GL_TEXTURE_3D, 0); - glBindTexture(GL_TEXTURE_CUBE_MAP, 0); - glBindTexture(GL_TEXTURE_BUFFER, 0); - if (GPU_arb_texture_cube_map_array_is_supported()) { - glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY_ARB, 0); - } - glBindSampler(i, 0); + for (int i = 0; i < GPU_max_textures(); i++) { + glActiveTexture(GL_TEXTURE0 + i); + glBindTexture(GL_TEXTURE_2D, 0); + glBindTexture(GL_TEXTURE_2D_ARRAY, 0); + glBindTexture(GL_TEXTURE_1D, 0); + glBindTexture(GL_TEXTURE_1D_ARRAY, 0); + glBindTexture(GL_TEXTURE_3D, 0); + glBindTexture(GL_TEXTURE_CUBE_MAP, 0); + glBindTexture(GL_TEXTURE_BUFFER, 0); + if (GPU_arb_texture_cube_map_array_is_supported()) { + glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY_ARB, 0); } + glBindSampler(i, 0); } } |