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:
+2
-2
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user