diff options
author | Danylo Piliaiev <[email protected]> | 2019-01-31 15:49:35 +0200 |
---|---|---|
committer | Danylo Piliaiev <[email protected]> | 2019-02-04 14:49:50 +0200 |
commit | d76e7779884775bcebf235adb0e8367816b9b95d (patch) | |
tree | c85fe94a7358b85dc5173a1e4ed80dc3b2c96f41 /src/intel/vulkan | |
parent | 0d0affad3c37c8d2d37e5abc6fa4a9a22f7e3d86 (diff) |
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 <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_blorp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 0593b17099d..fbe3e82af59 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -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) + return; + const uint32_t att_idx = subpass->color_attachments[color_att].attachment; if (att_idx == VK_ATTACHMENT_UNUSED) |