Re: [Mesa-dev] [PATCH v13 03/36] dri: support DRIimage creation from dmabufs with modifiers

2017-05-19 Thread Jason Ekstrand
On Fri, May 19, 2017 at 2:37 AM, Daniel Stone  wrote:

> From: Pekka Paalanen 
>
> add createImageFromDmaBufs2 function which accepts per-plane dmabuf
> format modifiers.
>
> Signed-off-by: Pekka Paalanen 
> Signed-off-by: Varad Gautam 
> Reviewed-by: Daniel Stone 
> Signed-off-by: Daniel Stone 
> ---
>  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 c83056aa70..53b95dd93d 100644
> --- a/include/GL/internal/dri_interface.h
> +++ b/include/GL/internal/dri_interface.h
> @@ -1137,7 +1137,7 @@ struct __DRIdri2ExtensionRec {
>   * extensions.
>   */
>  #define __DRI_IMAGE "DRI_IMAGE"
> -#define __DRI_IMAGE_VERSION 14
> +#define __DRI_IMAGE_VERSION 15
>
>  /**
>   * These formats correspond to the similarly named MESA_FORMAT_*
> @@ -1494,6 +1494,25 @@ struct __DRIimageExtensionRec {
> const uint64_t *modifiers,
> const unsigned int
> modifier_count,
> void *loaderPrivate);
> +
> +   /*
> +* Like createImageFromDmaBufs, but takes also format modifiers.
> +*
> +* For EGL_EXT_image_dma_buf_import_modifiers.
> +*
> +* \since 15
> +*/
> +   __DRIimage *(*createImageFromDmaBufs2)(__DRIscreen *screen,
> +  int width, int height, int
> fourcc,
> +  int *fds, int num_fds,
> +  int *strides, int *offsets,
> +  uint64_t *modifiers,
>

As mentioned on IRC, modifiers are per-image so this doesn't need to be a
pointer.  Let's not make it one.  Also, would it make sense to move this up
by 2 lines and put it next to the fourcc format?


> +  enum __DRIYUVColorSpace
> color_space,
> +  enum __DRISampleRange
> sample_range,
> +  enum __DRIChromaSiting
> horiz_siting,
> +  enum __DRIChromaSiting
> vert_siting,
> +  unsigned *error,
> +  void *loaderPrivate);
>  };
>
>
> --
> 2.13.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v13 03/36] dri: support DRIimage creation from dmabufs with modifiers

2017-05-19 Thread Daniel Stone
From: Pekka Paalanen 

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

Signed-off-by: Pekka Paalanen 
Signed-off-by: Varad Gautam 
Reviewed-by: Daniel Stone 
Signed-off-by: Daniel Stone 
---
 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 c83056aa70..53b95dd93d 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -1137,7 +1137,7 @@ struct __DRIdri2ExtensionRec {
  * extensions.
  */
 #define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 14
+#define __DRI_IMAGE_VERSION 15
 
 /**
  * These formats correspond to the similarly named MESA_FORMAT_*
@@ -1494,6 +1494,25 @@ struct __DRIimageExtensionRec {
const uint64_t *modifiers,
const unsigned int modifier_count,
void *loaderPrivate);
+
+   /*
+* Like createImageFromDmaBufs, but takes also format modifiers.
+*
+* For EGL_EXT_image_dma_buf_import_modifiers.
+*
+* \since 15
+*/
+   __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.13.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev