summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_validate.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-04-11 13:32:59 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-13 12:40:12 -0700
commitffa0e12e15bdfd0116446bfc5697e9e250770981 (patch)
tree5ee88398fd741e3b525d6fd38da229a5c3aaa909 /src/compiler/nir/nir_validate.c
parentf69a61b1aa7f7fc8dd190cb3d5da1e7bca7de809 (diff)
downloadexternal_mesa3d-ffa0e12e15bdfd0116446bfc5697e9e250770981.zip
external_mesa3d-ffa0e12e15bdfd0116446bfc5697e9e250770981.tar.gz
external_mesa3d-ffa0e12e15bdfd0116446bfc5697e9e250770981.tar.bz2
nir: Convert nir_variable_mode to a bitfield
There are several passes where we need to specify some set of variable modes that the pass needs top operate on. This lets us easily do that. Acked-by: Eric Anholt <eric@anholt.net> Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Diffstat (limited to 'src/compiler/nir/nir_validate.c')
-rw-r--r--src/compiler/nir/nir_validate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index 9f18d1c..3c3306c 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -903,6 +903,9 @@ validate_var_decl(nir_variable *var, bool is_global, validate_state *state)
{
assert(is_global == nir_variable_is_global(var));
+ /* Must have exactly one mode set */
+ assert(util_bitcount(var->data.mode) == 1);
+
/*
* TODO validate some things ir_validate.cpp does (requires more GLSL type
* support)