From 90cf4709d92d4c693530ddf317067f5b53798424 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 21 Jul 2020 11:22:23 -0500 Subject: [PATCH] nir/lower_uniforms_to_ubo: Use nir_foreach_variable_with_modes Reviewed-by: Dave Airlie Part-of: --- src/compiler/nir/nir_lower_uniforms_to_ubo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_lower_uniforms_to_ubo.c b/src/compiler/nir/nir_lower_uniforms_to_ubo.c index eef0d41440f..bdee9e927cb 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++; -- 2.30.2