[Mesa-dev] [PATCH 4/8] radeonsi: avoid attempting to create CMASK if the tiling mode doesn't have it
Nicolai Hähnle
nhaehnle at gmail.com
Tue Nov 21 15:03:24 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle 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 5f6e9139d0f..cdb700465ca 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -850,20 +850,22 @@ static void r600_texture_allocate_cmask(struct r600_common_screen *rscreen,
static void r600_texture_alloc_cmask_separate(struct r600_common_screen *rscreen,
struct r600_texture *rtex)
{
if (rtex->cmask_buffer)
return;
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,
R600_RESOURCE_FLAG_UNMAPPABLE,
PIPE_USAGE_DEFAULT,
rtex->cmask.size,
rtex->cmask.alignment);
if (rtex->cmask_buffer == NULL) {
rtex->cmask.size = 0;
return;
--
2.11.0
More information about the mesa-dev
mailing list