EGLBoolean
dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
const __DRIconfig *config,
- struct dri2_egl_surface *dri2_surf)
+ struct dri2_egl_surface *dri2_surf,
+ void *loaderPrivate)
{
__DRIcreateNewDrawableFunc createNewDrawable;
- void *loaderPrivate = dri2_surf;
if (dri2_dpy->image_driver)
createNewDrawable = dri2_dpy->image_driver->createNewDrawable;
else
return _eglError(EGL_BAD_ALLOC, "no createNewDrawable");
- /* As always gbm is a bit special.. */
-#ifdef HAVE_DRM_PLATFORM
- if (dri2_surf->gbm_surf)
- loaderPrivate = dri2_surf->gbm_surf;
-#endif
-
dri2_surf->dri_drawable = (*createNewDrawable)(dri2_dpy->dri_screen,
config, loaderPrivate);
if (dri2_surf->dri_drawable == NULL)
EGLBoolean
dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
const __DRIconfig *config,
- struct dri2_egl_surface *dri2_surf);
+ struct dri2_egl_surface *dri2_surf,
+ void *loaderPrivate);
static inline uint64_t
combine_u32_into_u64(uint32_t hi, uint32_t lo)
goto cleanup_surface;
}
- if (!dri2_create_drawable(dri2_dpy, config, dri2_surf))
+ if (!dri2_create_drawable(dri2_dpy, config, dri2_surf, dri2_surf))
goto cleanup_surface;
if (window) {
goto cleanup_surface;
}
- if (!dri2_create_drawable(dri2_dpy, config, dri2_surf))
+ if (!dri2_create_drawable(dri2_dpy, config, dri2_surf, dri2_surf))
goto cleanup_surface;
if (conf->RedSize == 5)
dri2_surf->base.Height = surf->base.height;
surf->dri_private = dri2_surf;
- if (!dri2_create_drawable(dri2_dpy, config, dri2_surf))
+ if (!dri2_create_drawable(dri2_dpy, config, dri2_surf, dri2_surf->gbm_surf))
goto cleanup_surf;
return &dri2_surf->base;
goto cleanup_surface;
}
- if (!dri2_create_drawable(dri2_dpy, config, dri2_surf))
+ if (!dri2_create_drawable(dri2_dpy, config, dri2_surf, dri2_surf))
goto cleanup_surface;
if (conf->RedSize == 5)
if (dri2_dpy->flush)
dri2_surf->wl_win->resize_callback = resize_callback;
- if (!dri2_create_drawable(dri2_dpy, config, dri2_surf))
+ if (!dri2_create_drawable(dri2_dpy, config, dri2_surf, dri2_surf))
goto cleanup_surf_wrapper;
dri2_surf->base.SwapInterval = dri2_dpy->default_swap_interval;
goto cleanup_pixmap;
}
- if (!dri2_create_drawable(dri2_dpy, config, dri2_surf))
+ if (!dri2_create_drawable(dri2_dpy, config, dri2_surf, dri2_surf))
goto cleanup_pixmap;
if (type != EGL_PBUFFER_BIT) {