mesa: Add debug info to _mesa_format_from_format_and_type() error path.

The unreachable() that follows isn't very useful for debug, and by adding
this here we get a nice description of the failure in debug builds.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2019-09-18 14:46:49 -07:00
parent 0a4e6726ba
commit df5fe86232
1 changed files with 4 additions and 0 deletions

View File

@ -3747,6 +3747,10 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
break;
}
fprintf(stderr, "Unsupported format/type: %s/%s\n",
_mesa_enum_to_string(format),
_mesa_enum_to_string(type));
/* If we got here it means that we could not find a Mesa format that
* matches the GL format/type provided. We may need to add a new Mesa
* format in that case.