summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/vulkan/anv_blorp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index fbe3e82af59..f4eaf8f4db1 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -1013,10 +1013,7 @@ 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;
-
+ assert(color_att < subpass->color_count);
const uint32_t att_idx = subpass->color_attachments[color_att].attachment;
if (att_idx == VK_ATTACHMENT_UNUSED)