mesa: Prepare for the MESA_FORMAT_* enum to be sparse.
authorEric Anholt <eric@anholt.net>
Fri, 6 Sep 2019 21:09:37 +0000 (14:09 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 7 Nov 2019 19:43:41 +0000 (19:43 +0000)
commitd27dda907aca8d7b92b7330c498958e01eb962ae
tree50ad3fd44eac9aaa455a6ee5043ed2b7df76c606
parent6b1c250245e4e29ea42e853ee094a8d6e9d1b665
mesa: Prepare for the MESA_FORMAT_* enum to be sparse.

To redefine MESA_FORMAT in terms of PIPE_FORMAT enums, we need to fix
places where we iterated up to MESA_FORMAT_COUNT.  I use
_mesa_get_format_name(f) == NULL as the signal that it's not an enum
value with a MESA_FORMAT.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/drivers/dri/i965/brw_surface_formats.c
src/mesa/main/format_info.py
src/mesa/main/formats.c
src/mesa/main/tests/mesa_formats.cpp
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/tests/st_format.c