anv: Do not assert() on VK_ATTACHMENT_UNUSED

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
Józef Kucia
2017-10-09 22:42:06 +02:00
committed by Jason Ekstrand
parent e0acb630a5
commit 91ba331ef4

View File

@@ -2996,10 +2996,11 @@ cmd_buffer_subpass_sync_fast_clear_values(struct anv_cmd_buffer *cmd_buffer)
* render pass and used in the subpass.
*/
const uint32_t a = state->subpass->color_attachments[i].attachment;
assert(a < state->pass->attachment_count);
if (a == VK_ATTACHMENT_UNUSED)
continue;
assert(a < state->pass->attachment_count);
/* Store some information regarding this attachment. */
const struct anv_attachment_state *att_state = &state->attachments[a];
const struct anv_image_view *iview = state->framebuffer->attachments[a];