nir: Remove old-school deref chain support
Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -218,28 +218,6 @@ copy_prop_dest(nir_dest *dest, nir_instr *instr)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
copy_prop_deref_var(nir_instr *instr, nir_deref_var *deref_var)
|
||||
{
|
||||
if (!deref_var)
|
||||
return false;
|
||||
|
||||
bool progress = false;
|
||||
for (nir_deref *deref = deref_var->deref.child;
|
||||
deref; deref = deref->child) {
|
||||
if (deref->deref_type != nir_deref_type_array)
|
||||
continue;
|
||||
|
||||
nir_deref_array *arr = nir_deref_as_array(deref);
|
||||
if (arr->deref_array_type != nir_deref_array_type_indirect)
|
||||
continue;
|
||||
|
||||
while (copy_prop_src(&arr->indirect, instr, NULL, 1))
|
||||
progress = true;
|
||||
}
|
||||
return progress;
|
||||
}
|
||||
|
||||
static bool
|
||||
copy_prop_instr(nir_instr *instr)
|
||||
{
|
||||
@@ -284,11 +262,6 @@ copy_prop_instr(nir_instr *instr)
|
||||
progress = true;
|
||||
}
|
||||
|
||||
if (copy_prop_deref_var(instr, tex->texture))
|
||||
progress = true;
|
||||
if (copy_prop_deref_var(instr, tex->sampler))
|
||||
progress = true;
|
||||
|
||||
while (copy_prop_dest(&tex->dest, instr))
|
||||
progress = true;
|
||||
|
||||
@@ -305,12 +278,6 @@ copy_prop_instr(nir_instr *instr)
|
||||
progress = true;
|
||||
}
|
||||
|
||||
for (unsigned i = 0;
|
||||
i < nir_intrinsic_infos[intrin->intrinsic].num_variables; i++) {
|
||||
if (copy_prop_deref_var(instr, intrin->variables[i]))
|
||||
progress = true;
|
||||
}
|
||||
|
||||
if (nir_intrinsic_infos[intrin->intrinsic].has_dest) {
|
||||
while (copy_prop_dest(&intrin->dest, instr))
|
||||
progress = true;
|
||||
|
Reference in New Issue
Block a user