commit | 90cf4709d92d4c693530ddf317067f5b53798424 | [log] [tgz] |
---|---|---|
author | Jason Ekstrand <jason@jlekstrand.net> | Tue Jul 21 11:22:23 2020 -0500 |
committer | Marge Bot <eric+marge@anholt.net> | Wed Jul 29 17:38:58 2020 +0000 |
tree | 4fc6b27b7452dd39e0f0051c7092e81a85f39d2a | |
parent | d0d5ef6139880c683642958394de7b9d72f09544 [diff] |
nir/lower_uniforms_to_ubo: Use nir_foreach_variable_with_modes Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966>
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 @@ 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++;