From 4e2c77cd512ccd98c08a361fc9889286c44ad4ea Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Fri, 30 Nov 2018 18:08:14 -0800 Subject: [PATCH] virgl: make transfer code with PIPE_BUFFER targets util_format_get_blocksize returns 1 for R8 formats (all PIPE_BUFFERs are R8). Reviewed-by: Elie Tournier --- src/gallium/drivers/virgl/virgl_resource.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/virgl/virgl_resource.c b/src/gallium/drivers/virgl/virgl_resource.c index ae97d4c..6d930dc 100644 --- a/src/gallium/drivers/virgl/virgl_resource.c +++ b/src/gallium/drivers/virgl/virgl_resource.c @@ -171,8 +171,10 @@ virgl_resource_create_transfer(struct pipe_context *ctx, } else if (pres->target == PIPE_TEXTURE_1D_ARRAY) { offset += box->z * metadata->stride[level]; - } - else { + assert(box->y == 0); + } else if (pres->target == PIPE_BUFFER) { + assert(box->y == 0 && box->z == 0); + } else { assert(box->z == 0); } -- 2.7.4