diff options
author | Gurchetan Singh <[email protected]> | 2018-11-30 18:08:14 -0800 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-12-19 13:29:16 +0100 |
commit | 4e2c77cd512ccd98c08a361fc9889286c44ad4ea (patch) | |
tree | 541cd8b30a66fcc952cb3fa21f11ede65b35f890 /src/gallium/drivers/virgl/virgl_resource.c | |
parent | 174f530008c1b22ede7c67995f693b3d84f2a488 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_resource.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_resource.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_resource.c b/src/gallium/drivers/virgl/virgl_resource.c index ae97d4c45e2..6d930dc1a5a 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); } |