[Mesa-dev] [PATCH] radv: ignore pInheritanceInfo for primary command buffers

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Jun 25 14:22:43 UTC 2018


>From the Vulkan spec:
"If this is a primary command buffer, then this value is ignored."

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_cmd_buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 8bd41bc41a..6d3309ff1e 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);
-- 
2.18.0



More information about the mesa-dev mailing list