summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/vulkan/anv_formats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index c23b143cac2..eead1aa7909 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -253,7 +253,7 @@ static const struct anv_format anv_formats[] = {
static bool
format_supported(VkFormat vk_format)
{
- if (vk_format > ARRAY_SIZE(anv_formats))
+ if (vk_format >= ARRAY_SIZE(anv_formats))
return false;
return anv_formats[vk_format].isl_format != ISL_FORMAT_UNSUPPORTED;