Mesa (master): glsl: the number of samplers is already calculated so use it

Timothy Arceri tarceri at kemper.freedesktop.org
Mon May 12 21:40:26 UTC 2014


Module: Mesa
Branch: master
Commit: 9c9dd8ca93f6f915e42892022518200673c6fc4b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c9dd8ca93f6f915e42892022518200673c6fc4b

Author: Timothy Arceri <t_arceri at yahoo.com.au>
Date:   Sun May 11 22:11:21 2014 +1000

glsl: the number of samplers is already calculated so use it

Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/glsl/link_uniforms.cpp |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 29dc0b1..c7147e0 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;
 




More information about the mesa-commit mailing list