[Mesa-dev] [PATCH] glsl: remove specical case subroutine type counting

Timothy Arceri t_arceri at yahoo.com.au
Sun Aug 30 04:42:36 PDT 2015


On Sun, 2015-08-09 at 16:25 +1000, Timothy Arceri wrote:
> Unlike samplers we can get the correct value for subroutines from
> component_slots()
> ---
>  src/glsl/link_uniforms.cpp | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
> index 4757fd5..3c6930a 100644
> --- a/src/glsl/link_uniforms.cpp
> +++ b/src/glsl/link_uniforms.cpp
> @@ -47,10 +47,9 @@
>  static unsigned
>  values_for_type(const glsl_type *type)
>  {
> -   if (type->is_sampler() || type->is_subroutine()) {
> +   if (type->is_sampler()) {
>        return 1;
> -   } else if (type->is_array() && (type->fields.array->is_sampler() ||
> -                                   type->fields.array->is_subroutine())) {
> +   } else if (type->is_array() && type->fields.array->is_sampler()) {
>        return type->array_size();
>     } else {
>        return type->component_slots();

Bumping and Cc: Dave


More information about the mesa-dev mailing list