diff options
author | Timothy Arceri <[email protected]> | 2017-04-04 15:45:06 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-04-19 16:53:25 +1000 |
commit | 1787a3163f4cb16977999f2fabb98ac4a7e2f210 (patch) | |
tree | cca70df9c69c5dd6737f93c271dc12e482d16d4c | |
parent | f27f6996720291691eba1e0fd1ece0d1c4edd8d0 (diff) |
mesa: add KHR_no_error support to glVertexAttribDivisor()
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/mesa/main/varray.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index cf3b18d1f97..e1d6bc677f5 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1772,15 +1772,17 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor) const GLuint genericIndex = VERT_ATTRIB_GENERIC(index); struct gl_vertex_array_object * const vao = ctx->Array.VAO; - if (!ctx->Extensions.ARB_instanced_arrays) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glVertexAttribDivisor()"); - return; - } + if (!_mesa_is_no_error_enabled(ctx)) { + if (!ctx->Extensions.ARB_instanced_arrays) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glVertexAttribDivisor()"); + return; + } - if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribDivisor(index = %u)", - index); - return; + if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glVertexAttribDivisor(index = %u)", index); + return; + } } assert(genericIndex < ARRAY_SIZE(vao->VertexAttrib)); |