diff options
author | Brian Paul <[email protected]> | 2018-01-26 11:03:57 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-01-30 09:07:59 -0700 |
commit | 4ab7e03e1fc7ac6c7cd3a5a1c160726f2a262e66 (patch) | |
tree | afefe2c750e24cf8649295d1b895fc6545b3b19f /src | |
parent | 7f12791cc655cf649e86e2baf72bfdcec0d5f17a (diff) |
mesa: add an assertion in _mesa_enable_vertex_array_attrib()
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/varray.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 31f1c8339df..bda1c5a3b68 100644 --- 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) { |