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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user