[Bf-blender-cvs] [7af40ccf5f2] master: GPU: Fix crash when using EGL with --gpu-debug flag.
Jeroen Bakker
noreply at git.blender.org
Tue Jul 6 14:26:53 CEST 2021
Commit: 7af40ccf5f22795da4122ac20c966a352cae4eaf
Author: Jeroen Bakker
Date: Tue Jul 6 13:24:08 2021 +0200
Branches: master
https://developer.blender.org/rB7af40ccf5f22795da4122ac20c966a352cae4eaf
GPU: Fix crash when using EGL with --gpu-debug flag.
During initialization of the platform a debug message is generated and
interpreted by de callback. Here the platform is checked what requires
an initialized platform.
Fixed by giving the platform check less priority in the check.
===================================================================
M source/blender/gpu/opengl/gl_debug.cc
===================================================================
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index ac42a950945..3e259235515 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -81,9 +81,11 @@ static void APIENTRY debug_callback(GLenum UNUSED(source),
return;
}
- if (TRIM_NVIDIA_BUFFER_INFO &&
- GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_OFFICIAL) &&
- STRPREFIX(message, "Buffer detailed info")) {
+ /* NOTE: callback function can be triggered during before the platform is initialized.
+ * In this case invoking `GPU_type_matches` would fail and
+ * therefore the message is checked before the platform matching. */
+ if (TRIM_NVIDIA_BUFFER_INFO && STRPREFIX(message, "Buffer detailed info") &&
+ GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_OFFICIAL)) {
/** Suppress buffer infos flooding the output. */
return;
}
More information about the Bf-blender-cvs
mailing list