glsl: Use constant_expression_value instead of as_constant
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 18 Jul 2014 23:10:16 +0000 (16:10 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 4 Aug 2014 21:40:06 +0000 (14:40 -0700)
commit146be3ddbe1e3cf8154bcc59cc5bcbd90e2072cb
treef43d74958b8de9920f6011ed41f99573eac1ad02
parentb249712643991a011f3f802b9b453021ec88e1fc
glsl: Use constant_expression_value instead of as_constant

Just a few lines earlier we may have wrapped the index expression with
ir_unop_i2u expression.  Whenever that happens, as_constant will return
NULL, and that almost always happens.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/lower_ubo_reference.cpp