`anv_formats[ARRAY_SIZE(anv_formats)]` is already one too far.
Spotted by Coverity.
CovID:
1417259
Fixes: 242211933a0682696170 "anv/formats: Nicely handle unknown VkFormat enums"
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
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;