intel/isl: Fix isl_format_is_valid
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 4 Jun 2021 20:15:30 +0000 (15:15 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 4 Jun 2021 21:16:44 +0000 (16:16 -0500)
commitb742f7391351696d51adbfdf2c7b9b1a7bd5ef7d
tree168f613530d857cf5144efa70e86f9ff64a70c9d
parent90a5fef85cb2b3157f435b1fcf453165a69a7d2c
intel/isl: Fix isl_format_is_valid

The format enum space isn't necessarily contiguous so we can't assume
that if it's in the table it's valid.  We need to check something.

Fixes: ed6e586562f4 "intel: properly constify isl_format_layouts"
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11191>
src/intel/isl/gen_format_layout.py