diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-07-22 10:09:00 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-07-22 10:09:00 +0000 |
commit | 41413ff1bea9475ab42d9fc9650acc70b8178bcc (patch) | |
tree | 5dfeb9b342764b80d4ad8d408355d0bde434ee12 /lib | |
parent | f7dcae8e84b4828553d468ef7800a84acab42fae (diff) |
Import Mesa 21.1.5
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mesa/src/gallium/frontends/lavapipe/lvp_pass.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/lib/mesa/src/gallium/frontends/lavapipe/lvp_pass.c b/lib/mesa/src/gallium/frontends/lavapipe/lvp_pass.c index 22b729d6e..e1bf45879 100644 --- a/lib/mesa/src/gallium/frontends/lavapipe/lvp_pass.c +++ b/lib/mesa/src/gallium/frontends/lavapipe/lvp_pass.c @@ -138,14 +138,10 @@ lvp_render_pass_compile(struct lvp_render_pass *pass) static unsigned lvp_num_subpass_attachments2(const VkSubpassDescription2 *desc) { - const VkSubpassDescriptionDepthStencilResolve *ds_resolve = - vk_find_struct_const(desc->pNext, - SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE); return desc->inputAttachmentCount + desc->colorAttachmentCount + (desc->pResolveAttachments ? desc->colorAttachmentCount : 0) + - (desc->pDepthStencilAttachment != NULL) + - (ds_resolve && ds_resolve->pDepthStencilResolveAttachment); + (desc->pDepthStencilAttachment != NULL); } VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateRenderPass2( @@ -167,7 +163,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateRenderPass2( pass = vk_alloc2(&device->vk.alloc, pAllocator, size, 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (pass == NULL) - return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY); + return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY); /* Clear the subpasses along with the parent pass. This required because * each array member of lvp_subpass must be a valid pointer if not NULL. @@ -189,10 +185,6 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateRenderPass2( att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp; att->final_layout = pCreateInfo->pAttachments[i].finalLayout; att->first_subpass_idx = UINT32_MAX; - - bool is_zs = util_format_is_depth_or_stencil(lvp_vk_format_to_pipe_format(att->format)); - pass->has_zs_attachment |= is_zs; - pass->has_color_attachment |= !is_zs; } uint32_t subpass_attachment_count = 0; for (uint32_t i = 0; i < pCreateInfo->subpassCount; i++) { @@ -206,7 +198,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateRenderPass2( VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (pass->subpass_attachments == NULL) { vk_free2(&device->vk.alloc, pAllocator, pass); - return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY); + return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY); } } else pass->subpass_attachments = NULL; @@ -266,21 +258,6 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateRenderPass2( .layout = desc->pDepthStencilAttachment->layout, }; } - - const VkSubpassDescriptionDepthStencilResolve *ds_resolve = - vk_find_struct_const(desc->pNext, SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE); - - if (ds_resolve && ds_resolve->pDepthStencilResolveAttachment) { - subpass->ds_resolve_attachment = p++; - - *subpass->ds_resolve_attachment = (struct lvp_subpass_attachment){ - .attachment = ds_resolve->pDepthStencilResolveAttachment->attachment, - .layout = ds_resolve->pDepthStencilResolveAttachment->layout, - }; - - subpass->depth_resolve_mode = ds_resolve->depthResolveMode; - subpass->stencil_resolve_mode = ds_resolve->stencilResolveMode; - } } lvp_render_pass_compile(pass); |