summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c30
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);
}