{
nir_deref *cur = &deref->deref;
while (cur != NULL) {
- if (cur->deref_type == nir_deref_type_array)
+ if (cur->deref_type == nir_deref_type_array) {
if (!visit_deref_array_src(nir_deref_as_array(cur), cb, state))
return false;
+ }
cur = cur->child;
}
static bool
visit_tex_src(nir_tex_instr *instr, nir_foreach_src_cb cb, void *state)
{
- for (unsigned i = 0; i < instr->num_srcs; i++)
+ for (unsigned i = 0; i < instr->num_srcs; i++) {
if (!visit_src(&instr->src[i].src, cb, state))
return false;
+ }
- if (instr->sampler != NULL)
+ if (instr->sampler != NULL) {
if (!visit_deref_src(instr->sampler, cb, state))
return false;
+ }
return true;
}
void *state)
{
unsigned num_srcs = nir_intrinsic_infos[instr->intrinsic].num_srcs;
- for (unsigned i = 0; i < num_srcs; i++)
+ for (unsigned i = 0; i < num_srcs; i++) {
if (!visit_src(&instr->src[i], cb, state))
return false;
+ }
unsigned num_vars =
nir_intrinsic_infos[instr->intrinsic].num_variables;
- for (unsigned i = 0; i < num_vars; i++)
+ for (unsigned i = 0; i < num_vars; i++) {
if (!visit_deref_src(instr->variables[i], cb, state))
return false;
+ }
return true;
}