summaryrefslogtreecommitdiffstats
path: root/include/GL/internal
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2012-05-02 15:30:13 -0400
committerKristian Høgsberg <[email protected]>2012-05-03 10:57:32 -0400
commit4fddb2ba21add1c1968330e5224ecead59da3995 (patch)
tree20b7a7e683f135f90e2fb5b67f1856e0f038e44b /include/GL/internal
parentb4789860c4416ba700ac5edeb692b59e33d45276 (diff)
gbm: Add gbm_bo_write entry point
This new gbm entry point allows writing data into a gbm bo. The bo has to be created with the GBM_BO_USE_WRITE flag, and it's only required to work for GBM_BO_USE_CURSOR_64X64 bos. The gbm API is designed to be the glue layer between EGL and KMS, but there was never a mechanism initialize a buffer suitable for use with KMS hw cursors. The hw cursor bo is typically not compatible with anything EGL can render to, and thus there's no way to get data into such a bo. gbm_bo_write() fills that gap while staying out of the efficient cpu->gpu pixel transfer business. Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
Diffstat (limited to 'include/GL/internal')
-rw-r--r--include/GL/internal/dri_interface.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index eafbe10f9b0..e37917eda99 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -894,7 +894,7 @@ struct __DRIdri2ExtensionRec {
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 3
+#define __DRI_IMAGE_VERSION 4
/**
* These formats correspond to the similarly named MESA_FORMAT_*
@@ -911,6 +911,7 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_USE_SHARE 0x0001
#define __DRI_IMAGE_USE_SCANOUT 0x0002
#define __DRI_IMAGE_USE_CURSOR 0x0004
+#define __DRI_IMAGE_USE_WRITE 0x0008
/**
* queryImage attributes
@@ -955,6 +956,13 @@ struct __DRIimageExtensionRec {
* \since 2
*/
GLboolean (*validateUsage)(__DRIimage *image, unsigned int use);
+
+ /**
+ * Write data into image.
+ *
+ * \since 4
+ */
+ int (*write)(__DRIimage *image, const void *buf, size_t count);
};