glsl: remove specical case subroutine type counting
authorTimothy Arceri <t_arceri@yahoo.com.au>
Sun, 9 Aug 2015 06:25:50 +0000 (16:25 +1000)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Mon, 31 Aug 2015 03:10:44 +0000 (13:10 +1000)
Unlike samplers we can get the correct value for subroutines from
component_slots()

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/glsl/link_uniforms.cpp

index 254086d..a0cb618 100644 (file)
 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();