nir_shader *nir = sh->Program->nir;
assert(nir);
- nir_foreach_variable(var, &nir->uniforms) {
+ nir_foreach_gl_uniform_variable(var, nir) {
if (var->constant_initializer) {
struct set_uniform_initializer_closure data = {
.shader_prog = prog,
if (!sh)
continue;
- nir_shader *nir = sh->Program->nir;
- nir_foreach_variable(var, &nir->uniforms)
+ nir_foreach_gl_uniform_variable(var, sh->Program->nir)
update_array_sizes(prog, var, state.referenced_uniforms, stage);
}
}
if (!sh)
continue;
- nir_foreach_variable(var, &sh->Program->nir->uniforms) {
+ nir_foreach_gl_uniform_variable(var, sh->Program->nir) {
const struct glsl_type *type = var->type;
const char *name = var->name;
if (nir_variable_is_in_block(var) &&
state.shader_shadow_samplers = 0;
state.params = fill_parameters ? sh->Program->Parameters : NULL;
- nir_foreach_variable(var, &nir->uniforms) {
+ nir_foreach_gl_uniform_variable(var, nir) {
state.current_var = var;
state.current_ifc_type = NULL;
state.offset = 0;
bool fill_parameters;
};
+#define nir_foreach_gl_uniform_variable(var, shader) \
+ nir_foreach_variable(var, &(shader)->uniforms)
+
bool gl_nir_link_spirv(struct gl_context *ctx,
struct gl_shader_program *prog,
const struct gl_nir_linker_options *options);