[Mesa-dev] [PATCH 12/16] mesa: Returns a GL_INVALID_VALUE error if num of fbos in glDeleteRenderbuffers is negative
Eduardo Lima Mitev
elima at igalia.com
Thu Dec 11 14:34:18 PST 2014
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
---
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 df85b8c..7e1ff1b 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1326,6 +1326,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)");
+ return;
+ }
+
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
for (i = 0; i < n; i++) {
--
2.1.3
More information about the mesa-dev
mailing list