summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-12-20 17:00:06 +0100
committerMarek Olšák <[email protected]>2013-01-04 14:06:39 +0100
commitee351ea178daed07e121617d324e069b8906d345 (patch)
treefb4c2338e4d1ff37af9f443efecadb5dd523f722 /src/mesa/state_tracker
parentd1818d6f68114de0c86954e50abdb97c90ea73be (diff)
st/mesa: fix assertion failures with 2101010 vertex formats
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_array.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c
index 15f5d1c95ea..2437245bd25 100644
--- a/src/mesa/state_tracker/st_atom_array.c
+++ b/src/mesa/state_tracker/st_atom_array.c
@@ -403,9 +403,9 @@ setup_interleaved_attribs(const struct st_vertex_program *vp,
const GLuint mesaAttr = vp->index_to_input[attr];
const struct gl_client_array *array = arrays[mesaAttr];
unsigned src_offset = (unsigned) (array->Ptr - low_addr);
- GLuint element_size = array->_ElementSize;
- assert(element_size == array->Size * _mesa_sizeof_type(array->Type));
+ assert(array->_ElementSize ==
+ _mesa_bytes_per_vertex_attrib(array->Size, array->Type));
velements[attr].src_offset = src_offset;
velements[attr].instance_divisor = array->InstanceDivisor;
@@ -474,7 +474,8 @@ setup_non_interleaved_attribs(struct st_context *st,
struct gl_buffer_object *bufobj = array->BufferObj;
GLsizei stride = array->StrideB;
- assert(array->_ElementSize == array->Size * _mesa_sizeof_type(array->Type));
+ assert(array->_ElementSize ==
+ _mesa_bytes_per_vertex_attrib(array->Size, array->Type));
if (_mesa_is_bufferobj(bufobj)) {
/* Attribute data is in a VBO.