From: Nicolai Hähnle Date: Sun, 19 Nov 2017 16:26:45 +0000 (+0100) Subject: radeonsi: avoid attempting to create CMASK if the tiling mode doesn't have it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=08f6b4dd7bce06389b38c0ef40ccc2babc5920f1;p=mesa.git radeonsi: avoid attempting to create CMASK if the tiling mode doesn't have it Reviewed-by: Marek Olšák --- 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,