summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/link_uniform_initializers.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/glsl/link_uniform_initializers.cpp b/src/compiler/glsl/link_uniform_initializers.cpp
index c6346d573ab..bf6d394ea89 100644
--- a/src/compiler/glsl/link_uniform_initializers.cpp
+++ b/src/compiler/glsl/link_uniform_initializers.cpp
@@ -145,6 +145,8 @@ set_opaque_binding(void *mem_ctx, gl_shader_program *prog,
storage->opaque[sh].active) {
for (unsigned i = 0; i < elements; i++) {
const unsigned index = storage->opaque[sh].index + i;
+ if (index >= ARRAY_SIZE(shader->ImageUnits))
+ break;
shader->ImageUnits[index] = storage->storage[i].i;
}
}