summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobert Foss <[email protected]>2018-11-20 16:38:27 +0100
committerRobert Foss <[email protected]>2018-11-21 15:59:00 +0100
commit19af208c7de52561ec8ecb99b61e799ffe4ef67c (patch)
tree047670f3a75ca51771320295d0f9d39056d01990 /src
parent61b535437e2ea1115d6915fbd62d9b8745071525 (diff)
virgl: add assert and missing function parameter
Verify the pipe_fd_type to be of PIPE_FD_TYPE_NATIVE_SYNC. Fixes: d1a1c21e7621b5177feb "virgl: native fence fd support" Suggested-by: Eric Engestrom <[email protected]> Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/virgl/virgl_context.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c
index 9be7775abd3..892fef76c75 100644
--- a/src/gallium/drivers/virgl/virgl_context.c
+++ b/src/gallium/drivers/virgl/virgl_context.c
@@ -1030,8 +1030,11 @@ static void virgl_set_shader_buffers(struct pipe_context *ctx,
}
static void virgl_create_fence_fd(struct pipe_context *ctx,
- struct pipe_fence_handle **fence, int fd)
+ struct pipe_fence_handle **fence,
+ int fd,
+ enum pipe_fd_type type)
{
+ assert(type == PIPE_FD_TYPE_NATIVE_SYNC);
struct virgl_screen *rs = virgl_screen(ctx->screen);
*fence = rs->vws->cs_create_fence(rs->vws, fd);