summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-29 18:58:20 -0700
committerEric Anholt <eric@anholt.net>2010-06-30 12:02:11 -0700
commit982e3798d8b9bfec7ff3f37c52687036b36bc153 (patch)
tree74b608d7162ed2a3c4630214007a2e1c070e6b61
parent849e18153cd91d812f694b806a84008498860bc3 (diff)
linker: Don't automatically allocate VERT_ATTRIB_GENERIC0
-rw-r--r--src/glsl/linker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 719cae2f27..a53e91d2ef 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -669,6 +669,12 @@ assign_attribute_locations(gl_shader_program *prog, unsigned max_attribute_index
qsort(to_assign, num_attr, sizeof(to_assign[0]), temp_attr::compare);
+ /* VERT_ATTRIB_GENERIC0 is a psdueo-alias for VERT_ATTRIB_POS. It can only
+ * be explicitly assigned by via glBindAttribLocation. Mark it as reserved
+ * to prevent it from being automatically allocated below.
+ */
+ used_locations |= VERT_BIT_GENERIC0;
+
for (unsigned i = 0; i < num_attr; i++) {
/* Mask representing the contiguous slots that will be used by this
* attribute.