aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c13
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.h2
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c4
3 files changed, 16 insertions, 3 deletions
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index 26de8c702df..7759c87f9cf 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -564,7 +564,8 @@ static void virgl_drm_resource_wait(struct virgl_winsys *qws,
goto again;
}
-static struct virgl_cmd_buf *virgl_drm_cmd_buf_create(struct virgl_winsys *qws)
+static struct virgl_cmd_buf *virgl_drm_cmd_buf_create(struct virgl_winsys *qws,
+ uint32_t size)
{
struct virgl_drm_cmd_buf *cbuf;
@@ -587,6 +588,14 @@ static struct virgl_cmd_buf *virgl_drm_cmd_buf_create(struct virgl_winsys *qws)
return NULL;
}
+ cbuf->buf = CALLOC(size, sizeof(uint32_t));
+ if (!cbuf->buf) {
+ FREE(cbuf->res_hlist);
+ FREE(cbuf->res_bo);
+ FREE(cbuf);
+ return NULL;
+ }
+
cbuf->base.buf = cbuf->buf;
cbuf->base.in_fence_fd = -1;
return &cbuf->base;
@@ -598,6 +607,7 @@ static void virgl_drm_cmd_buf_destroy(struct virgl_cmd_buf *_cbuf)
FREE(cbuf->res_hlist);
FREE(cbuf->res_bo);
+ FREE(cbuf->buf);
FREE(cbuf);
}
@@ -930,6 +940,7 @@ virgl_drm_winsys_create(int drmFD)
qdws->base.fence_server_sync = virgl_fence_server_sync;
qdws->base.fence_get_fd = virgl_fence_get_fd;
qdws->base.supports_fences = drm_version >= VIRGL_DRM_VERSION_FENCE_FD;
+ qdws->base.supports_encoded_transfers = 1;
qdws->base.get_caps = virgl_drm_get_caps;
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
index 659c2d77568..51fad9cf372 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
@@ -71,7 +71,7 @@ struct virgl_drm_winsys
struct virgl_drm_cmd_buf {
struct virgl_cmd_buf base;
- uint32_t buf[VIRGL_MAX_CMDBUF_DWORDS];
+ uint32_t *buf;
unsigned nres;
unsigned cres;
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index 5422b29e55a..479a98fe499 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -411,7 +411,8 @@ alloc:
return res;
}
-static struct virgl_cmd_buf *virgl_vtest_cmd_buf_create(struct virgl_winsys *vws)
+static struct virgl_cmd_buf *virgl_vtest_cmd_buf_create(struct virgl_winsys *vws,
+ uint32_t size)
{
struct virgl_vtest_cmd_buf *cbuf;
@@ -700,6 +701,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.flush_frontbuffer = virgl_vtest_flush_frontbuffer;