From 6ab615f183b8d13d168f8c5fc2ccb773c1275611 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Fri, 21 Oct 2022 15:15:30 -0700 Subject: [PATCH] include: Add driver data to v2 of mesa_glinterop_device_info Reviewed-by: Adam Jackson Acked-by: Karol Herbst Part-of: --- include/GL/mesa_glinterop.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h index 4a7da7479a02f..385c65af6f0f6 100644 --- a/include/GL/mesa_glinterop.h +++ b/include/GL/mesa_glinterop.h @@ -101,7 +101,7 @@ enum { MESA_GLINTEROP_ACCESS_WRITE_ONLY }; -#define MESA_GLINTEROP_DEVICE_INFO_VERSION 1 +#define MESA_GLINTEROP_DEVICE_INFO_VERSION 2 /** * Device information returned by Mesa. @@ -127,6 +127,18 @@ struct mesa_glinterop_device_info { uint32_t device_id; /* Structure version 1 ends here. */ + + /* Size of memory pointed to by out_driver_data. */ + uint32_t driver_data_size; + + /* If the caller wants to query driver-specific data about the OpenGL + * object, this should point to the memory where that data will be stored. + * This is expected to be a temporary staging memory. The pointer is not + * allowed to be saved for later use by Mesa. + */ + void *driver_data; + + /* Structure version 2 ends here. */ }; #define MESA_GLINTEROP_EXPORT_IN_VERSION 1