nir: Consider deref instructions in opt_peephole_select
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> 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:
parent
1e1733aaf0
commit
f46ecdc441
1 changed files with 11 additions and 2 deletions
|
|
@ -77,6 +77,17 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count, bool alu_ok)
|
|||
}
|
||||
break;
|
||||
|
||||
case nir_intrinsic_load_deref:
|
||||
switch (nir_src_as_deref(intrin->src[0])->mode) {
|
||||
case nir_var_shader_in:
|
||||
case nir_var_uniform:
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case nir_intrinsic_load_uniform:
|
||||
if (!alu_ok)
|
||||
return false;
|
||||
|
|
@ -255,8 +266,6 @@ nir_opt_peephole_select(nir_shader *shader, unsigned limit)
|
|||
{
|
||||
bool progress = false;
|
||||
|
||||
nir_assert_lowered_derefs(shader, nir_lower_load_store_derefs);
|
||||
|
||||
nir_foreach_function(function, shader) {
|
||||
if (function->impl)
|
||||
progress |= nir_opt_peephole_select_impl(function->impl, limit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue