nir: Add a nir_foreach_uniform_variable helper

This one's a bit more complex because it filters off only those
variables with mode == nir_var_uniform.  As such, it's not exactly a
drop-in replacement for nir_foreach_variable(var, &nir->uniforms).

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966>
This commit is contained in:
Jason Ekstrand
2020-07-18 18:45:18 -05:00
committed by Marge Bot
parent 92dcda5ce9
commit feb32f898c
13 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -570,7 +570,7 @@ v3d_lower_nir(struct v3d_compile *c)
}
/* CS textures may not have return_size reflecting the shadow state. */
nir_foreach_variable(var, &c->s->uniforms) {
nir_foreach_uniform_variable(var, c->s) {
const struct glsl_type *type = glsl_without_array(var->type);
unsigned array_len = MAX2(glsl_get_length(var->type), 1);