radeonsi: avoid attempting to create CMASK if the tiling mode doesn't have it
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sun, 19 Nov 2017 16:26:45 +0000 (17:26 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 28 Nov 2017 08:34:43 +0000 (09:34 +0100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index eb63cdefd1aafeed3d540a8db78e7f7b90c81f96..3fa5f5eaa97ef729002477aaf42a6368717f66b3 100644 (file)
@@ -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,