[Mesa-dev] [PATCH 4/5] dri2: add DRI image offset to base bo.

Gwenole Beauchesne gb.devel at gmail.com
Mon Apr 23 02:54:14 PDT 2012


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.
---
 include/GL/internal/dri_interface.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index ea1328a..a907e70 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -929,6 +929,7 @@ 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+ */
 
 typedef struct __DRIimageRec          __DRIimage;
 typedef struct __DRIimageAttrsRec     __DRIimageAttrs;
@@ -976,7 +977,7 @@ struct __DRIimageExtensionRec {
    GLboolean (*validateUsage)(__DRIimage *image, unsigned int use);
 
     __DRIimage *(*createImageFromName2)(__DRIscreen *screen,
-                                        int name,
+                                        int name, unsigned int offset,
                                         const __DRIimageAttrs *attrs,
                                         void *loaderPrivate);
 };
-- 
1.7.5.4



More information about the mesa-dev mailing list