summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-11-19 17:26:45 +0100
committerNicolai Hähnle <[email protected]>2017-11-28 09:34:43 +0100
commit08f6b4dd7bce06389b38c0ef40ccc2babc5920f1 (patch)
tree3d09fd3bc7e56b4c68170a40d303f29494752fb8 /src/gallium/drivers
parente52e8326d9131670880d4b6fa285d49c7e1d7fee (diff)
radeonsi: avoid attempting to create CMASK if the tiling mode doesn't have it
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-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,