lavapipe: VK_KHR_dynamic_rendering

this is a conformant implementation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13627>
This commit is contained in:
Mike Blumenkrantz
2021-10-04 14:56:31 -04:00
committed by Marge Bot
parent dd71cc8947
commit 8a6160a354
3 changed files with 196 additions and 4 deletions

View File

@@ -279,6 +279,7 @@ deep_copy_graphics_create_info(void *mem_ctx,
VkPipelineVertexInputStateCreateInfo *vertex_input;
VkPipelineRasterizationStateCreateInfo *rasterization_state;
LVP_FROM_HANDLE(lvp_render_pass, pass, src->renderPass);
const VkPipelineRenderingCreateInfoKHR *rp_info = vk_find_struct_const(src->pNext, PIPELINE_RENDERING_CREATE_INFO_KHR);
dst->sType = src->sType;
dst->pNext = NULL;
@@ -367,7 +368,8 @@ deep_copy_graphics_create_info(void *mem_ctx,
dst->pMultisampleState = NULL;
/* pDepthStencilState */
if (src->pDepthStencilState && !rasterization_disabled && pass->has_zs_attachment) {
if (src->pDepthStencilState && !rasterization_disabled &&
(pass ? pass->has_zs_attachment : (rp_info->depthAttachmentFormat || rp_info->stencilAttachmentFormat))) {
LVP_PIPELINE_DUP(dst->pDepthStencilState,
src->pDepthStencilState,
VkPipelineDepthStencilStateCreateInfo,
@@ -376,7 +378,8 @@ deep_copy_graphics_create_info(void *mem_ctx,
dst->pDepthStencilState = NULL;
/* pColorBlendState */
if (src->pColorBlendState && !rasterization_disabled && pass->has_color_attachment) {
if (src->pColorBlendState && !rasterization_disabled &&
(pass ? pass->has_color_attachment : rp_info->colorAttachmentCount)) {
VkPipelineColorBlendStateCreateInfo* cb_state;
cb_state = ralloc(mem_ctx, VkPipelineColorBlendStateCreateInfo);