zink: set VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT when using DB
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 25 Jan 2023 16:55:13 +0000 (11:55 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 27 Jan 2023 19:23:29 +0000 (19:23 +0000)
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20912>

src/gallium/drivers/zink/zink_pipeline.c

index e7e0e56..fc6f4d8 100644 (file)
@@ -339,6 +339,8 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
       else
          warn_missing_feature(feedback_warn, "EXT_attachment_feedback_loop_layout");
    }
+   if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB)
+      pci.flags |= VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT;
    pci.layout = prog->base.layout;
    if (state->render_pass)
       pci.renderPass = state->render_pass->render_pass;
@@ -541,6 +543,8 @@ zink_create_gfx_pipeline_output(struct zink_screen *screen, struct zink_gfx_pipe
       else
          warn_missing_feature(feedback_warn, "EXT_attachment_feedback_loop_layout");
    }
+   if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB)
+      pci.flags |= VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT;
    pci.pColorBlendState = &blend_state;
    pci.pMultisampleState = &ms_state;
    pci.pDynamicState = &pipelineDynamicStateCreateInfo;
@@ -768,6 +772,8 @@ zink_create_gfx_pipeline_combined(struct zink_screen *screen, struct zink_gfx_pr
       pci.flags = VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT;
    else
       pci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT;
+   if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB)
+      pci.flags |= VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT;
    pci.pNext = &libstate;
 
    VkPipeline pipeline;