From: Timothy Arceri Date: Sun, 9 Aug 2015 06:25:50 +0000 (+1000) Subject: glsl: remove specical case subroutine type counting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8bc8d723598ec87bbce9a2439075dfe1612a359;p=mesa.git glsl: remove specical case subroutine type counting Unlike samplers we can get the correct value for subroutines from component_slots() Reviewed-by: Dave Airlie --- diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 254086dc050..a0cb6182925 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();