anv: Do not assert() on VK_ATTACHMENT_UNUSED
authorJózef Kucia <joseph.kucia@gmail.com>
Mon, 9 Oct 2017 20:42:06 +0000 (22:42 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 9 Oct 2017 23:28:43 +0000 (16:28 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: mesa-stable@lists.freedesktop.org
src/intel/vulkan/genX_cmd_buffer.c

index 93d360a1bbe3a88e604392fa63eb442ac469ad33..43437c8eb0f6b81d4d2a8c9e001f75be1078eba5 100644 (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];