[Bf-blender-cvs] [8d25aeb6a63] cycles-x: Fix T91489: Cycles X crash when running with MESA_NO_ERROR
Brecht Van Lommel
noreply at git.blender.org
Fri Sep 17 19:29:13 CEST 2021
Commit: 8d25aeb6a631fc941be72827134dec5b589e9ed4
Author: Brecht Van Lommel
Date: Fri Sep 17 19:22:46 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB8d25aeb6a631fc941be72827134dec5b589e9ed4
Fix T91489: Cycles X crash when running with MESA_NO_ERROR
===================================================================
M intern/cycles/blender/blender_gpu_display.cpp
===================================================================
diff --git a/intern/cycles/blender/blender_gpu_display.cpp b/intern/cycles/blender/blender_gpu_display.cpp
index 5d3ae9ea4bc..a79232af71f 100644
--- a/intern/cycles/blender/blender_gpu_display.cpp
+++ b/intern/cycles/blender/blender_gpu_display.cpp
@@ -309,7 +309,9 @@ bool BlenderGPUDisplay::do_update_begin(const GPUDisplayParams ¶ms,
return false;
}
- glWaitSync((GLsync)gl_render_sync_, 0, GL_TIMEOUT_IGNORED);
+ if (gl_render_sync_) {
+ glWaitSync((GLsync)gl_render_sync_, 0, GL_TIMEOUT_IGNORED);
+ }
if (!gl_texture_resources_ensure()) {
gl_context_disable();
@@ -492,7 +494,9 @@ void BlenderGPUDisplay::do_draw(const GPUDisplayParams ¶ms)
gl_context_mutex_.lock();
}
- glWaitSync((GLsync)gl_upload_sync_, 0, GL_TIMEOUT_IGNORED);
+ if (gl_upload_sync_) {
+ glWaitSync((GLsync)gl_upload_sync_, 0, GL_TIMEOUT_IGNORED);
+ }
if (transparent) {
glEnable(GL_BLEND);
More information about the Bf-blender-cvs
mailing list