summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_winsys.h
diff options
context:
space:
mode:
authorGurchetan Singh <[email protected]>2019-01-03 13:33:12 -0800
committerGert Wollny <[email protected]>2019-02-15 11:19:05 +0100
commit5510cc67e06d8c1b7ba24f3eac4d0dcee5472f45 (patch)
tree17b925987f3aa3a4d1dbe3416b27186e1dba5eef /src/gallium/drivers/virgl/virgl_winsys.h
parent90e96505855442fb235b50e29e548cbf8e559edd (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_winsys.h')
-rw-r--r--src/gallium/drivers/virgl/virgl_winsys.h6
1 files changed, 4 insertions, 2 deletions
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);