OSDN Git Service

mesa/texformat: use format conversion function in _mesa_choose_tex_format
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 12 Aug 2015 21:41:50 +0000 (14:41 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Mon, 31 Aug 2015 22:03:21 +0000 (15:03 -0700)
commit76f17266ec68c644b2609d355018329636ae8e75
tree707c09b1b1b15ccdc323b7c5796d762935c85b1d
parent01024ded1e791b33353ffa09d4e3dfb5b638179d
mesa/texformat: use format conversion function in _mesa_choose_tex_format

This function's cases for non-generic compressed formats duplicate
the GL to MESA translation in _mesa_glenum_to_compressed_format().
This patch replaces the switch cases with a call to the translation
function. This change teaches this function about ASTC, thus enabling
ASTC for glTex*Storage*() calls.

Reviewed-by: Chad Versace <chad.versace@intel.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
src/mesa/main/texformat.c