dri2_dpy->dri_screen = dri2_dpy->gbm_dri->screen;
dri2_dpy->core = dri2_dpy->gbm_dri->core;
dri2_dpy->dri2 = dri2_dpy->gbm_dri->dri2;
+ dri2_dpy->fence = dri2_dpy->gbm_dri->fence;
dri2_dpy->image = dri2_dpy->gbm_dri->image;
dri2_dpy->flush = dri2_dpy->gbm_dri->flush;
dri2_dpy->swrast = dri2_dpy->gbm_dri->swrast;
const char *name;
int version;
int offset;
+ int optional;
};
static struct dri_extension_match dri_core_extensions[] = {
{ __DRI2_FLUSH, 1, offsetof(struct gbm_dri_device, flush) },
{ __DRI_IMAGE, 1, offsetof(struct gbm_dri_device, image) },
+ { __DRI2_FENCE, 2, offsetof(struct gbm_dri_device, fence), 1 },
{ NULL, 0, 0 }
};
for (j = 0; matches[j].name; j++) {
field = ((char *) dri + matches[j].offset);
- if (*(const __DRIextension **) field == NULL) {
+ if ((*(const __DRIextension **) field == NULL) && !matches[j].optional) {
ret = -1;
}
}
const __DRIcoreExtension *core;
const __DRIdri2Extension *dri2;
+ const __DRI2fenceExtension *fence;
const __DRIimageExtension *image;
const __DRIswrastExtension *swrast;
const __DRI2flushExtension *flush;