tu: Consider depth/stencil for implicit dependencies
Noticed by inspection. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12386>
This commit is contained in:
parent
09e0b29bb6
commit
2df5387e38
|
@ -235,6 +235,15 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
att_used[a] = true;
|
||||
}
|
||||
|
||||
if (subpass->pDepthStencilAttachment &&
|
||||
subpass->pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) {
|
||||
uint32_t a = subpass->pDepthStencilAttachment->attachment;
|
||||
if (att[a].initialLayout != subpass->pDepthStencilAttachment->layout &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
src_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
||||
if (subpass->pResolveAttachments) {
|
||||
for (unsigned j = 0; j < subpass->colorAttachmentCount; j++) {
|
||||
uint32_t a = subpass->pResolveAttachments[j].attachment;
|
||||
|
@ -247,6 +256,18 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
}
|
||||
}
|
||||
|
||||
const VkSubpassDescriptionDepthStencilResolve *ds_resolve =
|
||||
vk_find_struct_const(subpass->pNext, SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR);
|
||||
|
||||
if (ds_resolve && ds_resolve->pDepthStencilResolveAttachment &&
|
||||
ds_resolve->pDepthStencilResolveAttachment->attachment != VK_ATTACHMENT_UNUSED) {
|
||||
uint32_t a = ds_resolve->pDepthStencilResolveAttachment->attachment;
|
||||
if (att[a].initialLayout != subpass->pDepthStencilAttachment->layout &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
src_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
||||
if (src_implicit_dep) {
|
||||
tu_render_pass_add_subpass_dep(pass, &(VkSubpassDependency2KHR) {
|
||||
.srcSubpass = VK_SUBPASS_EXTERNAL,
|
||||
|
@ -290,6 +311,15 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
att_used[a] = true;
|
||||
}
|
||||
|
||||
if (subpass->pDepthStencilAttachment &&
|
||||
subpass->pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) {
|
||||
uint32_t a = subpass->pDepthStencilAttachment->attachment;
|
||||
if (att[a].finalLayout != subpass->pDepthStencilAttachment->layout &&
|
||||
!att_used[a] && !has_external_dst[i])
|
||||
dst_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
||||
if (subpass->pResolveAttachments) {
|
||||
for (unsigned j = 0; j < subpass->colorAttachmentCount; j++) {
|
||||
uint32_t a = subpass->pResolveAttachments[j].attachment;
|
||||
|
@ -302,6 +332,18 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
}
|
||||
}
|
||||
|
||||
const VkSubpassDescriptionDepthStencilResolve *ds_resolve =
|
||||
vk_find_struct_const(subpass->pNext, SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR);
|
||||
|
||||
if (ds_resolve && ds_resolve->pDepthStencilResolveAttachment &&
|
||||
ds_resolve->pDepthStencilResolveAttachment->attachment != VK_ATTACHMENT_UNUSED) {
|
||||
uint32_t a = ds_resolve->pDepthStencilResolveAttachment->attachment;
|
||||
if (att[a].finalLayout != subpass->pDepthStencilAttachment->layout &&
|
||||
!att_used[a] && !has_external_dst[i])
|
||||
dst_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
||||
if (dst_implicit_dep) {
|
||||
tu_render_pass_add_subpass_dep(pass, &(VkSubpassDependency2KHR) {
|
||||
.srcSubpass = i,
|
||||
|
|
Loading…
Reference in New Issue