summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index eb63cdefd1a..3fa5f5eaa97 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -848,6 +848,8 @@ static void r600_texture_alloc_cmask_separate(struct r600_common_screen *rscreen
assert(rtex->cmask.size == 0);
si_texture_get_cmask_info(rscreen, rtex, &rtex->cmask);
+ if (!rtex->cmask.size)
+ return;
rtex->cmask_buffer = (struct r600_resource *)
si_aligned_buffer_create(&rscreen->b,