glsl: Make is_lvalue() and variable_referenced() const.

These functions don't modify the target instruction, so it makes sense
to make them const.  This allows these functions to be called from ir
validation code (which uses const to ensure that it doesn't
accidentally modify the IR being validated).

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Paul Berry
2011-08-02 15:22:25 -07:00
parent 67b5a3267d
commit a52b53b56e
2 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -1096,7 +1096,7 @@ ir_dereference_record::ir_dereference_record(ir_variable *var,
}
bool
ir_dereference::is_lvalue()
ir_dereference::is_lvalue() const
{
ir_variable *var = this->variable_referenced();
@@ -1310,7 +1310,7 @@ ir_swizzle::create(ir_rvalue *val, const char *str, unsigned vector_length)
#undef I
ir_variable *
ir_swizzle::variable_referenced()
ir_swizzle::variable_referenced() const
{
return this->val->variable_referenced();
}