Module: Mesa
Branch: master
Commit: 08f6b4dd7bce06389b38c0ef40ccc2babc5920f1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=08f6b4dd7bce06389b38c0ef40ccc2babc5920f1

Author: Nicolai Hähnle <nicolai.haeh...@amd.com>
Date:   Sun Nov 19 17:26:45 2017 +0100

radeonsi: avoid attempting to create CMASK if the tiling mode doesn't have it

Reviewed-by: Marek Olšák <marek.ol...@amd.com>

---

 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 eb63cdefd1..3fa5f5eaa9 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,

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to