[Mesa-dev] [PATCH 05/13] dri: support DRIimage creation from dmabufs with modifiers

Varad Gautam varadgautam at gmail.com
Tue Nov 15 14:24:26 UTC 2016


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

add createImageFromDmaBufs2 function which accepts per-plane dmabuf
format modifiers.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Signed-off-by: Varad Gautam <varad.gautam at collabora.com>
---
 include/GL/internal/dri_interface.h | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index d0b1bc6..4874e59 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -1094,7 +1094,8 @@ struct __DRIdri2ExtensionRec {
  * extensions.
  */
 #define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 13
+#define __DRI_IMAGE_VERSION 14
+
 
 /**
  * These formats correspond to the similarly named MESA_FORMAT_*
@@ -1420,6 +1421,24 @@ struct __DRIimageExtensionRec {
     */
    void (*unmapImage)(__DRIcontext *context, __DRIimage *image, void *data);
 
+   /*
+    * Like createImageFromDmaBufs, but takes also format modifiers.
+    *
+    * For EGL_EXT_image_dma_buf_import_modifiers.
+    *
+    * \since 14
+    */
+   __DRIimage *(*createImageFromDmaBufs2)(__DRIscreen *screen,
+                                          int width, int height, int fourcc,
+                                          int *fds, int num_fds,
+                                          int *strides, int *offsets,
+                                          uint64_t *modifiers,
+                                          enum __DRIYUVColorSpace color_space,
+                                          enum __DRISampleRange sample_range,
+                                          enum __DRIChromaSiting horiz_siting,
+                                          enum __DRIChromaSiting vert_siting,
+                                          unsigned *error,
+                                          void *loaderPrivate);
 };
 
 
-- 
2.6.2



More information about the mesa-dev mailing list