Mesa (master): mesa: add KHR_no_error support to glVertexAttribDivisor()
Timothy Arceri
tarceri at kemper.freedesktop.org
Wed Apr 19 07:20:33 UTC 2017
Module: Mesa
Branch: master
Commit: 1787a3163f4cb16977999f2fabb98ac4a7e2f210
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1787a3163f4cb16977999f2fabb98ac4a7e2f210
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Tue Apr 4 15:45:06 2017 +1000
mesa: add KHR_no_error support to glVertexAttribDivisor()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/mesa/main/varray.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index cf3b18d1f9..e1d6bc677f 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));
More information about the mesa-commit
mailing list