[Mesa-dev] [PATCH] radv: Emit pending flushes before executing a secondary command buffer
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Mon Mar 6 18:20:00 UTC 2017
Nice catch.
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Mon, Mar 6, 2017 at 3:54 PM, Alex Smith <asmith at feralinteractive.com> wrote:
> 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 at feralinteractive.com>
> ---
> src/amd/vulkan/radv_cmd_buffer.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index 3ff5250..d99288a 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -2110,6 +2110,9 @@ void radv_CmdExecuteCommands(
> {
> RADV_FROM_HANDLE(radv_cmd_buffer, primary, commandBuffer);
>
> + /* Emit pending flushes on primary prior to executing secondary */
> + si_emit_cache_flush(primary);
> +
> for (uint32_t i = 0; i < commandBufferCount; i++) {
> RADV_FROM_HANDLE(radv_cmd_buffer, secondary, pCmdBuffers[i]);
>
> --
> 2.7.4
>
More information about the mesa-dev
mailing list