diff options
author | Andres Rodriguez <[email protected]> | 2017-12-04 15:27:08 -0500 |
---|---|---|
committer | Andres Rodriguez <[email protected]> | 2018-01-30 15:13:49 -0500 |
commit | 585daa237807ad4bc8ce3bf40610113333a529de (patch) | |
tree | ee2de49469b4f7e2bb369a819c755f697b383e4d /src/gallium/include | |
parent | 16dd0eb517407bcd3040b0f5f7eb31f1bdc48a48 (diff) |
gallium: add type parameter to create_fence_fd
An fd can potentially have different types of objects backing it.
Specifying the type helps us make sure we treat the FD correctly.
This is in preparation to allow importing syncobj fence FDs in addition
to native sync FDs.
Signed-off-by: Andres Rodriguez <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 8 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index b74e6492196..1c7f52cfc59 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -505,17 +505,19 @@ struct pipe_context { unsigned flags); /** - * Create a fence from a native sync fd. + * Create a fence from a fd. * * This is used for importing a foreign/external fence fd. * * \param fence if not NULL, an old fence to unref and transfer a * new fence reference to - * \param fd native fence fd + * \param fd fd representing the fence object + * \param type indicates which fence types backs fd */ void (*create_fence_fd)(struct pipe_context *pipe, struct pipe_fence_handle **fence, - int fd); + int fd, + enum pipe_fd_type type); /** * Insert commands to have GPU wait for fence to be signaled. diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index b34e7a8570a..60546f55d98 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -1084,6 +1084,11 @@ struct pipe_driver_query_group_info unsigned num_queries; }; +enum pipe_fd_type +{ + PIPE_FD_TYPE_NATIVE_SYNC, +}; + enum pipe_debug_type { PIPE_DEBUG_TYPE_OUT_OF_MEMORY = 1, |