summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2015-09-30 15:27:56 -0600
committerBrian Paul <brianp@vmware.com>2015-10-03 06:46:15 -0600
commitd9e3621a2eb6deb12a326ed1376a7ae45a1c9d52 (patch)
tree5866ee7e5d77df2a591221e2bd8e55c7aeb000f8 /tests
parent28ff39f87e14e90db61ec722b6e3f7eb02beaed2 (diff)
arb_direct_state_access-texunits: fix incorrect error test
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. Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/arb_direct_state_access/texunits.c10
1 files 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 ccf77791a..0d77efa84 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;
}