summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-30 14:01:43 -0700
committerEric Anholt <eric@anholt.net>2010-06-30 14:44:14 -0700
commitc64da87611823b4b53e93188f861f748a69936a3 (patch)
treef9decf6aa2dbe827b78928999083d73b2bb2a889 /src/mesa/shader
parentc7f4ff193a6f7cfae2e4cdc6c4b9162a16226dc0 (diff)
ir_to_mesa: Fix the indexing of attributes in the program's Attributes.
This fixes GetAttribLocation returning VERT_ATTRIB_GENERIC1 instead of 1, caught by glsl-dlist-getattriblocation.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/ir_to_mesa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index 4eac810679..c39621bf79 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -1008,7 +1008,7 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
ir->var->name,
type_size(ir->var->type) * 4,
ir->var->type->gl_type,
- ir->var->location);
+ ir->var->location - VERT_ATTRIB_GENERIC0);
}
} else {
entry = new(mem_ctx) temp_entry(ir->var,