[Piglit] [PATCH] DSA: fix error value expected in texunits test

Tapani Pälli tapani.palli at intel.com
Fri Oct 2 01:15:41 PDT 2015


commit 9b445f7a68146f50222a4162b5f7ec68c043e851 changed expected
error value for glBindTextureUnit in bind-texture-unit but did not
change same case in texunits test.

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92215
---
 tests/spec/arb_direct_state_access/texunits.c | 16 ++++++++++++----
 1 file changed, 12 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..f47058c 100644
--- a/tests/spec/arb_direct_state_access/texunits.c
+++ b/tests/spec/arb_direct_state_access/texunits.c
@@ -117,11 +117,19 @@ test_texture_params(void)
 
    maxUnit = MAX2(MaxTextureCombinedUnits, MaxTextureCoordUnits);
 
-   /* this should generate an error */
+   /* Section 8.1. of the OpenGL 4.5 Core Profile spec says for
+    * BindTextures:
+    *
+    *     "An INVALID_OPERATION error is generated if first + count is
+    *     greater than the number of texture image units supported by the
+    *     implementation."
+    *
+    * However, it doesn't say the same about BindTextureUnit. Table 2.3
+    * implies that a numeric argument out of range yields INVALID_VALUE,
+    * not INVALID_OPERATION.
+    */
    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;
    }
 
-- 
2.4.3



More information about the Piglit mailing list