Mesa (master): glsl: remove specical case subroutine type counting
Timothy Arceri
tarceri at kemper.freedesktop.org
Mon Aug 31 03:10:52 UTC 2015
Module: Mesa
Branch: master
Commit: c8bc8d723598ec87bbce9a2439075dfe1612a359
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8bc8d723598ec87bbce9a2439075dfe1612a359
Author: Timothy Arceri <t_arceri at yahoo.com.au>
Date: Sun Aug 9 16:25:50 2015 +1000
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 at redhat.com>
---
src/glsl/link_uniforms.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 254086d..a0cb618 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();
More information about the mesa-commit
mailing list