[Mesa-dev] [PATCH] r600g/radeon: Don't try to allocate CMASK BO of size 0

Michel Dänzer michel at daenzer.net
Wed Aug 6 22:46:11 PDT 2014


From: Michel Dänzer <michel.daenzer at amd.com>

Prevents logs from getting spammed with BO allocation failure messages.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82162
Signed-off-by: Michel Dänzer <michel.daenzer at 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 482bbff..0ecbb9e 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -463,6 +463,8 @@ static void r600_texture_alloc_cmask_separate(struct r600_common_screen *rscreen
 	} else {
 		r600_texture_get_cmask_info(rscreen, rtex, &rtex->cmask);
 	}
+	if (rtex->cmask.size == 0)
+		return;
 
 	rtex->cmask_buffer = (struct r600_resource *)
 		pipe_buffer_create(&rscreen->b, PIPE_BIND_CUSTOM,
-- 
2.0.1



More information about the mesa-dev mailing list