[Mesa-dev] [PATCH v2] dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage
Varad Gautam
varadgautam at gmail.com
Fri Apr 14 10:33:21 UTC 2017
From: Varad Gautam <varad.gautam at collabora.com>
these allow querying the driver for supported dmabuf formats and
modifiers.
v2: move to __DRIimageExtension version 16.
Signed-off-by: Varad Gautam <varad.gautam at collabora.com>
---
include/GL/internal/dri_interface.h | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index e330723..a4942db 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -1136,7 +1136,7 @@ struct __DRIdri2ExtensionRec {
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 15
+#define __DRI_IMAGE_VERSION 16
/**
* These formats correspond to the similarly named MESA_FORMAT_*
@@ -1512,6 +1512,26 @@ struct __DRIimageExtensionRec {
enum __DRIChromaSiting vert_siting,
unsigned *error,
void *loaderPrivate);
+
+ /*
+ * Returns the dmabuf formats supported by the driver
+ *
+ * For EGL_EXT_image_dma_buf_import_modifiers.
+ *
+ * \since 16
+ */
+ void (*queryDmaBufFormats)(__DRIscreen *screen, int max, int *formats,
+ int *count);
+
+ /*
+ * Returns modifiers supported by the driver for a given format.
+ *
+ * For EGL_EXT_image_dma_buf_import_modifiers.
+ *
+ * \since 16
+ */
+ void (*queryDmaBufModifiers)(__DRIscreen *screen, int fourcc, int max,
+ uint64_t *modifiers, int *count);
};
--
2.10.0
More information about the mesa-dev
mailing list