From 53a806f6dffb2a778e383a82c3d0cdb6e9d9d552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 1 Sep 2020 02:41:29 +0200 Subject: GPU: Move UBO binding validation to GL backend This also make the validation quicker by tracking the currently bound slots. --- source/blender/gpu/opengl/gl_debug.hh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/gpu/opengl/gl_debug.hh') diff --git a/source/blender/gpu/opengl/gl_debug.hh b/source/blender/gpu/opengl/gl_debug.hh index 47c9558f13a..dd98505ebc1 100644 --- a/source/blender/gpu/opengl/gl_debug.hh +++ b/source/blender/gpu/opengl/gl_debug.hh @@ -31,7 +31,14 @@ namespace debug { # define GL_CHECK_ERROR(info) #endif +#ifdef DEBUG +# define GL_CHECK_RESOURCES(info) debug::check_gl_resources(info) +#else +# define GL_CHECK_RESOURCES(info) +#endif + void check_gl_error(const char *info); +void check_gl_resources(const char *info); void init_gl_callbacks(void); } // namespace debug -- cgit v1.2.3