diff options
author | Eduardo Lima Mitev <[email protected]> | 2014-12-11 23:34:17 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2015-01-13 12:19:32 +0100 |
commit | f77a473497dad587afb97ea4fda8c13495f5fe69 (patch) | |
tree | b21f6a3ddbd71eaaedc965cb9ea7560e8594e0d3 /src/mesa/main/fbobject.c | |
parent | f408c333e249e51bd10f2fc819ef7f735c4d7111 (diff) |
mesa: Returns a GL_INVALID_VALUE error if num of fbos in glDeleteFramebuffers is negative
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
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-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 d3e941d7f8a..d0f19d01573 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2203,6 +2203,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 < 0)"); + return; + } + FLUSH_VERTICES(ctx, _NEW_BUFFERS); for (i = 0; i < n; i++) { |