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

Tapani tapani.palli at intel.com
Tue Sep 30 09:58:46 PDT 2014


On 09/30/2014 06:13 PM, Ian Romanick wrote:
> On 09/30/2014 12:28 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.
> This sounds believable.  Did you also try the ES2 or ES3 conformance
> suite?  I could have sworn that we had a bug related to this a long time
> ago, and we discovered it using the conformance suite.

Did not check non-web conformance suite but I can give it a try.

> Either way, we should get a piglit test too... I think we have a test
> for desktop OpenGL (maybe 3.1?), so it shouldn't be too hard to adapt that.

OK, I will make tests (for existing fixes + there's still bunch of other 
failures left to fix). So far I've just used the conformance tests 
online to test these change and Piglit to catch possible 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;
>>   
>>



More information about the mesa-dev mailing list