From 0a296bb12f2d84b0004335bd6e73054af53982e9 Mon Sep 17 00:00:00 2001 From: jpark37 Date: Sat, 2 May 2020 11:48:24 -0700 Subject: [PATCH] libobs-opengl: Lock Mac parent context during present Parent context lock keeps GL commands serialized. Fixes race that causes crash when resizing multiview. --- libobs-opengl/gl-cocoa.m | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libobs-opengl/gl-cocoa.m b/libobs-opengl/gl-cocoa.m index 61cf46a7c..dd2a74969 100644 --- a/libobs-opengl/gl-cocoa.m +++ b/libobs-opengl/gl-cocoa.m @@ -292,8 +292,6 @@ void device_present(gs_device_t *device) glFlush(); [NSOpenGLContext clearCurrentContext]; - CGLUnlockContext([device->plat->context CGLContextObj]); - CGLLockContext([device->cur_swap->wi->context CGLContextObj]); [device->cur_swap->wi->context makeCurrentContext]; @@ -309,8 +307,6 @@ void device_present(gs_device_t *device) CGLUnlockContext([device->cur_swap->wi->context CGLContextObj]); - CGLLockContext([device->plat->context CGLContextObj]); - [device->plat->context makeCurrentContext]; }