Just return MESA_FORMAT_NONE to avoid triggering unreachable; there's
really no sensible thing to return for this case anyway.
This prevents regressions in the next commit, which makes st/mesa
start using this function to find a reasonable format from GL format
and type enums.
Reviewed-by: Eric Anholt <eric@anholt.net>
bool normalized = false, is_float = false, is_signed = false;
int num_channels = 0, type_size = 0;
+ if (format == GL_COLOR_INDEX)
+ return MESA_FORMAT_NONE;
+
/* Extract array format type information from the OpenGL data type */
switch (type) {
case GL_UNSIGNED_BYTE: