From 9f00af672b59766008994a190730d48ae03773dd Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Fri, 31 Jul 2015 09:25:56 -0700 Subject: 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 Signed-off-by: Nanley Chery --- src/mesa/main/format_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main/format_utils.c') diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c index 810bb16..5fdabd5 100644 --- a/src/mesa/main/format_utils.c +++ b/src/mesa/main/format_utils.c @@ -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: -- cgit v1.1