From: Marek Olšák <marek.ol...@amd.com>

Cc: 11.0 <mesa-sta...@lists.freedesktop.org>
---
 src/gallium/drivers/radeon/r600_texture.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index a025916..fc69f48 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -989,6 +989,11 @@ static void *r600_texture_transfer_map(struct pipe_context 
*ctx,
 
                        if (usage & PIPE_TRANSFER_READ) {
                                struct pipe_resource *temp = 
ctx->screen->resource_create(ctx->screen, &resource);
+                               if (!temp) {
+                                       R600_ERR("failed to create a temporary 
depth texture\n");
+                                       FREE(trans);
+                                       return NULL;
+                               }
 
                                r600_copy_region_with_blit(ctx, temp, 0, 0, 0, 
0, texture, level, box);
                                rctx->blit_decompress_depth(ctx, (struct 
r600_texture*)temp, staging_depth,
-- 
2.1.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to