lavapipe: don't access pipeline blend state when it should be ignored
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 5 May 2021 13:29:41 +0000 (09:29 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 6 May 2021 14:59:32 +0000 (14:59 +0000)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

src/gallium/frontends/lavapipe/lvp_pipeline.c

index d79887e..333cbd6 100644 (file)
@@ -341,7 +341,7 @@ deep_copy_graphics_create_info(void *mem_ctx,
       dst->pDepthStencilState = NULL;
 
    /* pColorBlendState */
-   if (src->pColorBlendState) {
+   if (src->pColorBlendState && !rasterization_disabled && pass->has_color_attachment) {
       VkPipelineColorBlendStateCreateInfo*    cb_state;
 
       cb_state = ralloc(mem_ctx, VkPipelineColorBlendStateCreateInfo);