[Piglit] to-do item: clean up GL error checks

Brian Paul brianp at vmware.com
Mon Oct 1 07:07:39 PDT 2012


Great!  Just to be clear, I don't think that _all_ the 
assert(glGetError() == 0); checks need to be replaced.  In some cases 
they seemed to be development/sanity checks (which could probably just 
be removed).  But in other cases it seems to be used to check that new 
extension enum tokens are accepted by certain API functions.  Those 
are the cases where piglit_check_gl_error() would be a better choice.

-Brian


On 09/30/2012 08:42 PM, Chris Forbes wrote:
> Hi Brian,
>
> I'll take this. Patches shortly.
>
> -- Chris
>
> On Sat, Sep 29, 2012 at 1:45 AM, Brian Paul<brianp at vmware.com>  wrote:
>> If someone's looking for something simple to do in piglit...
>>
>> There's about 150 instances of this in the tests:
>>
>> assert(glGetError() == 0);
>>
>> I think that quite a few of them should be replaced with:
>>
>> if (!piglit_check_gl_error(GL_NO_ERROR))
>>     fail;
>>
>> Some seem to be development sanity checks but some seem to be intentional GL
>> error checks.
>>
>> I also saw some of this (in the fbo tests, for example):
>>
>>          err = glGetError();
>>          if (err != GL_NO_ERROR) {
>>                  printf("Unexpected GL error state 0x%04x\n", err);
>>                  piglit_report_result(PIGLIT_FAIL);
>>          }
>>
>> Again, we could use piglit_check_gl_error().
>>
>> That would be a good clean-up project for someone who wants to get into
>> piglit or has some spare time.
>>
>> -Brian
>> _______________________________________________
>> Piglit mailing list
>> Piglit at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/piglit



More information about the Piglit mailing list