- if (var->is_interface_instance() && var->type->is_array()) {
- for (unsigned i = 0; i < var->type->length; i++) {
- const char *name =
- ralloc_asprintf(mem_ctx, "%s[%u]", iface_type->name, i);
-
- /* Section 4.4.3 (Uniform Block Layout Qualifiers) of the
- * GLSL 4.20 spec says:
- *
- * "If the binding identifier is used with a uniform
- * block instanced as an array then the first element
- * of the array takes the specified block binding and
- * each subsequent element takes the next consecutive
- * uniform block binding point."
- */
- linker::set_block_binding(prog, name, var->data.mode,
- var->data.binding + i);
- }
- } else {
- linker::set_block_binding(prog, iface_type->name,
- var->data.mode,
- var->data.binding);
- }