struct __DRIimageExtensionRec {
__DRIextension base;
- __DRIimage *(*createImageFromName)(__DRIcontext *context,
+ __DRIimage *(*createImageFromName)(__DRIscreen *screen,
int width, int height, int format,
int name, int pitch,
void *loaderPrivate);
EGLClientBuffer buffer, const EGLint *attr_list)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
struct dri2_egl_image *dri2_img;
unsigned int attachments[1];
xcb_drawable_t drawable;
stride = buffers[0].pitch / buffers[0].cpp;
dri2_img->dri_image =
- dri2_dpy->image->createImageFromName(dri2_ctx->dri_context,
+ dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
buffers_reply->width,
buffers_reply->height,
format,
EGLClientBuffer buffer, const EGLint *attr_list)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
struct dri2_egl_image *dri2_img;
EGLint width, height, format, name, stride, pitch, i, err;
}
dri2_img->dri_image =
- dri2_dpy->image->createImageFromName(dri2_ctx->dri_context,
+ dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
width,
height,
format,
}
static __DRIimage *
-dri2_create_image_from_name(__DRIcontext *context,
+dri2_create_image_from_name(__DRIscreen *_screen,
int width, int height, int format,
int name, int pitch, void *loaderPrivate)
{
- struct dri_screen *screen = dri_screen(context->driScreenPriv);
+ struct dri_screen *screen = dri_screen(_screen);
__DRIimage *img;
struct pipe_resource templ;
struct winsys_handle whandle;
};
static __DRIimage *
-intel_create_image_from_name(__DRIcontext *context,
+intel_create_image_from_name(__DRIscreen *screen,
int width, int height, int format,
int name, int pitch, void *loaderPrivate)
{
+ struct intel_screen *intelScreen = screen->private;
__DRIimage *image;
- struct intel_context *intel = context->driverPrivate;
int cpp;
image = CALLOC(sizeof *image);
image->data = loaderPrivate;
cpp = _mesa_get_format_bytes(image->format);
- image->region = intel_region_alloc_for_handle(intel->intelScreen,
+ image->region = intel_region_alloc_for_handle(intelScreen,
cpp, width, height,
pitch, name, "image");
if (image->region == NULL) {