Win32 memory objects can be imported by name (const void *
that will be interpreted as const wchar_t *)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Marek Ol\9aák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
#define WINSYS_HANDLE_TYPE_WIN32_HANDLE WINSYS_HANDLE_TYPE_FD
#define WINSYS_HANDLE_TYPE_SHMID 3
#define WINSYS_HANDLE_TYPE_D3D12_RES 4
+#define WINSYS_HANDLE_TYPE_WIN32_NAME 5
/**
* For use with pipe_screen::{resource_from_handle|resource_get_handle}.
*/
uint64_t modifier;
- /**
- * Input to resource_from_handle.
- * Output for resource_get_handle.
- */
- void *com_obj;
+ union
+ {
+ /**
+ * Input to resource_from_handle.
+ * Output for resource_get_handle.
+ */
+ void *com_obj;
+
+ /**
+ * String name for an object.
+ * Input to resource_from_handle.
+ */
+ const void *name;
+ };
/**
* Total size of the object.