Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-05 18:36:13 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-05 18:49:14 +0300
commit71872e3809fda6a18f76e0a6e5cb6b268dcbf0fa (patch)
tree8950ed6203fbf6aa6f2d6ce46d99702fa1ddb317 /source/blender/gpu/opengl/gl_state.cc
parent14926a81b622bd9d37a6d7f90747f431ae070e64 (diff)
GLTexture: Add Feedback loop check
The check is better than before as we take into consideration the attached mip level.
Diffstat (limited to 'source/blender/gpu/opengl/gl_state.cc')
-rw-r--r--source/blender/gpu/opengl/gl_state.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc
index 20d6d608f78..a97768e5d44 100644
--- a/source/blender/gpu/opengl/gl_state.cc
+++ b/source/blender/gpu/opengl/gl_state.cc
@@ -434,6 +434,9 @@ void GLStateManager::texture_bind(Texture *tex_, eGPUSamplerState sampler_type,
{
BLI_assert(unit < GPU_max_textures());
GLTexture *tex = static_cast<GLTexture *>(tex_);
+ if (G.debug & G_DEBUG_GPU) {
+ tex->check_feedback_loop();
+ }
/* Eliminate redundant binds. */
if ((textures_[unit] == tex->tex_id_) &&
(samplers_[unit] == GLTexture::samplers_[sampler_type])) {