From d9582ff39e025a620518982bbde888970d67adae Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 25 Sep 2020 15:49:42 +0200 Subject: [PATCH] dri: introduce createImageFromDmaBufs3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extends createImageFromDmaBufs2 with a protected_content flag. Reviewed-by: Marek Olšák Part-of: --- include/GL/internal/dri_interface.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 94406dcb97b..39d5dd07533 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -1319,7 +1319,7 @@ struct __DRIdri2ExtensionRec { * extensions. */ #define __DRI_IMAGE "DRI_IMAGE" -#define __DRI_IMAGE_VERSION 17 +#define __DRI_IMAGE_VERSION 18 /** * These formats correspond to the similarly named MESA_FORMAT_* @@ -1487,6 +1487,11 @@ enum __DRIChromaSiting { #define __BLIT_FLAG_FLUSH 0x0001 #define __BLIT_FLAG_FINISH 0x0002 +/** + * Flags for createImageFromDmaBufs3 + */ +#define __DRI_IMAGE_PROTECTED_CONTENT_FLAG 0x00000001 + /** * queryDmaBufFormatModifierAttribs attributes */ @@ -1769,6 +1774,26 @@ struct __DRIimageExtensionRec { int renderbuffer, void *loaderPrivate, unsigned *error); + + /* + * Like createImageFromDmaBufs2, but with an added flags parameter. + * + * See __DRI_IMAGE_*_FLAG for valid definitions of flags. + * + * \since 18 + */ + __DRIimage *(*createImageFromDmaBufs3)(__DRIscreen *screen, + int width, int height, int fourcc, + uint64_t modifier, + int *fds, int num_fds, + int *strides, int *offsets, + enum __DRIYUVColorSpace color_space, + enum __DRISampleRange sample_range, + enum __DRIChromaSiting horiz_siting, + enum __DRIChromaSiting vert_siting, + uint32_t flags, + unsigned *error, + void *loaderPrivate); };