From b6e154485224f2a50c298d73730a5735df8d9154 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Mon, 14 Oct 2019 11:41:08 -0400 Subject: turnip: fix assert failing for 0 color attachments Signed-off-by: Jonathan Marek Reviewed-by: Kristian H. Kristensen --- src/freedreno/vulkan/tu_pipeline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/freedreno') diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 241a009040c..cf1f30bb3d3 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -1851,8 +1851,8 @@ tu_pipeline_builder_init_graphics( builder->use_depth_stencil_attachment = subpass->depth_stencil_attachment.attachment != VK_ATTACHMENT_UNUSED; - assert(subpass->color_count == - create_info->pColorBlendState->attachmentCount); + assert(subpass->color_count == 0 || + subpass->color_count == create_info->pColorBlendState->attachmentCount); builder->color_attachment_count = subpass->color_count; for (uint32_t i = 0; i < subpass->color_count; i++) { const uint32_t a = subpass->color_attachments[i].attachment; -- cgit v1.2.3