mesa/formats: only do type and component lookup for uncompressed formats
authorNanley Chery <nanley.g.chery@intel.com>
Fri, 31 Jul 2015 16:25:56 +0000 (09:25 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Mon, 24 Aug 2015 18:27:46 +0000 (11:27 -0700)
commit9f00af672b59766008994a190730d48ae03773dd
tree7df97076730755923ab358c7f5cae243bfc8e733
parent000e225360c020e8b3de142c4c898baad321d242
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>
src/mesa/main/format_utils.c
src/mesa/main/formats.c
src/mesa/main/formats.h
src/mesa/main/mipmap.c