mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
glsl: remove specical case subroutine type counting
Unlike samplers we can get the correct value for subroutines from component_slots() Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
0d19dc302f
commit
c8bc8d7235
1 changed files with 2 additions and 3 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue