gallium: Add a 'name' field to winsys_handle

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šák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
This commit is contained in:
Jesse Natalie 2022-07-09 19:19:10 -07:00 committed by Marge Bot
parent 8f11c0553c
commit 91b14d4a77
1 changed files with 15 additions and 5 deletions

View File

@ -17,6 +17,7 @@ extern "C" {
#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}.
@ -72,11 +73,20 @@ struct winsys_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.