anv: remove a format assert when setting up attachments

There are exceptions in spec where the framebuffer image format and
format given for render pass attachment may differ. This happens in
particular when subpass has resolve attachment that might resolve
only depth from a combined depth+stencil format. There the formats do
not need to match but be 'compatible' with each other.

As example using VK_FORMAT_D32_SFLOAT format is considered compatible
when actual framebuffer format is VK_FORMAT_D32_SFLOAT_S8_UINT.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13082>
This commit is contained in:
Tapani Pälli 2021-09-28 13:20:53 +03:00 committed by Marge Bot
parent fa655b6f70
commit 8cc4e0b0c4

View file

@ -1614,7 +1614,6 @@ genX(cmd_buffer_setup_attachments)(struct anv_cmd_buffer *cmd_buffer,
att_state->clear_value = begin->pClearValues[i];
struct anv_image_view *iview = state->attachments[i].image_view;
anv_assert(iview->vk.format == pass_att->format);
const uint32_t num_layers = iview->planes[0].isl.array_len;
att_state->pending_clear_views = (1 << num_layers) - 1;