From d9e3621a2eb6deb12a326ed1376a7ae45a1c9d52 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 30 Sep 2015 15:27:56 -0600 Subject: arb_direct_state_access-texunits: fix incorrect error test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/spec/arb_direct_state_access/texunits.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests') 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; } -- cgit v1.2.3