Skip to content
Snippets Groups Projects
Commit d2296e78 authored by Ian Romanick's avatar Ian Romanick
Browse files

glsl: Split out part of variable_index_to_cond_assign_visitor::needs_lowering


Other code will soon need to know if an array needs lowering based
exclusively on the storage mode.

Reviewed-by: default avatarEric Anholt <eric@anholt.net>
parent 8d5f3cef
No related branches found
No related tags found
No related merge requests found
......@@ -239,12 +239,8 @@ public:
bool lower_temps;
bool lower_uniforms;
bool needs_lowering(ir_dereference_array *deref) const
bool storage_type_needs_lowering(ir_dereference_array *deref) const
{
if (deref == NULL || deref->array_index->as_constant()
|| !is_array_or_matrix(deref->array))
return false;
if (deref->array->ir_type == ir_type_constant)
return this->lower_temps;
......@@ -268,6 +264,15 @@ public:
return false;
}
bool needs_lowering(ir_dereference_array *deref) const
{
if (deref == NULL || deref->array_index->as_constant()
|| !is_array_or_matrix(deref->array))
return false;
return this->storage_type_needs_lowering(deref);
}
ir_variable *convert_dereference_array(ir_dereference_array *orig_deref,
ir_assignment* orig_assign)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment