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

Chris Forbes chrisf at ijw.co.nz
Sun Sep 30 19:42:43 PDT 2012


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