[Mesa-dev] [PATCH 11/16] mesa: Returns a GL_INVALID_VALUE error if num of fbos in glDeleteFramebuffers is negative

Ian Romanick idr at freedesktop.org
Thu Dec 11 18:22:47 PST 2014


On 12/11/2014 06:21 PM, Ian Romanick wrote:
> This patch and patch 12 are
> 
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> 
> Are there other 'delete' functions that should generate this same error
> (but don't)?

I see patch 14 now. :)

One other comment...

> 
> On 12/11/2014 02:34 PM, Eduardo Lima Mitev wrote:
>> Per GLES3 manual for glDeleteFramebuffers
>> <https://www.khronos.org/opengles/sdk/docs/man3/html/glDeleteFramebuffers.xhtml>,
>> GL_INVALID_VALUE is generated if n is negative.
>>
>> Fixes 1 dEQP test:
>> * dEQP-GLES3.functional.negative_api.buffer.delete_framebuffers
>> ---
>>  src/mesa/main/fbobject.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
>> index c3f01c9..df85b8c 100644
>> --- a/src/mesa/main/fbobject.c
>> +++ b/src/mesa/main/fbobject.c
>> @@ -2218,6 +2218,11 @@ _mesa_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
>>     GLint i;
>>     GET_CURRENT_CONTEXT(ctx);
>>  
>> +   if (n < 0) {
>> +      _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteFramebuffers(n)");

Maybe say "glDeleteFramebuffers(n < 0)".

>> +      return;
>> +   }
>> +
>>     FLUSH_VERTICES(ctx, _NEW_BUFFERS);
>>  
>>     for (i = 0; i < n; i++) {
>>
> 



More information about the mesa-dev mailing list