radv: Handle VK_ATTACHMENT_UNUSED in CmdClearAttachment
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Thu, 31 Jan 2019 13:56:21 +0000 (15:56 +0200)
committerDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Mon, 4 Feb 2019 12:50:43 +0000 (14:50 +0200)
commitb7a93cbdede05af6bf5cad0a67d1a6045c52369f
tree48ad3128df93e1f3e448c1af6288077343174ddf
parentd76e7779884775bcebf235adb0e8367816b9b95d
radv: Handle VK_ATTACHMENT_UNUSED in CmdClearAttachment

From the Vulkan 1.0.98 spec for vkCmdClearAttachments:

"If any attachment to be cleared in the current subpass is VK_ATTACHMENT_UNUSED,
then the clear has no effect on that attachment."

"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."

"If the aspectMask member of any element of pAttachments contains
VK_IMAGE_ASPECT_DEPTH_BIT, then the current subpass' depth/stencil attachment
must either be VK_ATTACHMENT_UNUSED, or must have a depth component"

"If the aspectMask member of any element of pAttachments contains
VK_IMAGE_ASPECT_STENCIL_BIT, then the current subpass' depth/stencil attachment
must either be VK_ATTACHMENT_UNUSED, or must have a stencil component"

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_clear.c