[Mesa-dev] [PATCH] glsl: fix uniform location count for opaque types
Tapani Pälli
tapani.palli at intel.com
Thu Aug 21 22:08:05 PDT 2014
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82921
---
src/glsl/glsl_types.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 66e9b13..6c42284 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -696,9 +696,9 @@ glsl_type::uniform_locations() const
}
/* The location count for many types match with component_slots() result,
- * all expections should be handled above.
+ * all expections should be handled above. At least 1 slot is consumed.
*/
- return component_slots();
+ return MAX2(1, component_slots());
}
bool
--
1.9.3
More information about the mesa-dev
mailing list