aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/virgl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/virgl')
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c11
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h2
-rw-r--r--src/gallium/winsys/virgl/vtest/vtest_protocol.h2
3 files changed, 12 insertions, 3 deletions
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index 687f4f30528..7d676141070 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -559,6 +559,14 @@ static struct virgl_cmd_buf *virgl_vtest_cmd_buf_create(struct virgl_winsys *vws
FREE(cbuf);
return NULL;
}
+
+ cbuf->buf = CALLOC(size, sizeof(uint32_t));
+ if (!cbuf->buf) {
+ FREE(cbuf->res_bo);
+ FREE(cbuf);
+ return NULL;
+ }
+
cbuf->ws = vws;
cbuf->base.buf = cbuf->buf;
return &cbuf->base;
@@ -570,6 +578,7 @@ static void virgl_vtest_cmd_buf_destroy(struct virgl_cmd_buf *_cbuf)
virgl_vtest_release_all_res(virgl_vtest_winsys(cbuf->ws), cbuf);
FREE(cbuf->res_bo);
+ FREE(cbuf->buf);
FREE(cbuf);
}
@@ -760,7 +769,7 @@ virgl_vtest_winsys_wrap(struct sw_winsys *sws)
vtws->base.fence_wait = virgl_fence_wait;
vtws->base.fence_reference = virgl_fence_reference;
vtws->base.supports_fences = 0;
- vtws->base.supports_encoded_transfers = 0;
+ vtws->base.supports_encoded_transfers = (vtws->protocol_version >= 2);
vtws->base.flush_frontbuffer = virgl_vtest_flush_frontbuffer;
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h
index f5d8eb26e7c..c6b1589d7db 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h
@@ -77,7 +77,7 @@ struct virgl_hw_res {
struct virgl_vtest_cmd_buf {
struct virgl_cmd_buf base;
- uint32_t buf[VIRGL_MAX_CMDBUF_DWORDS];
+ uint32_t *buf;
unsigned nres;
unsigned cres;
struct virgl_winsys *ws;
diff --git a/src/gallium/winsys/virgl/vtest/vtest_protocol.h b/src/gallium/winsys/virgl/vtest/vtest_protocol.h
index 9b39020c0ae..9360213ac45 100644
--- a/src/gallium/winsys/virgl/vtest/vtest_protocol.h
+++ b/src/gallium/winsys/virgl/vtest/vtest_protocol.h
@@ -24,7 +24,7 @@
#define VTEST_PROTOCOL
#define VTEST_DEFAULT_SOCKET_NAME "/tmp/.virgl_test"
-#define VTEST_PROTOCOL_VERSION 0
+#define VTEST_PROTOCOL_VERSION 2
/* 32-bit length field */
/* 32-bit cmd field */