From c196efcf034279a9d55dce3a7f02807ac803f5f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 12 Feb 2017 15:48:31 +0100 Subject: [PATCH] gallium/radeon: add an assertion to texture_transfer_map for app bugs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Tested-by: Kai Wasserbäch Reviewed-by: Kai Wasserbäch --- src/gallium/drivers/radeon/r600_texture.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 5d84eb4..47aa8b1 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1434,6 +1434,7 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx, bool use_staging_texture = false; assert(!(texture->flags & R600_RESOURCE_FLAG_TRANSFER)); + assert(box->width && box->height && box->depth); /* Depth textures use staging unconditionally. */ if (!rtex->is_depth) { -- 2.7.4