Fix: GPU: Hang on Mesa with --debug-gpu on opengl

Just workaround the issue.
This commit is contained in:
Clément Foucault
2025-06-16 12:44:11 +02:00
parent 2d490d47a4
commit 9ddc67166f

View File

@@ -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. */