Unlike samplers we can get the correct value for subroutines from
component_slots()
Reviewed-by: Dave Airlie <airlied@redhat.com>
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();