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:
parent
07d8b98b54
commit
ab54aceaa8
|
@ -1934,6 +1934,7 @@ tu_pipeline_builder_init_graphics(
|
||||||
subpass->depth_stencil_attachment.attachment != VK_ATTACHMENT_UNUSED;
|
subpass->depth_stencil_attachment.attachment != VK_ATTACHMENT_UNUSED;
|
||||||
|
|
||||||
assert(subpass->color_count == 0 ||
|
assert(subpass->color_count == 0 ||
|
||||||
|
!create_info->pColorBlendState ||
|
||||||
subpass->color_count == create_info->pColorBlendState->attachmentCount);
|
subpass->color_count == create_info->pColorBlendState->attachmentCount);
|
||||||
builder->color_attachment_count = subpass->color_count;
|
builder->color_attachment_count = subpass->color_count;
|
||||||
for (uint32_t i = 0; i < subpass->color_count; i++) {
|
for (uint32_t i = 0; i < subpass->color_count; i++) {
|
||||||
|
|
Loading…
Reference in New Issue