venus: scrub ignored fields for descriptor writes for push descriptor

Fixes: 933ca11f1a ("venus: implement vkCmdPushDescriptorSetWithTemplateKHR")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20191>
This commit is contained in:
Yiwei Zhang
2022-12-06 14:03:02 -08:00
committed by Marge Bot
parent e1ab7629f8
commit 34b28cfb7d
3 changed files with 33 additions and 8 deletions
+14 -1
View File
@@ -2052,8 +2052,21 @@ vn_CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer,
uint32_t descriptorWriteCount,
const VkWriteDescriptorSet *pDescriptorWrites)
{
struct vn_command_buffer *cmd =
vn_command_buffer_from_handle(commandBuffer);
struct vn_update_descriptor_sets *update =
vn_update_descriptor_sets_parse_writes(
descriptorWriteCount, pDescriptorWrites, &cmd->allocator, layout);
if (!update) {
cmd->state = VN_COMMAND_BUFFER_STATE_INVALID;
vn_log(cmd->device->instance, "descriptor set push ignored due to OOM");
return;
}
VN_CMD_ENQUEUE(vkCmdPushDescriptorSetKHR, commandBuffer, pipelineBindPoint,
layout, set, descriptorWriteCount, pDescriptorWrites);
layout, set, update->write_count, update->writes);
vk_free(&cmd->allocator, update);
}
void