From 08f6b4dd7bce06389b38c0ef40ccc2babc5920f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Sun, 19 Nov 2017 17:26:45 +0100 Subject: [PATCH] radeonsi: avoid attempting to create CMASK if the tiling mode doesn't have it MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/gallium/drivers/radeon/r600_texture.c | 2 ++ 1 file changed, 2 insertions(+) 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, -- 2.11.0