mesa: Refactor element type checking into its own function
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 25 Jul 2012 14:24:58 +0000 (07:24 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 25 Aug 2012 02:13:12 +0000 (19:13 -0700)
commita33f360e8f8138c5b37b5e33324283e764d0750c
tree4c9d0fb36a321f2fcc880da8deef1d632d5bf94b
parent229868edf7f4232a4d97867a2ccea12db4c8cf57
mesa: Refactor element type checking into its own function

This consolidates the tests and makes the emitted error message
consistent.

v2: Rename _mesa_valid_element_type to valid_elements_type.  Log the
enum string instead of the hex value in error messages.  Based on review
comments from Brian Paul and Ken Graunke.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/api_validate.c