mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
nir: Handle call instructions in foreach_src
Even though they don't have regular sources, they do have derefs and those may have implied sources that should be handled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106980 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (Unique to 18.1)
This commit is contained in:
parent
915d9166bf
commit
d96eecbdd7
1 changed files with 16 additions and 1 deletions
|
|
@ -1373,6 +1373,20 @@ visit_tex_src(nir_tex_instr *instr, nir_foreach_src_cb cb, void *state)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
visit_call_src(nir_call_instr *instr, nir_foreach_src_cb cb, void *state)
|
||||
{
|
||||
if (instr->return_deref && !visit_deref_src(instr->return_deref, cb, state))
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < instr->num_params; i++) {
|
||||
if (!visit_deref_src(instr->params[i], cb, state))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
visit_intrinsic_src(nir_intrinsic_instr *instr, nir_foreach_src_cb cb,
|
||||
void *state)
|
||||
|
|
@ -1449,7 +1463,8 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state)
|
|||
return false;
|
||||
break;
|
||||
case nir_instr_type_call:
|
||||
/* Call instructions have no regular sources */
|
||||
if (!visit_call_src(nir_instr_as_call(instr), cb, state))
|
||||
return false;
|
||||
break;
|
||||
case nir_instr_type_load_const:
|
||||
/* Constant load instructions have no regular sources */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue