summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-04-23 11:42:19 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-05-18 17:49:44 +0200
commit7f34cda2660c760a3cbf1203923441cae5105fa9 (patch)
tree1f2b01672cdedd1b30d1b6ca141bbcd701c70247
parentd64eaf1ae522bc4d6720d2d9bcda96aa876b4942 (diff)
dri2: add DRI image plane id and offset to base bo.
Add offset argument to createImageFromName2() so that to notify the driver to wrap the DRM buffer at the specified offset. This is useful to wrap a DRM buffer describing a YUV picture into several other images/textures mapping individual Y/U/V components. Also add a plane id attribute to identify what the DRI image actually represents. Valid range is 0..2, inclusive.
-rw-r--r--include/GL/internal/dri_interface.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 9fa3037777..946e2232a5 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -929,12 +929,15 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_ATTRIB_NAME 0x2002
#define __DRI_IMAGE_ATTRIB_FORMAT 0x2003 /* available in versions 3+ */
#define __DRI_IMAGE_ATTRIB_STRUCTURE 0x2004 /* available in versions 4+ */
+#define __DRI_IMAGE_ATTRIB_OFFSET 0x2005 /* available in versions 4+ */
+#define __DRI_IMAGE_ATTRIB_PLANE_ID 0x2006 /* available in versions 4+ */
typedef struct __DRIimageRec __DRIimage;
typedef struct __DRIimageAttrsRec __DRIimageAttrs;
typedef struct __DRIimageExtensionRec __DRIimageExtension;
struct __DRIimageAttrsRec {
+ unsigned int plane_id;
unsigned int format;
unsigned int width;
unsigned int height;
@@ -988,7 +991,7 @@ struct __DRIimageExtensionRec {
* \since 5
*/
__DRIimage *(*createImageFromName2)(__DRIscreen *screen,
- int name,
+ int name, unsigned int offset,
const __DRIimageAttrs *attrs,
void *loaderPrivate);
};