lavapipe: don't access pipeline dsa state when it should be ignored
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 5 May 2021 13:29:25 +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 d62fda5..d79887e 100644 (file)
@@ -248,6 +248,7 @@ deep_copy_graphics_create_info(void *mem_ctx,
    VkResult result;
    VkPipelineShaderStageCreateInfo *stages;
    VkPipelineVertexInputStateCreateInfo *vertex_input;
+   LVP_FROM_HANDLE(lvp_render_pass, pass, src->renderPass);
 
    dst->sType = src->sType;
    dst->pNext = NULL;
@@ -331,7 +332,7 @@ deep_copy_graphics_create_info(void *mem_ctx,
       dst->pMultisampleState = NULL;
 
    /* pDepthStencilState */
-   if (src->pDepthStencilState) {
+   if (src->pDepthStencilState && !rasterization_disabled && pass->has_zs_attachment) {
       LVP_PIPELINE_DUP(dst->pDepthStencilState,
                        src->pDepthStencilState,
                        VkPipelineDepthStencilStateCreateInfo,