glsl_type: Simplify glsl_channel_type
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 12 Dec 2018 21:25:47 +0000 (15:25 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 8 Jan 2019 00:38:29 +0000 (00:38 +0000)
commit7f70b3e55514f1744e9aab6d2145e855603bd1dc
tree269bdb639d683951e060ad5d732adc288703d840
parentd8a11bfc0850defbd4d3dd1fdc0de0e8901bfdc4
glsl_type: Simplify glsl_channel_type

This is C++ so we can just poke at the fields of glsl_type if we wish
and calling get_instance is way easier and more reliable than handling
each instance separately.  While we're at it, we re-arrange the base
type labels to match the enum order and add 8-bit type support.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/nir_types.cpp