From 5510cc67e06d8c1b7ba24f3eac4d0dcee5472f45 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Thu, 3 Jan 2019 13:33:12 -0800 Subject: virgl: make winsys modifications for encoded transfers The idea is to have two command buffers: 1) One for transfers 2) One for commands, which can include transfers At flush time, (2) will be filled. Otherwise, (1) will be used to submit transfers if there are enough of them. v2: Pass size directly to cmd_buf_create (@gerddie) Reviewed-by: Gert Wollny --- src/gallium/drivers/virgl/virgl_winsys.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/virgl/virgl_winsys.h') diff --git a/src/gallium/drivers/virgl/virgl_winsys.h b/src/gallium/drivers/virgl/virgl_winsys.h index 96726b409d9..face3f0243f 100644 --- a/src/gallium/drivers/virgl/virgl_winsys.h +++ b/src/gallium/drivers/virgl/virgl_winsys.h @@ -31,7 +31,8 @@ struct pipe_fence_handle; struct winsys_handle; struct virgl_hw_res; -#define VIRGL_MAX_CMDBUF_DWORDS (64 * 1024) +#define VIRGL_MAX_TBUF_DWORDS 1024 +#define VIRGL_MAX_CMDBUF_DWORDS ((64 * 1024) + VIRGL_MAX_TBUF_DWORDS) struct virgl_drm_caps { union virgl_caps caps; @@ -47,6 +48,7 @@ struct virgl_cmd_buf { struct virgl_winsys { unsigned pci_id; int supports_fences; /* In/Out fences are supported */ + int supports_encoded_transfers; /* Encoded transfers are supported */ void (*destroy)(struct virgl_winsys *vws); @@ -82,7 +84,7 @@ struct virgl_winsys { uint32_t stride, struct winsys_handle *whandle); - struct virgl_cmd_buf *(*cmd_buf_create)(struct virgl_winsys *ws); + struct virgl_cmd_buf *(*cmd_buf_create)(struct virgl_winsys *ws, uint32_t size); void (*cmd_buf_destroy)(struct virgl_cmd_buf *buf); void (*emit_res)(struct virgl_winsys *vws, struct virgl_cmd_buf *buf, struct virgl_hw_res *res, boolean write_buffer); -- cgit v1.2.3