[Piglit] [PATCH] arb_direct_state_access-texunits: fix incorrect error test
Brian Paul
brianp at vmware.com
Wed Sep 30 14:34:52 PDT 2015
Check for GL_INVALID_VALUE, not GL_INVALID_OPERATION. The extension spec
isn't clear on this, but GL_INVALID_VALUE is typically generated for
out-of-range int/uint values.
That's what NVIDIA does. Plus, that's what the other bind-texture-unit
piglit test checks for at line 91. Let's at least be consistent.
---
tests/spec/arb_direct_state_access/texunits.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/spec/arb_direct_state_access/texunits.c b/tests/spec/arb_direct_state_access/texunits.c
index ccf7779..0d77efa 100644
--- a/tests/spec/arb_direct_state_access/texunits.c
+++ b/tests/spec/arb_direct_state_access/texunits.c
@@ -117,11 +117,13 @@ test_texture_params(void)
maxUnit = MAX2(MaxTextureCombinedUnits, MaxTextureCoordUnits);
- /* this should generate an error */
+ /* This should generate an error. The GL_ARB_direct_state_access extension
+ * isn't explicit about which error should be generated, but the typical
+ * error for a out-of-range int/uint is GL_INVALID_VALUE. That's what
+ * NVIDIA's driver does.
+ */
glBindTextureUnit(maxUnit, tex[0]);
- /* INVALID_OPERATION is expected */
- /* (see the GL 4.4 spec for glBindTextures) */
- if (!piglit_check_gl_error(GL_INVALID_OPERATION)) {
+ if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
return false;
}
--
1.9.1
More information about the Piglit
mailing list