[Mesa-dev] [PATCH] VertexAttribDivisor returns INVALID_VALUE if index is out of range
Paul Berry
stereotype441 at gmail.com
Tue Nov 13 13:29:37 PST 2012
On 13 November 2012 13:18, Matt Turner <mattst88 at gmail.com> wrote:
> All the other range checks on index already return the proper error,
> INVALID_VALUE.
>
> Fixes gles3conform's instanced_arrays_invalid.
>
Minor nit pick: it's not obvious from your commit subject whether it
describes the state of the code before or after the change. I'd recommend
something like "mesa: return INVALID_VALUE from VertexAttribDivisor if
index out of range".
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
> ---
> src/mesa/main/varray.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index 809b818..1ff77bc 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -1138,7 +1138,7 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint
> divisor)
> }
>
> if (index >= ctx->Const.VertexProgram.MaxAttribs) {
> - _mesa_error(ctx, GL_INVALID_ENUM, "glVertexAttribDivisor(index =
> %u)",
> + _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribDivisor(index =
> %u)",
> index);
> return;
> }
> --
> 1.7.8.6
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121113/8dcfbb6a/attachment.html>
More information about the mesa-dev
mailing list