}
static __DRIimage *
-intel_create_image(__DRIscreen *dri_screen,
- int width, int height, int format,
- unsigned int use,
- void *loaderPrivate)
+intel_create_image_common(__DRIscreen *dri_screen,
+ int width, int height, int format,
+ unsigned int use,
+ const uint64_t *modifiers,
+ unsigned count,
+ void *loaderPrivate)
{
__DRIimage *image;
struct intel_screen *screen = dri_screen->driverPrivate;
int cpp;
unsigned long pitch;
+ /* Callers of this may specify a modifier, or a dri usage, but not both. The
+ * newer modifier interface deprecates the older usage flags newer modifier
+ * interface deprecates the older usage flags.
+ */
+ assert(!(use && count));
+
tiling = I915_TILING_X;
if (use & __DRI_IMAGE_USE_CURSOR) {
if (width != 64 || height != 64)
return image;
}
+static __DRIimage *
+intel_create_image(__DRIscreen *dri_screen,
+ int width, int height, int format,
+ unsigned int use,
+ void *loaderPrivate)
+{
+ return intel_create_image_common(dri_screen, width, height, format, use, NULL, 0,
+ loaderPrivate);
+}
+
+static __DRIimage *
+intel_create_image_with_modifiers(__DRIscreen *dri_screen,
+ int width, int height, int format,
+ const uint64_t *modifiers,
+ const unsigned count,
+ void *loaderPrivate)
+{
+ return intel_create_image_common(dri_screen, width, height, format, 0, NULL,
+ 0, loaderPrivate);
+}
+
static GLboolean
intel_query_image(__DRIimage *image, int attrib, int *value)
{
.getCapabilities = NULL,
.mapImage = NULL,
.unmapImage = NULL,
+ .createImageWithModifiers = intel_create_image_with_modifiers,
};
static int