-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Paul wrote:
> Eric Anholt wrote:
>> The 2.0 spec doesn't make things extremely clear, but expresses itself in
>> pseudocode: If the vertex array isn't enabled, then nothing is called that
>> provokes drawing.  The manifestation of this bug was that a client drawing
>> with no arrays enabled would get into the driver with a request to
>> draw with _MaxElements being 0 and no inputs to the ff vertex program (since
>> no arrays were enabled, so nothing was varying), and the driver failing
>> all over the place.
>>
>> Bug #19911.
>> ---
>>  src/mesa/main/api_validate.c |    5 ++---
>>  1 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
>> index 5c8955d..5253ae3 100644
>> --- a/src/mesa/main/api_validate.c
>> +++ b/src/mesa/main/api_validate.c
>> @@ -87,9 +87,8 @@ check_valid_to_render(GLcontext *ctx, char *function)
>>        return GL_FALSE;
>>     }
>>  
>> -   /* Always need vertex positions, unless a vertex program is in use */
>> -   if (!ctx->VertexProgram._Current &&
>> -       !ctx->Array.ArrayObj->Vertex.Enabled &&
>> +   /* Always need vertex positions */
>> +   if (!ctx->Array.ArrayObj->Vertex.Enabled &&
>>         !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
>>        return GL_FALSE;
>>  
> 
> I believe I made this change for OpenGL ES 2.0.  You don't need to have 
> a vertex position array in order to draw.
> 
> Perhaps the better check would be to see if ctx->Array._Enabled is non-zero.

Uh...but that gives incorrect behavior for non-ES drivers.  Every
version of the OpenGL spec since 1.1 (when vertex arrays were
introduced) is quite clear:  no vertex array means no drawing.  It
sounds like we need a flag to select between the ES and non-ES behavior.
 It seems likely that this behavior will make its way into non-ES GL, so
this is probably a good thing anyway.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmmzjAACgkQX1gOwKyEAw9q+QCgnj1w5nrOSgL8iqB8chm8zEer
T/EAnA0XNNZanXLWZMYPfzxvBWZl7afe
=JaZV
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to