summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_pipeline.c
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2018-05-07 08:42:56 +0200
committerSamuel Iglesias Gonsálvez <[email protected]>2018-05-09 07:01:10 +0200
commit2cf64fdb4623cb145e51f615cf0baf85de23234d (patch)
tree2c8275db981e45532739628b38cb7636999e130e /src/intel/vulkan/genX_pipeline.c
parente7a7b712fe81aac96eaae267ad6cb5444f02e7f6 (diff)
anv: ignore pColorBlendState if all color attachments of the subpass are unused
According to Vulkan spec: "pColorBlendState is a pointer to an instance of the VkPipelineColorBlendStateCreateInfo structure, and is ignored if the pipeline has rasterization disabled or if the subpass of the render pass the pipeline is created against does not use any color attachments." Fixes tests from CL#2505: dEQP-VK.renderpass.*.simple.color_unused_omit_blend_state v2: - Check that blend is not NULL before usage. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline.c')
-rw-r--r--src/intel/vulkan/genX_pipeline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index d3af9304ba3..6016d257584 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -1361,7 +1361,7 @@ has_color_buffer_write_enabled(const struct anv_pipeline *pipeline,
if (binding->index == UINT32_MAX)
continue;
- if (blend->pAttachments[binding->index].colorWriteMask != 0)
+ if (blend && blend->pAttachments[binding->index].colorWriteMask != 0)
return true;
}