radv: execute external subpass barriers after ending subpasses
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 29 Jan 2019 21:19:01 +0000 (22:19 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 4 Feb 2019 12:19:14 +0000 (13:19 +0100)
Outgoing dependencies (ie. external) should happen after the subpass.
This doesn't change anything for subpass resolves as we already
make sure that attachments are shader readable.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index e7ae7b37efb1b424c9539ff3e47fa931285cd33e..93982c1232e10d17be17d33182d924faf3e4ed39 100644 (file)
@@ -4356,10 +4356,10 @@ void radv_CmdEndRenderPass(
 {
        RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
 
-       radv_subpass_barrier(cmd_buffer, &cmd_buffer->state.pass->end_barrier);
-
        radv_cmd_buffer_end_subpass(cmd_buffer);
 
+       radv_subpass_barrier(cmd_buffer, &cmd_buffer->state.pass->end_barrier);
+
        vk_free(&cmd_buffer->pool->alloc, cmd_buffer->state.attachments);
 
        cmd_buffer->state.pass = NULL;