radv: ignore pInheritanceInfo for primary command buffers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 25 Jun 2018 14:22:43 +0000 (16:22 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 26 Jun 2018 08:39:43 +0000 (10:39 +0200)
From the Vulkan spec:
"If this is a primary command buffer, then this value is ignored."

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

index 0388e4b6e0e9751218e524d3cd0636c6df04bf44..110a9a960a97b1357ea85b9c438b50d6fc7e6f3a 100644 (file)
@@ -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);