From: Jason Ekstrand Date: Tue, 21 Jul 2020 16:22:23 +0000 (-0500) Subject: nir/lower_uniforms_to_ubo: Use nir_foreach_variable_with_modes X-Git-Tag: upstream/21.0.0~7035 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90cf4709d92d4c693530ddf317067f5b53798424;p=platform%2Fupstream%2Fmesa.git nir/lower_uniforms_to_ubo: Use nir_foreach_variable_with_modes Reviewed-by: Dave Airlie Part-of: --- diff --git a/src/compiler/nir/nir_lower_uniforms_to_ubo.c b/src/compiler/nir/nir_lower_uniforms_to_ubo.c index eef0d41..bdee9e9 100644 --- a/src/compiler/nir/nir_lower_uniforms_to_ubo.c +++ b/src/compiler/nir/nir_lower_uniforms_to_ubo.c @@ -105,10 +105,8 @@ nir_lower_uniforms_to_ubo(nir_shader *shader, int multiplier) if (progress) { if (!shader->info.first_ubo_is_default_ubo) { - nir_foreach_variable(var, &shader->uniforms) { - if (var->data.mode == nir_var_mem_ubo) - var->data.binding++; - } + nir_foreach_variable_with_modes(var, shader, nir_var_mem_ubo) + var->data.binding++; } shader->info.num_ubos++;