<div dir="ltr"><div>I sent the same patch a few hours later. I don't care which one we land. You have a more descriptive commit message.<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 3, 2017 at 11:33 AM, Eric Engestrom <span dir="ltr"><<a href="mailto:eric@engestrom.ch" target="_blank">eric@engestrom.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">`anv_formats[ARRAY_SIZE(anv_<wbr>formats)]` is already one too far.<br>
Spotted by Coverity.<br>
<br>
CovID: 1417259<br>
Fixes: 242211933a0682696170 "anv/formats: Nicely handle unknown VkFormat enums"<br>
Cc: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br>
Signed-off-by: Eric Engestrom <<a href="mailto:eric@engestrom.ch">eric@engestrom.ch</a>><br>
---<br>
src/intel/vulkan/anv_formats.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>formats.c b/src/intel/vulkan/anv_<wbr>formats.c<br>
index c23b143cac..eead1aa790 100644<br>
--- a/src/intel/vulkan/anv_<wbr>formats.c<br>
+++ b/src/intel/vulkan/anv_<wbr>formats.c<br>
@@ -253,7 +253,7 @@ static const struct anv_format anv_formats[] = {<br>
static bool<br>
format_supported(VkFormat vk_format)<br>
{<br>
- if (vk_format > ARRAY_SIZE(anv_formats))<br>
+ if (vk_format >= ARRAY_SIZE(anv_formats))<br>
return false;<br>
<br>
return anv_formats[vk_format].isl_<wbr>format != ISL_FORMAT_UNSUPPORTED;<br>
<span class="HOEnZb"><font color="#888888">--<br>
Cheers,<br>
Eric<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>