forked from AuroraMiddleware/gtk
Merge branch 'wip/fencing-without-context-is-discouraged' into 'master'
x11: ensure some context is bound before calling glClientWaitSync See merge request GNOME/gtk!2138
This commit is contained in:
commit
1643e81c47
@ -606,6 +606,14 @@ on_gl_surface_xevent (GdkGLContext *context,
|
|||||||
{
|
{
|
||||||
GLenum wait_result;
|
GLenum wait_result;
|
||||||
|
|
||||||
|
/* We don't care if the passed context is the current context,
|
||||||
|
* necessarily, but we do care that *some* context is bound,
|
||||||
|
* otherwise, the GL dispatch layer will make glClientWaitSync()
|
||||||
|
* silently return 0.
|
||||||
|
*/
|
||||||
|
if (glXGetCurrentContext () == NULL)
|
||||||
|
gdk_gl_context_make_current (context);
|
||||||
|
|
||||||
wait_result = glClientWaitSync (context_x11->frame_fence, 0, 0);
|
wait_result = glClientWaitSync (context_x11->frame_fence, 0, 0);
|
||||||
|
|
||||||
switch (wait_result)
|
switch (wait_result)
|
||||||
|
Loading…
Reference in New Issue
Block a user