vk/meta: Don't skip clearing when clearing only depth attachment
authorChad Versace <chad.versace@intel.com>
Fri, 28 Aug 2015 14:58:51 +0000 (07:58 -0700)
committerChad Versace <chad.versace@intel.com>
Fri, 28 Aug 2015 14:58:51 +0000 (07:58 -0700)
anv_cmd_buffer_clear_attachments() skipped the clear renderpass if no
color attachments needed to be cleared, even if a depth attachment
needed to be cleared.

src/vulkan/anv_meta.c

index cdd357ddcc9ca31d3cc9917ace59c1b145ea7081..201e3da41b3c40b64f8004b5560d15afada301a3 100644 (file)
@@ -324,7 +324,8 @@ anv_cmd_buffer_clear_attachments(struct anv_cmd_buffer *cmd_buffer,
    if (pass->has_stencil_clear_attachment)
       anv_finishme("stencil clear");
 
-   if (pass->num_color_clear_attachments == 0)
+   if (pass->num_color_clear_attachments == 0 &&
+       !pass->has_depth_clear_attachment)
       return;
 
    struct clear_instance_data instance_data[pass->num_color_clear_attachments];