summaryrefslogtreecommitdiffstats
path: root/include/GL
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-16 11:53:38 -0700
committerJason Ekstrand <[email protected]>2017-09-14 14:47:18 -0700
commit0a25a417ce9b9c7e500baeabade87bd1114ac2a8 (patch)
tree6e3723e5a9c044302ab880423f8f2301bf72cefc /include/GL
parent7ffd4d2a6670ccefd4d697954a1ac67b5839da7d (diff)
dri/image: Add a format modifier attributes query
Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'include/GL')
-rw-r--r--include/GL/internal/dri_interface.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 1c91bde9203..783ff1c70d5 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -1180,7 +1180,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_*
@@ -1360,6 +1360,13 @@ enum __DRIChromaSiting {
#define __BLIT_FLAG_FLUSH 0x0001
#define __BLIT_FLAG_FINISH 0x0002
+/**
+ * queryDmaBufFormatModifierAttribs attributes
+ */
+
+/* Available in version 16 */
+#define __DRI_IMAGE_FORMAT_MODIFIER_ATTRIB_PLANE_COUNT 0x0001
+
typedef struct __DRIimageRec __DRIimage;
typedef struct __DRIimageExtensionRec __DRIimageExtension;
struct __DRIimageExtensionRec {
@@ -1600,6 +1607,24 @@ struct __DRIimageExtensionRec {
int max, uint64_t *modifiers,
unsigned int *external_only,
int *count);
+
+ /**
+ * dmabuf format modifier attribute query for a given format and modifier.
+ *
+ * \param fourcc The format to query. If this format is not supported by
+ * the driver, return false.
+ * \param modifier The modifier to query. If this format+modifier is not
+ * supported by the driver, return false.
+ * \param attrib The __DRI_IMAGE_FORMAT_MODIFIER_ATTRIB to query.
+ * \param value A pointer to where to store the result of the query.
+ *
+ * Returns true upon success.
+ *
+ * \since 16
+ */
+ GLboolean (*queryDmaBufFormatModifierAttribs)(__DRIscreen *screen,
+ uint32_t fourcc, uint64_t modifier,
+ int attrib, uint64_t *value);
};