glsl: the number of samplers is already calculated so use it
authorTimothy Arceri <t_arceri@yahoo.com.au>
Sun, 11 May 2014 12:11:21 +0000 (22:11 +1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Mon, 12 May 2014 21:40:08 +0000 (07:40 +1000)
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/link_uniforms.cpp

index 29dc0b1966c28d4257bcc02572b822c11ed01c6c..c7147e0ee8eaf4e926a7bdf2876ebc954061fac7 100644 (file)
@@ -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;