diff options
author | Eduardo Lima Mitev <[email protected]> | 2014-12-11 23:34:18 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2015-01-13 12:19:32 +0100 |
commit | 2012f62d4abb6633b5329235194d23692f86b17b (patch) | |
tree | 5ba80ba43ddcb4f8c5e028dd3ab47f6642d1ecdd /src/mesa/main | |
parent | f77a473497dad587afb97ea4fda8c13495f5fe69 (diff) |
mesa: Returns a GL_INVALID_VALUE error if num of fbos in glDeleteRenderbuffers is negative
Per GLES3 manual for glDeleteRenderbuffers
<https://www.khronos.org/opengles/sdk/docs/man3/html/glDeleteRenderbuffers.xhtml>,
GL_INVALID_VALUE is generated if n is negative.
Fixes 1 dEQP test:
* dEQP-GLES3.functional.negative_api.buffer.delete_renderbuffers
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/fbobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index d0f19d01573..c5dd037c742 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1311,6 +1311,11 @@ _mesa_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) GLint i; GET_CURRENT_CONTEXT(ctx); + if (n < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteRenderbuffers(n < 0)"); + return; + } + FLUSH_VERTICES(ctx, _NEW_BUFFERS); for (i = 0; i < n; i++) { |