projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f12791
)
mesa: add an assertion in _mesa_enable_vertex_array_attrib()
author
Brian Paul
<brianp@vmware.com>
Fri, 26 Jan 2018 18:03:57 +0000
(11:03 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 30 Jan 2018 16:07:59 +0000
(09:07 -0700)
Some of the enable/disable vertex array functions take a zero-based
generic index, while others take a VERT_ATTRIB_GENERIC0-based value.
Add an assertion to clarify that in one place.
Reviewed-by: Gert Wollny <gw.fossdev@gmail.com>
src/mesa/main/varray.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/varray.c
b/src/mesa/main/varray.c
index 31f1c8339df6db23bf7cada413cab54775d3152d..bda1c5a3b6855cb8c15591169b981b397dae7b10 100644
(file)
--- a/
src/mesa/main/varray.c
+++ b/
src/mesa/main/varray.c
@@
-1064,6
+1064,7
@@
_mesa_enable_vertex_array_attrib(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
unsigned attrib)
{
+ assert(attrib >= VERT_ATTRIB_GENERIC0);
assert(attrib < ARRAY_SIZE(vao->VertexAttrib));
if (!vao->VertexAttrib[attrib].Enabled) {