diff options
author | Gurchetan Singh <[email protected]> | 2018-12-14 16:07:19 -0800 |
---|---|---|
committer | Gurchetan Singh <[email protected]> | 2019-04-18 15:39:23 -0700 |
commit | 1fd635862fb4a2f7c624881caedc70fdb4cfb72d (patch) | |
tree | fa4d5425e4d85b57c51b5ac3e0527659cedaca23 /src/gallium | |
parent | b5698562e4ae08dae5591abaa967b8eb27003e48 (diff) |
virgl/vtest: bump up protocol version + support encoded transfers
This more accurately reflects what the drm winsys does.
Signed-off-by: Gurchetan Singh <[email protected]>
Reviewed-By: Gert Wollny <[email protected]>
Reviewed-By: Piotr Rak <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c | 11 | ||||
-rw-r--r-- | src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h | 2 | ||||
-rw-r--r-- | src/gallium/winsys/virgl/vtest/vtest_protocol.h | 2 |
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 */ |