summaryrefslogtreecommitdiffstats
path: root/src/glsl/link_uniforms.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2014-05-11 22:11:21 +1000
committerTimothy Arceri <[email protected]>2014-05-13 07:40:08 +1000
commit9c9dd8ca93f6f915e42892022518200673c6fc4b (patch)
tree76dc114e90881521a6608510fdf8db0e99552856 /src/glsl/link_uniforms.cpp
parentafe3d1556f6b77031f7025309511a0eea2a3e8df (diff)
glsl: the number of samplers is already calculated so use it
Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/link_uniforms.cpp')
-rw-r--r--src/glsl/link_uniforms.cpp3
1 files changed, 1 insertions, 2 deletions
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;