mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-27 09:31:03 +00:00
tu: Fix logic errors with subpass implicit dependencies
We were adding them if there was an external dep instead of if there wasn't, and we were skipping the entire subpass which would've resulted in attachments not getting marked as used. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12386>
This commit is contained in:
parent
dcf1d8d7a4
commit
09e0b29bb6
@ -3,7 +3,3 @@ dEQP-GLES31.functional.blend_equation_advanced.msaa.exclusion,Fail
|
||||
dEQP-GLES31.functional.blend_equation_advanced.msaa.hardlight,Fail
|
||||
dEQP-GLES31.functional.blend_equation_advanced.msaa.multiply,Fail
|
||||
dEQP-GLES31.functional.blend_equation_advanced.msaa.overlay,Fail
|
||||
dEQP-VK.renderpass.dedicated_allocation.attachment_allocation.input_output.7,Fail
|
||||
dEQP-VK.renderpass.suballocation.attachment_allocation.input_output.7,Fail
|
||||
dEQP-VK.renderpass.suballocation.subpass_dependencies.implicit_dependencies.render_passes_5,Fail
|
||||
dEQP-VK.renderpass2.suballocation.subpass_dependencies.implicit_dependencies.render_passes_3,Fail
|
||||
|
@ -212,9 +212,6 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
||||
memset(att_used, 0, sizeof(att_used));
|
||||
|
||||
for (unsigned i = 0; i < info->subpassCount; i++) {
|
||||
if (!has_external_src[i])
|
||||
continue;
|
||||
|
||||
const VkSubpassDescription2 *subpass = &info->pSubpasses[i];
|
||||
bool src_implicit_dep = false;
|
||||
|
||||
@ -222,7 +219,8 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
||||
uint32_t a = subpass->pInputAttachments[j].attachment;
|
||||
if (a == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
if (att[a].initialLayout != subpass->pInputAttachments[j].layout && !att_used[a])
|
||||
if (att[a].initialLayout != subpass->pInputAttachments[j].layout &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
src_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
@ -231,7 +229,8 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
||||
uint32_t a = subpass->pColorAttachments[j].attachment;
|
||||
if (a == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
if (att[a].initialLayout != subpass->pColorAttachments[j].layout && !att_used[a])
|
||||
if (att[a].initialLayout != subpass->pColorAttachments[j].layout &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
src_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
@ -241,7 +240,8 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
||||
uint32_t a = subpass->pResolveAttachments[j].attachment;
|
||||
if (a == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
if (att[a].initialLayout != subpass->pResolveAttachments[j].layout && !att_used[a])
|
||||
if (att[a].initialLayout != subpass->pResolveAttachments[j].layout &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
src_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
@ -267,9 +267,6 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
||||
memset(att_used, 0, sizeof(att_used));
|
||||
|
||||
for (int i = info->subpassCount - 1; i >= 0; i--) {
|
||||
if (!has_external_dst[i])
|
||||
continue;
|
||||
|
||||
const VkSubpassDescription2 *subpass = &info->pSubpasses[i];
|
||||
bool dst_implicit_dep = false;
|
||||
|
||||
@ -277,7 +274,8 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
||||
uint32_t a = subpass->pInputAttachments[j].attachment;
|
||||
if (a == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
if (att[a].finalLayout != subpass->pInputAttachments[j].layout && !att_used[a])
|
||||
if (att[a].finalLayout != subpass->pInputAttachments[j].layout &&
|
||||
!att_used[a] && !has_external_dst[i])
|
||||
dst_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
@ -286,7 +284,8 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
||||
uint32_t a = subpass->pColorAttachments[j].attachment;
|
||||
if (a == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
if (att[a].finalLayout != subpass->pColorAttachments[j].layout && !att_used[a])
|
||||
if (att[a].finalLayout != subpass->pColorAttachments[j].layout &&
|
||||
!att_used[a] && !has_external_dst[i])
|
||||
dst_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
@ -296,7 +295,8 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
||||
uint32_t a = subpass->pResolveAttachments[j].attachment;
|
||||
if (a == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
if (att[a].finalLayout != subpass->pResolveAttachments[j].layout && !att_used[a])
|
||||
if (att[a].finalLayout != subpass->pResolveAttachments[j].layout &&
|
||||
!att_used[a] && !has_external_dst[i])
|
||||
dst_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user