anv/cmd_buffer: Apply subpass flushes before set_subpass
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 21 Nov 2017 20:27:43 +0000 (12:27 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 20 Feb 2018 21:49:24 +0000 (13:49 -0800)
This seems slightly more correct because it means that the flushes
happen before any clears or resolves implied by the subpass transition.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/vulkan/genX_cmd_buffer.c

index 9c50f91b44b4468866316b93e2bc7f981d99fa5d..ada05ccee641aae1a8ea4b2ea453acf5aab7dbbe 100644 (file)
@@ -3520,10 +3520,10 @@ void genX(CmdBeginRenderPass)(
 
    genX(flush_pipeline_select_3d)(cmd_buffer);
 
-   genX(cmd_buffer_set_subpass)(cmd_buffer, pass->subpasses);
-
    cmd_buffer->state.pending_pipe_bits |=
       cmd_buffer->state.pass->subpass_flushes[0];
+
+   genX(cmd_buffer_set_subpass)(cmd_buffer, pass->subpasses);
 }
 
 void genX(CmdNextSubpass)(
@@ -3543,11 +3543,11 @@ void genX(CmdNextSubpass)(
     */
    cmd_buffer_subpass_transition_layouts(cmd_buffer, true);
 
-   genX(cmd_buffer_set_subpass)(cmd_buffer, cmd_buffer->state.subpass + 1);
-
    uint32_t subpass_id = anv_get_subpass_id(&cmd_buffer->state);
    cmd_buffer->state.pending_pipe_bits |=
       cmd_buffer->state.pass->subpass_flushes[subpass_id];
+
+   genX(cmd_buffer_set_subpass)(cmd_buffer, cmd_buffer->state.subpass + 1);
 }
 
 void genX(CmdEndRenderPass)(