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