venus: ignore pInheritanceInfo when we should

pInheritanceInfo should be ignored when the command buffer is primary.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4850
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
This commit is contained in:
Chia-I Wu
2021-05-28 08:52:30 -07:00
committed by Marge Bot
parent f7001f7a2d
commit 1d2a33c705
+8
View File
@@ -211,6 +211,14 @@ vn_BeginCommandBuffer(VkCommandBuffer commandBuffer,
vn_cs_encoder_reset(&cmd->cs);
VkCommandBufferBeginInfo local_begin_info;
if (pBeginInfo->pInheritanceInfo &&
cmd->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY) {
local_begin_info = *pBeginInfo;
local_begin_info.pInheritanceInfo = NULL;
pBeginInfo = &local_begin_info;
}
cmd_size = vn_sizeof_vkBeginCommandBuffer(commandBuffer, pBeginInfo);
if (!vn_cs_encoder_reserve(&cmd->cs, cmd_size)) {
cmd->state = VN_COMMAND_BUFFER_STATE_INVALID;