summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/virgl')
-rw-r--r--src/gallium/drivers/virgl/virgl_resource.c6
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);
}