mesa/teximage: reuse compressed format utility functions for base_format
authorNanley Chery <nanley.g.chery@intel.com>
Thu, 27 Aug 2015 23:29:06 +0000 (16:29 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Sat, 19 Sep 2015 20:27:15 +0000 (13:27 -0700)
commit99b1f4751f97631011b64fabcb57acf6beae01ac
treeb9525ae1da0b49095de5f095f1cb41635a210a68
parentdb2777091d70c7abd28e0a8aac16b4a416e42e81
mesa/teximage: reuse compressed format utility functions for base_format

Reuse utility functions instead of reimplementing the same logic.

* _mesa_is_compressed_format() performs the required checking to
  determine format support in the current context.
* _mesa_gl_compressed_format_base_format() returns the base format.

As a side effect, we now check that we're in a desktop context when
determining support for the FXT1 and RGTC formats. This is in agreement
with our extension table and the glext headers.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
src/mesa/main/teximage.c