return dri2_ctx->dri_context;
}
+static __DRIscreen *
+egl_dri3_get_dri_screen(void)
+{
+ _EGLContext *ctx = _eglGetCurrentContext();
+ struct dri2_egl_context *dri2_ctx;
+ if (!ctx)
+ return NULL;
+ dri2_ctx = dri2_egl_context(ctx);
+ return dri2_egl_display(dri2_ctx->base.Resource.Display)->dri_screen;
+}
+
static void
egl_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags)
{
.set_drawable_size = egl_dri3_set_drawable_size,
.in_current_context = egl_dri3_in_current_context,
.get_dri_context = egl_dri3_get_dri_context,
+ .get_dri_screen = egl_dri3_get_dri_screen,
.flush_drawable = egl_dri3_flush_drawable,
.show_fps = NULL,
};
loader_dri3_drawable_fini(&dri3_surf->loader_drawable);
+ dri2_fini_surface(surf);
free(surf);
return EGL_TRUE;
return NULL;
}
- if (!_eglInitSurface(&dri3_surf->surf.base, disp, type, conf, attrib_list))
+ if (!dri2_init_surface(&dri3_surf->surf.base, disp, type, conf, attrib_list, false))
goto cleanup_surf;
if (type == EGL_PBUFFER_BIT) {
case 24:
format = __DRI_IMAGE_FORMAT_XRGB8888;
break;
+ case 30:
+ format = __DRI_IMAGE_FORMAT_XRGB2101010;
+ break;
case 32:
format = __DRI_IMAGE_FORMAT_ARGB8888;
break;
dri2_img = malloc(sizeof *dri2_img);
if (!dri2_img) {
_eglError(EGL_BAD_ALLOC, "dri3_create_image_khr");
+ free(bp_reply);
return EGL_NO_IMAGE_KHR;
}
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
{
- (void) drv;
-
switch (target) {
case EGL_NATIVE_PIXMAP_KHR:
return dri3_create_image_khr_pixmap(disp, ctx, buffer, attr_list);