Verify the pipe_fd_type to be of PIPE_FD_TYPE_NATIVE_SYNC.
Fixes: d1a1c21e7621b5177feb "virgl: native fence fd support"
Suggested-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
}
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);