summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2014-07-23 19:28:52 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2014-07-30 16:43:41 +0100
commite57ad3d38cab091ef341838b651dbda16cee007b (patch)
treefaa36d31ce343aeaa8a134c3bddfca8abecbcd52 /include
parent3b176c441b7ddc5f7d2f891da3f76cf3c1814ce1 (diff)
downloadexternal_mesa3d-e57ad3d38cab091ef341838b651dbda16cee007b.zip
external_mesa3d-e57ad3d38cab091ef341838b651dbda16cee007b.tar.gz
external_mesa3d-e57ad3d38cab091ef341838b651dbda16cee007b.tar.bz2
dri: Add a new capabilities for drivers that can't share buffers
The kms-dri swrast driver cannot share buffers using the GEM, so it must tell the loader to disable extensions relying on that, without disabling the image DRI extension altogether (which would prevent the loader from working at all). This requires a new gallium capability (which is queried on the pipe_screen and for swrast drivers it's forwarded to the winsys), and requires a new version of the DRI image extension. [Emil Velikov] - Rebased on top of gallium-dri megadrivers. - Drop PIPE_CAP_BUFFER_SHARE and sw_winsys::get_param hook. The can_share_buffer cap is set at InitScreen. We use a different InitScreen (and thus value for the cap) function for kms_dri, due to deeper differences originating from dri megadrivers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/GL/internal/dri_interface.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 7c28c13..8c5ceb9 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -1005,7 +1005,7 @@ struct __DRIdri2ExtensionRec {
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 9
+#define __DRI_IMAGE_VERSION 10
/**
* These formats correspond to the similarly named MESA_FORMAT_*
@@ -1134,6 +1134,13 @@ enum __DRIChromaSiting {
/*@}*/
/**
+ * \name Capabilities that might be returned by __DRIimageExtensionRec::getCapabilities
+ */
+/*@{*/
+#define __DRI_IMAGE_CAP_GLOBAL_NAMES 1
+/*@}*/
+
+/**
* blitImage flags
*/
@@ -1261,6 +1268,14 @@ struct __DRIimageExtensionRec {
int dstx0, int dsty0, int dstwidth, int dstheight,
int srcx0, int srcy0, int srcwidth, int srcheight,
int flush_flag);
+
+ /**
+ * Query for general capabilities of the driver that concern
+ * buffer sharing and image importing.
+ *
+ * \since 10
+ */
+ int (*getCapabilities)(__DRIscreen *screen);
};