summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/link_uniform_initializers.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/glsl/link_uniform_initializers.cpp b/src/compiler/glsl/link_uniform_initializers.cpp
index a7af75586e7..bc3dcab7c35 100644
--- a/src/compiler/glsl/link_uniform_initializers.cpp
+++ b/src/compiler/glsl/link_uniform_initializers.cpp
@@ -97,7 +97,8 @@ copy_constant_to_storage(union gl_constant_value *storage,
*/
void
set_opaque_binding(void *mem_ctx, gl_shader_program *prog,
- const glsl_type *type, const char *name, int *binding)
+ const ir_variable *var, const glsl_type *type,
+ const char *name, int *binding)
{
if (type->is_array() && type->fields.array->is_array()) {
@@ -106,7 +107,7 @@ set_opaque_binding(void *mem_ctx, gl_shader_program *prog,
for (unsigned int i = 0; i < type->length; i++) {
const char *element_name = ralloc_asprintf(mem_ctx, "%s[%d]", name, i);
- set_opaque_binding(mem_ctx, prog, element_type,
+ set_opaque_binding(mem_ctx, prog, var, element_type,
element_name, binding);
}
} else {
@@ -281,7 +282,7 @@ link_set_uniform_initializers(struct gl_shader_program *prog,
if (type->without_array()->is_sampler() ||
type->without_array()->is_image()) {
int binding = var->data.binding;
- linker::set_opaque_binding(mem_ctx, prog, var->type,
+ linker::set_opaque_binding(mem_ctx, prog, var, var->type,
var->name, &binding);
} else if (var->is_in_buffer_block()) {
const glsl_type *const iface_type = var->get_interface_type();