summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2018-06-25 16:22:43 +0200
committerDylan Baker <dylan@pnwbakers.com>2018-06-26 08:27:27 -0700
commit0747f76b85584d8bb383cf3d0d0efc69a50e63cd (patch)
tree3f7875bb64074e8c9e48cfab3f473cca667f36a5
parentf77cae2c59d098000a3b6b682f36c80719782524 (diff)
radv: ignore pInheritanceInfo for primary command buffers
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> (cherry picked from commit ba5e25ed293bc060be2ba7ed840a22458454b3cf)
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index f9e792fde2..3fcbceac5a 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2191,7 +2191,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);