aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/link_uniforms.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/link_uniforms.cpp')
-rw-r--r--mesalib/src/glsl/link_uniforms.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesalib/src/glsl/link_uniforms.cpp b/mesalib/src/glsl/link_uniforms.cpp
index 25dc1d7dc..eef9025cf 100644
--- a/mesalib/src/glsl/link_uniforms.cpp
+++ b/mesalib/src/glsl/link_uniforms.cpp
@@ -313,7 +313,7 @@ private:
const gl_texture_index target = base_type->sampler_index();
const unsigned shadow = base_type->sampler_shadow;
for (unsigned i = this->uniforms[id].sampler
- ; i < this->next_sampler
+ ; i < MIN2(this->next_sampler, MAX_SAMPLERS)
; i++) {
this->targets[i] = target;
this->shader_samplers_used |= 1U << i;