[Piglit] [PATCH] Clarify comment about glIsBuffer behavior

Matt Turner mattst88 at gmail.com
Fri Jan 25 13:25:22 PST 2013


On Fri, Jan 25, 2013 at 9:35 AM, Eric Anholt <eric at anholt.net> wrote:
> Matt Turner <mattst88 at gmail.com> writes:
>
>> The spec's not vague, it's just stupid. glIsBuffer should return false
>> between the time a buffer name is generated and first bound.
>> ---
>>  tests/general/isbufferobj.c | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/general/isbufferobj.c b/tests/general/isbufferobj.c
>> index 3938d18..d805818 100644
>> --- a/tests/general/isbufferobj.c
>> +++ b/tests/general/isbufferobj.c
>> @@ -78,10 +78,8 @@ test(void)
>>     }
>>
>>     /*
>> -    * The GL spec is vague here.  But the GL man pages say glIsBuffer should
>> -    * return false in this case.  Mesa and NVIDIA's driver return true.
>> -    * Generate a warning, not an error, if the driver doesn't follow the
>> -    * GL docs here.
>> +    * Generate a warning, not an error, if the driver doesn't return
>> +    * GL_FALSE from glIsBuffers if the buffer has never been bound.
>>      */
>>     if (glIsBuffer(buffers[1])) {
>>        printf("%s: glIsBuffer(%u) returned true instead of false.\n",
>
> Why should we generate a warning, not an error, if the spec is clear?

I suppose because the spec is stupid. Although I've added tests for
this behavior to piglit elsewhere (glIsTransformFeedback,
glIsVertexArray) and PBOTest::testSanity looks like it fails if
glIsBufferARB returns true before being bound. I'll send new patch
that changes this from a warning to a failure.


More information about the Piglit mailing list