radv: Emit pending flushes before executing a secondary command buffer
authorAlex Smith <asmith@feralinteractive.com>
Mon, 6 Mar 2017 14:54:28 +0000 (14:54 +0000)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 6 Mar 2017 18:46:14 +0000 (19:46 +0100)
commit290d7e892dfa6d04767142f4f6d7ec689933a105
tree274dead0d2b5df2d816faea7dc9177a1805495c2
parent052c81faa1147ab758dc4430e4483c7d9fc5fe25
radv: Emit pending flushes before executing a secondary command buffer

If we have any pending flushes on the primary command buffer, these
must be performed before executing the secondary buffer.

This fixes potential corruption when the contents of a subpass which
clears any of its render targets are given in a secondary buffer: the
flushes after a fast clear would not have been performed until the
vkCmdEndRenderPass call.

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
src/amd/vulkan/radv_cmd_buffer.c