i965: implement querying __DRI_IMAGE_ATTRIB_OFFSET.
authorChuanbo Weng <chuanbo.weng@intel.com>
Tue, 13 Sep 2016 17:07:18 +0000 (01:07 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 21 Sep 2016 11:19:19 +0000 (12:19 +0100)
Implement querying this attribute in intelImageExtension and bump
version of intelImageExtension.

Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/intel_screen.c

index 5b21df6e7fad5f8232a2874a4b52b3c8cf796706..82d4203a344a558be63391f28fb16705357f4084 100644 (file)
@@ -609,6 +609,9 @@ intel_query_image(__DRIimage *image, int attrib, int *value)
    case __DRI_IMAGE_ATTRIB_NUM_PLANES:
       *value = 1;
       return true;
+   case __DRI_IMAGE_ATTRIB_OFFSET:
+      *value = image->offset;
+      return true;
 
   default:
       return false;
@@ -845,7 +848,7 @@ intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate)
 }
 
 static const __DRIimageExtension intelImageExtension = {
-    .base = { __DRI_IMAGE, 11 },
+    .base = { __DRI_IMAGE, 13 },
 
     .createImageFromName                = intel_create_image_from_name,
     .createImageFromRenderbuffer        = intel_create_image_from_renderbuffer,
@@ -860,7 +863,9 @@ static const __DRIimageExtension intelImageExtension = {
     .createImageFromFds                 = intel_create_image_from_fds,
     .createImageFromDmaBufs             = intel_create_image_from_dma_bufs,
     .blitImage                          = NULL,
-    .getCapabilities                    = NULL
+    .getCapabilities                    = NULL,
+    .mapImage                           = NULL,
+    .unmapImage                         = NULL,
 };
 
 static int