glsl: Check the size of ir_print_visitor's mode[] array with STATIC_ASSERT.
authorPaul Berry <stereotype441@gmail.com>
Tue, 9 Apr 2013 17:03:11 +0000 (10:03 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 9 Apr 2013 17:19:22 +0000 (10:19 -0700)
commit778ce82b71c75d2c13f38b3504a4f18453330be2
treec1621f72a4b389821b51b5bb781baa5b19d8d0a0
parent67f226e179b7116379506f7b2c6c8d2b49ab97b2
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.
src/glsl/ir.h
src/glsl/ir_print_visitor.cpp