diff options
author | Marek Olšák <[email protected]> | 2015-09-10 18:14:36 +0200 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-10-07 14:09:37 +0100 |
commit | 288d9a06cc3dab54947ee0a1aa7348430ac663bb (patch) | |
tree | 2670a5972e2b9480cd4fccec9eaa34984b1fdf62 | |
parent | 62ac723a346892c455352d6b681f06caa6b15cf4 (diff) |
gallium/radeon: add a fail path for depth MSAA texture readback
Cc: 11.0 <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
(cherry picked from commit dea834e639715caa9517a695a3fb04d5de9aa069)
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 54696910e43..e9bd4a21fd5 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, |