summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_fence.c4
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_fence.h3
-rw-r--r--src/gallium/drivers/freedreno/freedreno_fence.c4
-rw-r--r--src/gallium/drivers/freedreno/freedreno_fence.h3
-rw-r--r--src/gallium/drivers/radeonsi/si_fence.c5
-rw-r--r--src/gallium/drivers/svga/svga_pipe_flush.c4
6 files changed, 17 insertions, 6 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_fence.c b/src/gallium/drivers/etnaviv/etnaviv_fence.c
index d82708eacbe..22a964ad282 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_fence.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_fence.c
@@ -76,8 +76,10 @@ etna_screen_fence_finish(struct pipe_screen *pscreen, struct pipe_context *ctx,
void
etna_create_fence_fd(struct pipe_context *pctx,
- struct pipe_fence_handle **pfence, int fd)
+ struct pipe_fence_handle **pfence, int fd,
+ enum pipe_fd_type type)
{
+ assert(type == PIPE_FD_TYPE_NATIVE_SYNC);
*pfence = etna_fence_create(pctx, dup(fd));
}
diff --git a/src/gallium/drivers/etnaviv/etnaviv_fence.h b/src/gallium/drivers/etnaviv/etnaviv_fence.h
index cd68a428d3f..8b8bb63e3ef 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_fence.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_fence.h
@@ -32,7 +32,8 @@
void
etna_create_fence_fd(struct pipe_context *pctx,
- struct pipe_fence_handle **pfence, int fd);
+ struct pipe_fence_handle **pfence, int fd,
+ enum pipe_fd_type type);
void
etna_fence_server_sync(struct pipe_context *pctx,
diff --git a/src/gallium/drivers/freedreno/freedreno_fence.c b/src/gallium/drivers/freedreno/freedreno_fence.c
index 928972003c6..1925f726a25 100644
--- a/src/gallium/drivers/freedreno/freedreno_fence.c
+++ b/src/gallium/drivers/freedreno/freedreno_fence.c
@@ -120,8 +120,10 @@ static struct pipe_fence_handle * fence_create(struct fd_context *ctx,
}
void fd_create_fence_fd(struct pipe_context *pctx,
- struct pipe_fence_handle **pfence, int fd)
+ struct pipe_fence_handle **pfence, int fd,
+ enum pipe_fd_type type)
{
+ assert(type == PIPE_FD_TYPE_NATIVE_SYNC);
*pfence = fence_create(fd_context(pctx), NULL, 0, dup(fd));
}
diff --git a/src/gallium/drivers/freedreno/freedreno_fence.h b/src/gallium/drivers/freedreno/freedreno_fence.h
index c1a9fd3f1cc..0842a1d618d 100644
--- a/src/gallium/drivers/freedreno/freedreno_fence.h
+++ b/src/gallium/drivers/freedreno/freedreno_fence.h
@@ -41,7 +41,8 @@ boolean fd_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *pfence,
uint64_t timeout);
void fd_create_fence_fd(struct pipe_context *pctx,
- struct pipe_fence_handle **pfence, int fd);
+ struct pipe_fence_handle **pfence, int fd,
+ enum pipe_fd_type type);
void fd_fence_server_sync(struct pipe_context *pctx,
struct pipe_fence_handle *fence);
int fd_fence_get_fd(struct pipe_screen *pscreen,
diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c
index 47d68dbc337..d3a68e50e1c 100644
--- a/src/gallium/drivers/radeonsi/si_fence.c
+++ b/src/gallium/drivers/radeonsi/si_fence.c
@@ -298,12 +298,15 @@ static boolean si_fence_finish(struct pipe_screen *screen,
}
static void si_create_fence_fd(struct pipe_context *ctx,
- struct pipe_fence_handle **pfence, int fd)
+ struct pipe_fence_handle **pfence, int fd,
+ enum pipe_fd_type type)
{
struct si_screen *sscreen = (struct si_screen*)ctx->screen;
struct radeon_winsys *ws = sscreen->ws;
struct si_multi_fence *rfence;
+ assert(type == PIPE_FD_TYPE_NATIVE_SYNC);
+
*pfence = NULL;
if (!sscreen->info.has_fence_to_handle)
diff --git a/src/gallium/drivers/svga/svga_pipe_flush.c b/src/gallium/drivers/svga/svga_pipe_flush.c
index 85ec34f3145..1f4eebc124a 100644
--- a/src/gallium/drivers/svga/svga_pipe_flush.c
+++ b/src/gallium/drivers/svga/svga_pipe_flush.c
@@ -85,10 +85,12 @@ static void svga_flush( struct pipe_context *pipe,
static void
svga_create_fence_fd(struct pipe_context *pipe,
struct pipe_fence_handle **fence,
- int fd)
+ int fd,
+ enum pipe_fd_type type)
{
struct svga_winsys_screen *sws = svga_winsys_screen(pipe->screen);
+ assert(type == PIPE_FD_TYPE_NATIVE_SYNC);
sws->fence_create_fd(sws, fence, fd);
}