summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir_types.h
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2016-05-11 15:05:09 -0400
committerRob Clark <robclark@freedesktop.org>2016-05-12 13:39:40 -0400
commit9d3cc80b752b236bc51b78a3d99920748a1a230a (patch)
treec518c99153ecd2af941e400d47383ac90e9632cf /src/compiler/nir_types.h
parentb19cff1639f9c6e3074d11f1199807603046ea4b (diff)
downloadexternal_mesa3d-9d3cc80b752b236bc51b78a3d99920748a1a230a.zip
external_mesa3d-9d3cc80b752b236bc51b78a3d99920748a1a230a.tar.gz
external_mesa3d-9d3cc80b752b236bc51b78a3d99920748a1a230a.tar.bz2
nir: glsl_get_bit_size() should take glsl_type
It's what all the call-sites once, so gets rid of a bunch of inlined glsl_get_base_type() at the call-sites. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/compiler/nir_types.h')
-rw-r--r--src/compiler/nir_types.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index 31e4d20..7d9917f 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -82,9 +82,9 @@ unsigned glsl_get_record_location_offset(const struct glsl_type *type,
unsigned length);
static inline unsigned
-glsl_get_bit_size(enum glsl_base_type type)
+glsl_get_bit_size(const struct glsl_type *type)
{
- switch (type) {
+ switch (glsl_get_base_type(type)) {
case GLSL_TYPE_INT:
case GLSL_TYPE_UINT:
case GLSL_TYPE_BOOL: