mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
mesa: Handle GL_COLOR_INDEX in _mesa_format_from_format_and_type().
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>
This commit is contained in:
parent
ea232c7cfd
commit
69f109cc37
1 changed files with 3 additions and 0 deletions
|
|
@ -3566,6 +3566,9 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
|
|||
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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue