cogl: Fix build error when GL_ARB_sync is not defined

Commit 41992757e0 introduced a change to use CoglContext.glFenceSync
but this method is only available when GL_ARB_sync is defined (as
defined on gl-prototypes/cogl-all-functions.h).

This change fixes that.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1123
This commit is contained in:
Andre Moreira Magalhaes 2020-03-12 17:49:11 -03:00
parent df33255162
commit 6989fea767

View File

@ -366,8 +366,10 @@ _cogl_driver_update_features (CoglContext *context,
_cogl_check_extension ("GL_OES_egl_sync", gl_extensions)) _cogl_check_extension ("GL_OES_egl_sync", gl_extensions))
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_OES_EGL_SYNC, TRUE); COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_OES_EGL_SYNC, TRUE);
#ifdef GL_ARB_sync
if (context->glFenceSync) if (context->glFenceSync)
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_FENCE, TRUE); COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_FENCE, TRUE);
#endif
if (_cogl_check_extension ("GL_EXT_texture_rg", gl_extensions)) if (_cogl_check_extension ("GL_EXT_texture_rg", gl_extensions))
COGL_FLAGS_SET (context->features, COGL_FLAGS_SET (context->features,