diff --git a/source/blender/gpu/intern/gpu_shader_builtin.cc b/source/blender/gpu/intern/gpu_shader_builtin.cc index b960fc4d4d6..4135c61046d 100644 --- a/source/blender/gpu/intern/gpu_shader_builtin.cc +++ b/source/blender/gpu/intern/gpu_shader_builtin.cc @@ -6,6 +6,7 @@ * \ingroup gpu */ +#include "BKE_global.hh" #include "BLI_utildefines.h" #include "GPU_capabilities.hh" @@ -236,6 +237,12 @@ GPUShader *GPU_shader_get_builtin_shader(eGPUBuiltinShader shader) void GPU_shader_builtin_warm_up() { + if ((G.debug & G_DEBUG_GPU) && (GPU_backend_get_type() == GPU_BACKEND_OPENGL)) { + /* On some system (Mesa OpenGL), doing this warm up seems to breaks something related to debug + * hooks and makes the Blender application hang. */ + return; + } + if (GPU_use_subprocess_compilation() && (GPU_backend_get_type() == GPU_BACKEND_OPENGL)) { /* The overhead of creating the subprocesses at this exact moment can create bubbles during the * startup process. It is usually fast enough on OpenGL that we can skip it. */