summaryrefslogtreecommitdiff
path: root/include/GL/internal
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-02-02 08:38:07 -0500
committerKristian Høgsberg <krh@bitplanet.net>2013-03-18 21:03:54 -0400
commit2356e28452454ed3b584af9b4d28c553c2a80769 (patch)
tree26c5e7dcf720f8b4f219236dfcd3d8259cc605b9 /include/GL/internal
parent664fe6dc844358dbc5474aa4e936c6180e86f144 (diff)
Add dri image entry point for creating image from fd
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Diffstat (limited to 'include/GL/internal')
-rw-r--r--include/GL/internal/dri_interface.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 42147e90eb..30ce175e6f 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -938,7 +938,7 @@ struct __DRIdri2ExtensionRec {
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 6
+#define __DRI_IMAGE_VERSION 7
/**
* These formats correspond to the similarly named MESA_FORMAT_*
@@ -1021,6 +1021,9 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_ATTRIB_WIDTH 0x2004 /* available in versions 4+ */
#define __DRI_IMAGE_ATTRIB_HEIGHT 0x2005
#define __DRI_IMAGE_ATTRIB_COMPONENTS 0x2006 /* available in versions 5+ */
+#define __DRI_IMAGE_ATTRIB_FD 0x2007 /* available in versions
+ * 7+. Each query will return a
+ * new fd. */
/**
* \name Reasons that __DRIimageExtensionRec::createImageFromTexture might fail
@@ -1117,6 +1120,16 @@ struct __DRIimageExtensionRec {
int level,
unsigned *error,
void *loaderPrivate);
+ /**
+ * Like createImageFromNames, but takes a prime fd instead.
+ *
+ * \since 7
+ */
+ __DRIimage *(*createImageFromFds)(__DRIscreen *screen,
+ int width, int height, int fourcc,
+ int *fds, int num_fds,
+ int *strides, int *offsets,
+ void *loaderPrivate);
};