Commit d76e7779 authored by Danylo Piliaiev's avatar Danylo Piliaiev
Browse files

anv: Handle VK_ATTACHMENT_UNUSED in colorAttachment

From the Vulkan 1.0.98 spec for vkCmdClearAttachments:

"If the aspectMask member of any element of pAttachments contains
VK_IMAGE_ASPECT_COLOR_BIT, then the colorAttachment member of that
element must either refer to a color attachment which is VK_ATTACHMENT_UNUSED,
or must be a valid color attachment."
Signed-off-by: Danylo Piliaiev's avatarDanylo Piliaiev <>
Reviewed-by: Tapani Pälli's avatarTapani Pälli <>
Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <>
parent 0d0affad
......@@ -1013,6 +1013,10 @@ clear_color_attachment(struct anv_cmd_buffer *cmd_buffer,
const struct anv_subpass *subpass = cmd_buffer->state.subpass;
const uint32_t color_att = attachment->colorAttachment;
if (color_att == VK_ATTACHMENT_UNUSED)
const uint32_t att_idx = subpass->color_attachments[color_att].attachment;
if (att_idx == VK_ATTACHMENT_UNUSED)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment