summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen7_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vulkan/gen7_state.c')
-rw-r--r--src/vulkan/gen7_state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c
index d7a4b10c6e8..5829d03d3e3 100644
--- a/src/vulkan/gen7_state.c
+++ b/src/vulkan/gen7_state.c
@@ -369,6 +369,7 @@ gen7_color_attachment_view_init(struct anv_image_view *iview,
struct anv_surface *surface =
anv_image_get_surface_for_color_attachment(image);
+ assert(image->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
anv_assert(pCreateInfo->arraySize > 0);
anv_assert(pCreateInfo->mipLevel < image->levels);
anv_assert(pCreateInfo->baseArraySlice + pCreateInfo->arraySize <= image->array_size);