From: Nicolai Hähnle <[email protected]>
---
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
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev