[Mesa-dev] [PATCH 2/2] anv/cmd_buffer: Move the clear_subpasses calls to set_subpass

Jason Ekstrand jason at jlekstrand.net
Thu Oct 6 00:36:44 UTC 2016


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/intel/vulkan/genX_cmd_buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 1dff6a1..9466601 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -1301,6 +1301,8 @@ genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer,
    cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_FRAGMENT_BIT;
 
    cmd_buffer_emit_depth_stencil(cmd_buffer);
+
+   anv_cmd_buffer_clear_subpass(cmd_buffer);
 }
 
 void genX(CmdBeginRenderPass)(
@@ -1320,7 +1322,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)(
@@ -1333,7 +1334,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)(
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list