diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 21bf678c04e..7f343ee5e38 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -978,9 +978,10 @@ visit_deref_src(nir_deref_var *deref, nir_foreach_src_cb cb, void *state) { 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; } @@ -1001,13 +1002,15 @@ visit_alu_src(nir_alu_instr *instr, nir_foreach_src_cb cb, void *state) 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; } @@ -1017,15 +1020,17 @@ visit_intrinsic_src(nir_intrinsic_instr *instr, nir_foreach_src_cb cb, 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; } |