mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
panvk: Don't assume VkGraphicsPipelineCreateInfo::pColorBlendState != NULL
When the subpass being associated to a graphics pipeline has no color attachment, pColorBlendState can be NULL. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28417>
This commit is contained in:
parent
303f04d346
commit
51ab0a4c25
1 changed files with 5 additions and 2 deletions
|
|
@ -591,6 +591,9 @@ static void
|
|||
panvk_pipeline_builder_parse_color_blend(struct panvk_pipeline_builder *builder,
|
||||
struct panvk_pipeline *pipeline)
|
||||
{
|
||||
if (!builder->create_info.gfx->pColorBlendState)
|
||||
return;
|
||||
|
||||
pipeline->blend.state.logicop_enable =
|
||||
builder->create_info.gfx->pColorBlendState->logicOpEnable;
|
||||
pipeline->blend.state.logicop_func =
|
||||
|
|
@ -1063,8 +1066,8 @@ panvk_pipeline_builder_init_graphics(
|
|||
subpass->depth_stencil_attachment &&
|
||||
subpass->depth_stencil_attachment->attachment != VK_ATTACHMENT_UNUSED;
|
||||
|
||||
assert(subpass->color_count <=
|
||||
create_info->pColorBlendState->attachmentCount);
|
||||
assert(!subpass->color_count ||
|
||||
subpass->color_count <= create_info->pColorBlendState->attachmentCount);
|
||||
builder->active_color_attachments = 0;
|
||||
for (uint32_t i = 0; i < subpass->color_count; i++) {
|
||||
uint32_t idx = subpass->color_attachments[i].attachment;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue