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 254086dc0504e3e710379e0273715b4f64615940..a0cb618292517b4b63a0896f2c3e55f1c62afc6b 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();