};
static struct dri_extension_match dri_core_extensions[] = {
- { __DRI2_FLUSH, 4, offsetof(struct gbm_dri_device, flush) },
+ { __DRI2_FLUSH, 1, offsetof(struct gbm_dri_device, flush) },
{ __DRI_IMAGE, 1, offsetof(struct gbm_dri_device, image) },
{ __DRI2_FENCE, 1, offsetof(struct gbm_dri_device, fence), 1 },
{ __DRI2_INTEROP, 1, offsetof(struct gbm_dri_device, interop), 1 },
* on the mapping context. Since there is no explicit gbm flush
* mechanism, we need to flush here.
*/
- dri->flush->flush_with_flags(dri->context, NULL, __DRI2_FLUSH_CONTEXT, 0);
+ if (dri->flush->base.version >= 4)
+ dri->flush->flush_with_flags(dri->context, NULL, __DRI2_FLUSH_CONTEXT, 0);
}