<html><head></head><body><div><span style="font-family: monospace; white-space: normal;">Reviewed-by: Samuel Iglesias Gonsálvez <</span><a href="mailto:siglesias@igalia.com" style="white-space: normal; font-family: monospace;">siglesias@igalia.com</a><span style="font-family: monospace; white-space: normal;">></span><br style="font-family: monospace; white-space: normal;"></div><div><span style="font-family: monospace; white-space: normal;"><br></span></div><div>On Sun, 2017-09-03 at 21:54 -0700, Jason Ekstrand wrote:</div><blockquote type="cite"><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 type="cite">`anv_formats[ARRAY_SIZE(anv_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_formats.c b/src/intel/vulkan/anv_formats.c<br>
index c23b143cac..eead1aa790 100644<br>
--- a/src/intel/vulkan/anv_formats.c<br>
+++ b/src/intel/vulkan/anv_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_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><br></blockquote></div><br></div>
<pre>_______________________________________________
mesa-dev mailing list
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</pre></blockquote></body></html>