summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-04-09 10:03:11 -0700
committerPaul Berry <[email protected]>2013-04-09 10:19:22 -0700
commit778ce82b71c75d2c13f38b3504a4f18453330be2 (patch)
treec1621f72a4b389821b51b5bb781baa5b19d8d0a0 /src/glsl/ir.h
parent67f226e179b7116379506f7b2c6c8d2b49ab97b2 (diff)
glsl: Check the size of ir_print_visitor's mode[] array with STATIC_ASSERT.
ir_print_visitor::visit(ir_variable *)'s mode[] array needs to match the declaration of the enum ir_variable_mode. It's hard to verify that at compile time, but at least we can use a STATIC_ASSERT to make sure it's the right size. This required adding ir_var_mode_count to the enum.
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h3
1 files changed, 2 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 */
};
/**