From: Nicolai Hähnle <nicolai.haeh...@amd.com> This function is meant to return NULL on error, unlike some other APIs (such as mmap()), which return MAP_FAILED. --- include/GL/internal/dri_interface.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 319a1fe4f90..07dfd74f9d8 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -1557,20 +1557,22 @@ struct __DRIimageExtensionRec { * flags may include __DRI_IMAGE_TRANSFER_READ, which will populate the * mapping with the current buffer content. If __DRI_IMAGE_TRANSFER_READ * is not included in the flags, the buffer content at map time is * undefined. Users wanting to modify the mapping must include * __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(). * + * Returns NULL on error. + * * \since 12 */ void *(*mapImage)(__DRIcontext *context, __DRIimage *image, int x0, int y0, int width, int height, unsigned int flags, int *stride, void **data); /** * Unmap a previously mapped __DRIimage * * \since 12 -- 2.17.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev