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.
This commit is contained in:
Eric Anholt
2010-06-30 14:01:43 -07:00
parent c7f4ff193a
commit c64da87611

View File

@@ -1008,7 +1008,7 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
ir->var->name, ir->var->name,
type_size(ir->var->type) * 4, type_size(ir->var->type) * 4,
ir->var->type->gl_type, ir->var->type->gl_type,
ir->var->location); ir->var->location - VERT_ATTRIB_GENERIC0);
} }
} else { } else {
entry = new(mem_ctx) temp_entry(ir->var, entry = new(mem_ctx) temp_entry(ir->var,