summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-05 15:54:56 -0700
committerEric Anholt <[email protected]>2010-08-06 00:23:48 -0700
commit658e25987fbec3b826f500baa6d4d936b9552b13 (patch)
treec2345c1443e5ccfdf2625e045c74dd8c5f7d7d5c /src/mesa
parent0a86d766ef0d98abd3373609a637bf137203e994 (diff)
ir_to_mesa: Give the expected size for _mesa_add_attribute().
Fixes a failure in glean shaderAPI.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index f5e5f7d7b87..9979e6e3e07 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -43,6 +43,7 @@
extern "C" {
#include "main/mtypes.h"
+#include "main/shaderapi.h"
#include "main/shaderobj.h"
#include "main/uniforms.h"
#include "program/hash_table.h"
@@ -1458,7 +1459,7 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
ir->var->location >= VERT_ATTRIB_GENERIC0) {
_mesa_add_attribute(prog->Attributes,
ir->var->name,
- type_size(ir->var->type) * 4,
+ _mesa_sizeof_glsl_type(ir->var->type->gl_type),
ir->var->type->gl_type,
ir->var->location - VERT_ATTRIB_GENERIC0);
}