anv/cmd_buffer: Move the clear_subpasses calls to set_subpass
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 5 Oct 2016 23:54:57 +0000 (16:54 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 6 Oct 2016 23:52:31 +0000 (16:52 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/vulkan/genX_cmd_buffer.c

index 02f81b192d4cdd5365d3e47ce693ae981f2cce0b..a0f6e85c8595ea7b75ad07475814a81b9c98b588 100644 (file)
@@ -1305,6 +1305,8 @@ genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer,
    cmd_buffer->state.dirty |= ANV_CMD_DIRTY_RENDER_TARGETS;
 
    cmd_buffer_emit_depth_stencil(cmd_buffer);
+
+   anv_cmd_buffer_clear_subpass(cmd_buffer);
 }
 
 void genX(CmdBeginRenderPass)(
@@ -1324,7 +1326,6 @@ void genX(CmdBeginRenderPass)(
    genX(flush_pipeline_select_3d)(cmd_buffer);
 
    genX(cmd_buffer_set_subpass)(cmd_buffer, pass->subpasses);
-   anv_cmd_buffer_clear_subpass(cmd_buffer);
 }
 
 void genX(CmdNextSubpass)(
@@ -1337,7 +1338,6 @@ void genX(CmdNextSubpass)(
 
    anv_cmd_buffer_resolve_subpass(cmd_buffer);
    genX(cmd_buffer_set_subpass)(cmd_buffer, cmd_buffer->state.subpass + 1);
-   anv_cmd_buffer_clear_subpass(cmd_buffer);
 }
 
 void genX(CmdEndRenderPass)(