turnip: fix assert failing for 0 color attachments
authorJonathan Marek <jonathan@marek.ca>
Mon, 14 Oct 2019 15:41:08 +0000 (11:41 -0400)
committerJonathan Marek <jonathan@marek.ca>
Tue, 15 Oct 2019 11:56:19 +0000 (07:56 -0400)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/freedreno/vulkan/tu_pipeline.c

index 241a009040c2cbeb5ee6728a85f1bf1a912cc8a6..cf1f30bb3d33bcc16b0c3966b7ca06b233b1a1d1 100644 (file)
@@ -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;