[Piglit] [PATCH] glean/tdepthstencil: Print what error was expected

Matt Turner mattst88 at gmail.com
Tue Jan 29 20:37:08 PST 2013


On Tue, Jan 29, 2013 at 6:41 PM, Eric Anholt <eric at anholt.net> wrote:
> Matt Turner <mattst88 at gmail.com> writes:
>
> Thy all seem to already print what error was expected, though not what
> was generated.
>
>>       glDrawPixels(1, 1, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT_24_8_EXT, p);
>> -     if (glGetError() != GL_INVALID_OPERATION) {
>> -             sprintf(errorMsg,
>> -                     "glDrawPixels(GL_DEPTH_COMPONENT, GL_UNSIGNED_INT_24_8_EXT)"
>> -                     " failed to generate GL_INVALID_OPERATION.");
>> +     if (!piglit_check_gl_error(GL_INVALID_ENUM)) {
>>               return false;
>
> Looks like the expected error got changed here.
>
>>       glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_INT_24_8_EXT, p);
>> -     if (glGetError() != GL_INVALID_OPERATION) {
>> -             sprintf(errorMsg,
>> -                     "glReadPixels(GL_STENCIL_INDEX, GL_UNSIGNED_INT_24_8_EXT)"
>> -                     " failed to generate GL_INVALID_OPERATION.");
>> +     if (!piglit_check_gl_error(GL_INVALID_ENUM)) {
>>               return false;
>
> and here.

Whoops. Not intended. Will fix.


More information about the Piglit mailing list