summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_tests.c
diff options
context:
space:
mode:
authorAndres Rodriguez <[email protected]>2017-12-04 15:27:08 -0500
committerAndres Rodriguez <[email protected]>2018-01-30 15:13:49 -0500
commit585daa237807ad4bc8ce3bf40610113333a529de (patch)
treeee2de49469b4f7e2bb369a819c755f697b383e4d /src/gallium/auxiliary/util/u_tests.c
parent16dd0eb517407bcd3040b0f5f7eb31f1bdc48a48 (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/auxiliary/util/u_tests.c')
-rw-r--r--src/gallium/auxiliary/util/u_tests.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c
index cb337a255ae..e8599e32031 100644
--- a/src/gallium/auxiliary/util/u_tests.c
+++ b/src/gallium/auxiliary/util/u_tests.c
@@ -502,6 +502,7 @@ test_sync_file_fences(struct pipe_context *ctx)
{
struct pipe_screen *screen = ctx->screen;
bool pass = true;
+ enum pipe_fd_type fd_type = PIPE_FD_TYPE_NATIVE_SYNC;
if (!screen->get_param(screen, PIPE_CAP_NATIVE_FENCE_FD))
return;
@@ -536,9 +537,9 @@ test_sync_file_fences(struct pipe_context *ctx)
/* (Re)import all fences. */
struct pipe_fence_handle *re_buf_fence = NULL, *re_tex_fence = NULL;
struct pipe_fence_handle *merged_fence = NULL;
- ctx->create_fence_fd(ctx, &re_buf_fence, buf_fd);
- ctx->create_fence_fd(ctx, &re_tex_fence, tex_fd);
- ctx->create_fence_fd(ctx, &merged_fence, merged_fd);
+ ctx->create_fence_fd(ctx, &re_buf_fence, buf_fd, fd_type);
+ ctx->create_fence_fd(ctx, &re_tex_fence, tex_fd, fd_type);
+ ctx->create_fence_fd(ctx, &merged_fence, merged_fd, fd_type);
pass = pass && re_buf_fence && re_tex_fence && merged_fence;
/* Run another clear after waiting for everything. */