From: Timothy Arceri Date: Sun, 11 May 2014 12:11:21 +0000 (+1000) Subject: glsl: the number of samplers is already calculated so use it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9c9dd8ca93f6f915e42892022518200673c6fc4b;p=mesa.git glsl: the number of samplers is already calculated so use it Signed-off-by: Timothy Arceri Reviewed-by: Ian Romanick --- diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 29dc0b1966c..c7147e0ee8e 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -308,8 +308,7 @@ private: */ const unsigned values = values_for_type(type); if (type->contains_sampler()) { - this->num_shader_samplers += - type->is_array() ? type->array_size() : 1; + this->num_shader_samplers += values; } else if (type->contains_image()) { this->num_shader_images += values;