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:

committed by
Marge Bot

parent
92dcda5ce9
commit
feb32f898c
@@ -123,7 +123,7 @@ nir_lower_pstipple_fs(struct nir_shader *shader,
|
||||
return;
|
||||
|
||||
int binding = 0;
|
||||
nir_foreach_variable(var, &shader->uniforms) {
|
||||
nir_foreach_uniform_variable(var, shader) {
|
||||
if (glsl_type_is_sampler(var->type)) {
|
||||
if (var->data.binding >= binding)
|
||||
binding = var->data.binding + 1;
|
||||
|
Reference in New Issue
Block a user