From: Samuel Pitoiset Date: Mon, 25 Jun 2018 14:22:43 +0000 (+0200) Subject: radv: ignore pInheritanceInfo for primary command buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba5e25ed293bc060be2ba7ed840a22458454b3cf;p=mesa.git radv: ignore pInheritanceInfo for primary command buffers From the Vulkan spec: "If this is a primary command buffer, then this value is ignored." CC: Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 0388e4b6e0e..110a9a960a9 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2285,7 +2285,8 @@ VkResult radv_BeginCommandBuffer( } } - if (pBeginInfo->flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) { + if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY && + (pBeginInfo->flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)) { assert(pBeginInfo->pInheritanceInfo); cmd_buffer->state.framebuffer = radv_framebuffer_from_handle(pBeginInfo->pInheritanceInfo->framebuffer); cmd_buffer->state.pass = radv_render_pass_from_handle(pBeginInfo->pInheritanceInfo->renderPass);