[Mesa-dev] [PATCH] glsl: the number of samplers is already calculated so use it

Ian Romanick idr at freedesktop.org
Mon May 12 10:21:26 PDT 2014


Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 05/11/2014 05:25 AM, Timothy Arceri wrote:
> Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
> ---
>  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..cd231cb 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-dev mailing list