[Mesa-dev] [PATCH] mesa: relax draw api validation on ES2

Kenneth Graunke kenneth at whitecape.org
Tue Sep 30 00:46:30 PDT 2014


On Tuesday, September 30, 2014 10:28:26 AM Tapani Pälli wrote:
> Patch fixes failing test in WebGL conformance test
> 'point-no-attributes' when running Chrome on OpenGL ES.
> (Shader program may draw points using constant data in shader.)
> 
> No Piglit regressions.
> 
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  src/mesa/main/api_validate.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
> index 51a3d1f..9b80600 100644
> --- a/src/mesa/main/api_validate.c
> +++ b/src/mesa/main/api_validate.c
> @@ -112,9 +112,8 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
>  
>     switch (ctx->API) {
>     case API_OPENGLES2:
> -      /* For ES2, we can draw if any vertex array is enabled (and we
> -       * should always have a vertex program/shader). */
> -      if (ctx->Array.VAO->_Enabled == 0x0 || !ctx->VertexProgram._Current)
> +      /* For ES2, we can draw if we have a vertex program/shader). */
> +      if (!ctx->VertexProgram._Current)
>  	 return GL_FALSE;
>        break;

Looks right to me.  The git history shows that it's been this way since it was written 5 years ago, and I see no comments, git commit explanations, or spec text saying why it should be like this.  Using constant data seems totally reasonable, and we allow it on GL.

Thanks, Tapani.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140930/ca93eedb/attachment.sig>


More information about the mesa-dev mailing list