if (image == NULL)
return NULL;
+ image->dri_format = format;
+
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565:
image->format = MESA_FORMAT_RGB565;
image->data = loaderPrivate;
intel_region_reference(&image->region, irb->mt->region);
+ switch (image->format) {
+ case MESA_FORMAT_RGB565:
+ image->dri_format = __DRI_IMAGE_FORMAT_RGB565;
+ break;
+ case MESA_FORMAT_XRGB8888:
+ image->dri_format = __DRI_IMAGE_FORMAT_XRGB8888;
+ break;
+ case MESA_FORMAT_ARGB8888:
+ image->dri_format = __DRI_IMAGE_FORMAT_ARGB8888;
+ break;
+ case MESA_FORMAT_RGBA8888_REV:
+ image->dri_format = __DRI_IMAGE_FORMAT_ABGR8888;
+ break;
+ }
+
return image;
}
}
image->internal_format = orig_image->internal_format;
+ image->dri_format = orig_image->dri_format;
image->format = orig_image->format;
image->data_type = orig_image->data_type;
image->data = loaderPrivate;