gallium: support for implementing EXT_external_objects_win32

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>
This commit is contained in:
Sidney Just
2022-04-29 12:09:41 -07:00
committed by Marge Bot
parent ca915c871f
commit f98d47e011
2 changed files with 34 additions and 0 deletions
+1
View File
@@ -1386,6 +1386,7 @@ enum pipe_perf_counter_data_type
};
#define PIPE_UUID_SIZE 16
#define PIPE_LUID_SIZE 8
#ifdef PIPE_OS_UNIX
#define PIPE_MEMORY_FD
+33
View File
@@ -403,6 +403,21 @@ struct pipe_screen {
int (*fence_get_fd)(struct pipe_screen *screen,
struct pipe_fence_handle *fence);
/**
* Create a fence from an Win32 handle.
*
* This is used for importing a foreign/external fence handle.
*
* \param fence if not NULL, an old fence to unref and transfer a
* new fence reference to
* \param handle opaque handle representing the fence object
* \param type indicates which fence types backs the handle
*/
void (*create_fence_win32)(struct pipe_screen *screen,
struct pipe_fence_handle **fence,
void *handle,
enum pipe_fd_type type);
/**
* Returns a driver-specific query.
*
@@ -526,6 +541,24 @@ struct pipe_screen {
*/
void (*get_device_uuid)(struct pipe_screen *screen, char *uuid);
/**
* Fill @luid with the locally unique identifier of the context
* The LUID returned, paired together with the contexts node mask,
* allows matching the context to an IDXGIAdapter1 object
*
* \param luid pointer to a memory region of PIPE_LUID_SIZE bytes
*/
void (*get_device_luid)(struct pipe_screen *screen, char *luid);
/**
* Return the device node mask identifying the context
* Together with the contexts LUID, this allows matching
* the context to an IDXGIAdapter1 object.
*
* within a linked device adapter
*/
uint32_t (*get_device_node_mask)(struct pipe_screen *screen);
/**
* Set the maximum number of parallel shader compiler threads.
*/