[Piglit] [PATCH 1/2] Change INVALID_VALUE to INVALID_OPERATION in ARB_vertex_array_bgra test.
Kenneth Graunke
kenneth at whitecape.org
Thu Aug 15 21:43:53 PDT 2013
In the OpenGL 3.3 specification, this changed from INVALID_VALUE to
INVALID_OPERATION.
According to Ian Romanick, the GL specification provides the guidance
that INVALID_VALUE should be generated for "Numeric argument out of
range". Since FALSE is in range for a boolean, INVALID_VALUE is not
appropriate, and the change to INVALID_OPERATION was meant as a
correction.
See:
http://lists.freedesktop.org/archives/mesa-dev/2013-July/042509.html
Most implementations support 3.3, so they likely follow the new code.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: Ian Romanick <idr at freedesktop.org>
Cc: Fredrik Höglund <fredrik at kde.org>
Cc: Corey Richardson <corey at octayn.net>
---
tests/spec/arb_vertex_array_bgra/api-errors.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/spec/arb_vertex_array_bgra/api-errors.c b/tests/spec/arb_vertex_array_bgra/api-errors.c
index 7100a78..ea74bfa 100644
--- a/tests/spec/arb_vertex_array_bgra/api-errors.c
+++ b/tests/spec/arb_vertex_array_bgra/api-errors.c
@@ -35,9 +35,9 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
PIGLIT_GL_TEST_CONFIG_END
void
-check_invalid_value()
+check_invalid_operation()
{
- if (!piglit_check_gl_error(GL_INVALID_VALUE))
+ if (!piglit_check_gl_error(GL_INVALID_OPERATION))
piglit_report_result(PIGLIT_FAIL);
}
@@ -56,7 +56,7 @@ piglit_init(int argc, char **argv)
*/
glVertexAttribPointer(1, GL_BGRA, GL_UNSIGNED_BYTE, GL_FALSE,
4 * sizeof(GLubyte), ubytes);
- check_invalid_value();
+ check_invalid_operation();
/* From the GL_ARB_vertex_array_bgra specification:
* "The error INVALID_VALUE is generated when ColorPointer,
@@ -64,15 +64,15 @@ piglit_init(int argc, char **argv)
* set to BGRA and type is not UNSIGNED_BYTE."
*/
glColorPointer(GL_BGRA, GL_UNSIGNED_INT, 4 * sizeof(GLuint), NULL);
- check_invalid_value();
+ check_invalid_operation();
glSecondaryColorPointer(GL_BGRA, GL_UNSIGNED_INT,
4 * sizeof(GLuint), NULL);
- check_invalid_value();
+ check_invalid_operation();
glVertexAttribPointer(1, GL_BGRA, GL_UNSIGNED_INT, GL_TRUE,
4 * sizeof(GLuint), uints);
- check_invalid_value();
+ check_invalid_operation();
piglit_report_result(PIGLIT_PASS);
}
--
1.8.3.4
More information about the Piglit
mailing list