diff options
author | Eduardo Lima Mitev <elima@igalia.com> | 2015-02-24 10:46:51 +0100 |
---|---|---|
committer | Eduardo Lima Mitev <elima@igalia.com> | 2015-07-29 07:56:40 +0200 |
commit | ca5b173004098420307d8cb75ab3396ac8c91270 (patch) | |
tree | 117cdc3628f3833bafc62cb6745fea00cf07d9f4 | |
parent | 4c24d5d7f97b911b3d30673802302f93e5457514 (diff) |
clearbuffer-invalid-drawbuffer: Fix test cases calling glClearBufferiv with depth buffers
Page 497 of the PDF, section '17.4.3.1 Clearing Individual Buffers' of the
OpenGL 4.5 spec states:
"An INVALID_ENUM error is generated by ClearBufferiv and
ClearNamedFramebufferiv if buffer is not COLOR or STENCIL."
The affected test is not complying with this wording, and is expecting a
GL_INVALID_VALUE when glClearBufferiv is called with a depth buffer but, due to
other constrain.
-rw-r--r-- | tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c b/tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c index 262b8b780..ca0ee8f5d 100644 --- a/tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c +++ b/tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c @@ -77,14 +77,6 @@ void piglit_init(int argc, char **argv) if (!piglit_check_gl_error(GL_INVALID_VALUE)) piglit_report_result(PIGLIT_FAIL); - glClearBufferiv(GL_DEPTH, 1, zero_i); - if (!piglit_check_gl_error(GL_INVALID_VALUE)) - piglit_report_result(PIGLIT_FAIL); - - glClearBufferiv(GL_DEPTH, -1, zero_i); - if (!piglit_check_gl_error(GL_INVALID_VALUE)) - piglit_report_result(PIGLIT_FAIL); - glClearBufferuiv(GL_DEPTH, 1, (GLuint *) zero_i); if (!piglit_check_gl_error(GL_INVALID_VALUE)) piglit_report_result(PIGLIT_FAIL); @@ -211,10 +203,6 @@ void piglit_init(int argc, char **argv) if (!piglit_check_gl_error(GL_NO_ERROR)) piglit_report_result(PIGLIT_FAIL); - glClearBufferiv(GL_DEPTH, 0, zero_i); - if (!piglit_check_gl_error(GL_NO_ERROR)) - piglit_report_result(PIGLIT_FAIL); - glClearBufferuiv(GL_DEPTH, 0, (GLuint *) zero_i); if (!piglit_check_gl_error(GL_NO_ERROR)) piglit_report_result(PIGLIT_FAIL); @@ -235,5 +223,23 @@ void piglit_init(int argc, char **argv) if (!piglit_check_gl_error(GL_NO_ERROR)) piglit_report_result(PIGLIT_FAIL); + /* Page 498 of the PDF, section '17.4.3.1 Clearing Individual Buffers' + * of the OpenGL 4.5 spec states: + * + * "An INVALID_ENUM error is generated by ClearBufferiv and + * ClearNamedFramebufferiv if buffer is not COLOR or STENCIL." + */ + glClearBufferiv(GL_DEPTH, 1, zero_i); + if (!piglit_check_gl_error(GL_INVALID_ENUM)) + piglit_report_result(PIGLIT_FAIL); + + glClearBufferiv(GL_DEPTH, -1, zero_i); + if (!piglit_check_gl_error(GL_INVALID_ENUM)) + piglit_report_result(PIGLIT_FAIL); + + glClearBufferiv(GL_DEPTH, 0, zero_i); + if (!piglit_check_gl_error(GL_INVALID_ENUM)) + piglit_report_result(PIGLIT_FAIL); + piglit_report_result(PIGLIT_PASS); } |