From: Jonathan Marek Date: Mon, 14 Oct 2019 15:41:08 +0000 (-0400) Subject: turnip: fix assert failing for 0 color attachments X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6e154485224f2a50c298d73730a5735df8d9154;p=mesa.git turnip: fix assert failing for 0 color attachments Signed-off-by: Jonathan Marek Reviewed-by: Kristian H. Kristensen --- 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;