mesa/formats: only do type and component lookup for uncompressed formats
Only uncompressed formats have a non-void type and actual components per pixel. Rename _mesa_format_to_type_and_comps to _mesa_uncompressed_format_to_type_and_comps and require callers to check if the format is not compressed. v2. include compressed format cases to avoid gcc warnings (Chad). Reviewed-by: Chad Versace <chad.versace@intel.com> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
This commit is contained in:
@@ -602,7 +602,7 @@ _mesa_format_to_array(mesa_format format, GLenum *type, int *num_components,
|
||||
|
||||
*normalized = !_mesa_is_format_integer(format);
|
||||
|
||||
_mesa_format_to_type_and_comps(format, type, &format_components);
|
||||
_mesa_uncompressed_format_to_type_and_comps(format, type, &format_components);
|
||||
|
||||
switch (_mesa_get_format_layout(format)) {
|
||||
case MESA_FORMAT_LAYOUT_ARRAY:
|
||||
|
Reference in New Issue
Block a user