cogl: Add sync fd feature enum value
This is meant to tell whether cogl_context_get_latest_sync_fd() is supposed to work or not. It's enabled when ANDROID_native_fence_sync is exposed by the driver. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3771>
This commit is contained in:
@ -173,6 +173,8 @@ cogl_context_get_renderer (CoglContext *context);
|
||||
* expected to return age values other than 0.
|
||||
* @COGL_FEATURE_ID_BLIT_FRAMEBUFFER: Whether blitting using
|
||||
* cogl_blit_framebuffer() is supported.
|
||||
* @COGL_FEATURE_ID_SYNC_FD
|
||||
* cogl_context_get_latest_sync_fd() is supported.
|
||||
*
|
||||
* All the capabilities that can vary between different GPUs supported
|
||||
* by Cogl. Applications that depend on any of these features should explicitly
|
||||
@ -192,6 +194,7 @@ typedef enum _CoglFeatureID
|
||||
COGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL,
|
||||
COGL_FEATURE_ID_BLIT_FRAMEBUFFER,
|
||||
COGL_FEATURE_ID_TIMESTAMP_QUERY,
|
||||
COGL_FEATURE_ID_SYNC_FD,
|
||||
|
||||
/*< private >*/
|
||||
_COGL_N_FEATURE_IDS /*< skip >*/
|
||||
|
@ -511,6 +511,9 @@ _cogl_winsys_context_init (CoglContext *context, GError **error)
|
||||
_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_OES_EGL_SYNC))
|
||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_FENCE, TRUE);
|
||||
|
||||
if (egl_renderer->private_features & COGL_EGL_WINSYS_FEATURE_NATIVE_FENCE_SYNC)
|
||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_SYNC_FD, TRUE);
|
||||
|
||||
if (egl_renderer->private_features & COGL_EGL_WINSYS_FEATURE_BUFFER_AGE)
|
||||
{
|
||||
COGL_FLAGS_SET (context->winsys_features,
|
||||
|
Reference in New Issue
Block a user