diff options
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/ir.h | 3 | ||||
-rw-r--r-- | src/glsl/ir_print_visitor.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 0c3e39979a3..3018e0fbb16 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -273,7 +273,8 @@ enum ir_variable_mode { ir_var_function_inout, ir_var_const_in, /**< "in" param that must be a constant expression */ ir_var_system_value, /**< Ex: front-face, instance-id, etc. */ - ir_var_temporary /**< Temporary variable generated during compilation. */ + ir_var_temporary, /**< Temporary variable generated during compilation. */ + ir_var_mode_count /**< Number of variable modes */ }; /** diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index fb0dd08f810..f01019c9877 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -150,6 +150,7 @@ void ir_print_visitor::visit(ir_variable *ir) const char *const mode[] = { "", "uniform ", "shader_in ", "shader_out ", "in ", "out ", "inout ", "const_in ", "sys ", "temporary " }; + STATIC_ASSERT(ARRAY_SIZE(mode) == ir_var_mode_count); const char *const interp[] = { "", "smooth", "flat", "noperspective" }; STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_QUALIFIER_COUNT); |