aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-06-03 12:07:52 -0700
committerMarge Bot <[email protected]>2020-06-03 21:24:12 +0000
commit924bfb65604238439374c314bd02ff2b99441e21 (patch)
treea35c12a31f0fe8718d91727ad699cdbcb433fe0f /src/compiler
parentdce7722ef89100e5dea337064a9d6631bb18822a (diff)
nir: get_base_type() should return enum type
Needed by the next patch, for c++ code which is more strict about conversions between integers and enums. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5318>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index b7f7e46c9b0..a673a2a8f31 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1023,10 +1023,10 @@ nir_alu_type_get_type_size(nir_alu_type type)
return type & NIR_ALU_TYPE_SIZE_MASK;
}
-static inline unsigned
+static inline nir_alu_type
nir_alu_type_get_base_type(nir_alu_type type)
{
- return type & NIR_ALU_TYPE_BASE_TYPE_MASK;
+ return (nir_alu_type)(type & NIR_ALU_TYPE_BASE_TYPE_MASK);
}
static inline nir_alu_type