From: Jonathan Marek Date: Fri, 6 Dec 2019 01:58:58 +0000 (-0500) Subject: turnip: fix incorrectly failing assert X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab54aceaa82b0f5759aa3d3357837a2918a538d8;p=mesa.git turnip: fix incorrectly failing assert pColorBlendState is allowed to be NULL if subpass has >0 color attachments but they are all unused. Signed-off-by: Jonathan Marek Reviewed-by: Eric Anholt --- diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 8be68ab2665..3a17cc76494 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -1934,6 +1934,7 @@ tu_pipeline_builder_init_graphics( subpass->depth_stencil_attachment.attachment != VK_ATTACHMENT_UNUSED; assert(subpass->color_count == 0 || + !create_info->pColorBlendState || subpass->color_count == create_info->pColorBlendState->attachmentCount); builder->color_attachment_count = subpass->color_count; for (uint32_t i = 0; i < subpass->color_count; i++) {