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 <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Jonathan Marek 2019-12-05 20:58:58 -05:00
parent 07d8b98b54
commit ab54aceaa8
1 changed files with 1 additions and 0 deletions

View File

@ -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++) {