diff options
-rw-r--r-- | include/GL/internal/dri_interface.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 3c8bbe5ff8..58f7436558 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -1220,7 +1220,7 @@ struct __DRIdri2ExtensionRec { * extensions. */ #define __DRI_IMAGE "DRI_IMAGE" -#define __DRI_IMAGE_VERSION 17 +#define __DRI_IMAGE_VERSION 18 /** * These formats correspond to the similarly named MESA_FORMAT_* @@ -1269,6 +1269,7 @@ struct __DRIdri2ExtensionRec { #define __DRI_IMAGE_TRANSFER_WRITE 0x2 #define __DRI_IMAGE_TRANSFER_READ_WRITE \ (__DRI_IMAGE_TRANSFER_READ | __DRI_IMAGE_TRANSFER_WRITE) +#define __DRI_IMAGE_TRANSFER_USER_STRIDE 0x4 /* since version 18 */ /** * Four CC formats that matches with WL_DRM_FORMAT_* from wayland_drm.h, @@ -1559,8 +1560,17 @@ struct __DRIimageExtensionRec { * __DRI_IMAGE_TRANSFER_WRITE; if __DRI_IMAGE_TRANSFER_WRITE is not * included, behaviour when writing the mapping is undefined. * - * Returns the byte stride in *stride, and an opaque pointer to data - * tracking the mapping in **data, which must be passed to unmapImage(). + * When __DRI_IMAGE_TRANSFER_USER_STRIDE is set in \p flags (since version 18), + * the driver should attempt to map the image with the byte stride given in + * *stride. The caller must ensure that *stride is large enough to hold a + * row of the mapping. If the requested stride is not supported, the mapping + * may fail, or a mapping with a different stride may be created (in which + * case the actual stride is returned in *stride). + * + * Returns an opaque pointer to data tracking the mapping in **data, which + * must be passed to unmapImage(). + * + * Returns the byte stride in *stride. * * Returns NULL on error. * |