summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-11-19 10:39:09 -0700
committerBrian Paul <[email protected]>2015-11-20 13:40:06 -0700
commite96d7a1489c1e4ddd66fc5c88c0fc603e1483e32 (patch)
tree9a19c8f7de4e1abfb3a599b47fba137095b9d84d /src/gallium
parentb109cd3c276e476143ae85fd48d5e43e904291dd (diff)
svga: add some sanity check assertions in svga_buffer_transfer_map()
Make sure y and z values of buffers are as expected. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index 71f2f4f2779..449cc149a81 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -80,6 +80,11 @@ svga_buffer_transfer_map(struct pipe_context *pipe,
uint8_t *map;
int64_t begin = os_time_get();
+ assert(box->y == 0);
+ assert(box->z == 0);
+ assert(box->height == 1);
+ assert(box->depth == 1);
+
transfer = CALLOC_STRUCT(pipe_transfer);
if (transfer == NULL) {
return NULL;