mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 21:00:17 +01:00
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 <gw.fossdev@gmail.com>
This commit is contained in:
parent
7f12791cc6
commit
4ab7e03e1f
1 changed files with 1 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue