anv/pass: Don't set first_subpass_layout for stencil-only attachments

Cc: mesa-stable@lists.freedesktop.org

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13980>
This commit is contained in:
Jason Ekstrand 2021-10-26 12:38:18 -05:00 committed by Iván Briano
parent ee044d445d
commit 6612dcc425

View file

@ -107,7 +107,11 @@ anv_render_pass_compile(struct anv_render_pass *pass)
all_usage |= subpass_att->usage;
if (pass_att->first_subpass_layout == VK_IMAGE_LAYOUT_UNDEFINED) {
/* first_subpass_layout only applies to color and depth.
* See genX(cmd_buffer_setup_attachments)
*/
if (vk_format_aspects(pass_att->format) != VK_IMAGE_ASPECT_STENCIL_BIT &&
pass_att->first_subpass_layout == VK_IMAGE_LAYOUT_UNDEFINED) {
pass_att->first_subpass_layout = subpass_att->layout;
assert(pass_att->first_subpass_layout != VK_IMAGE_LAYOUT_UNDEFINED);
}