[Piglit] [PATCH] DSA: fix error value for *TextureSubImage* when target doesn't match
Arthur Huillet
arthur.huillet at free.fr
Wed Apr 22 08:25:33 PDT 2015
From: Arthur Huillet <ahuillet at nvidia.com>
Section 8.6 of the OpenGL 4.5 compatibility specification states:
"An INVALID_OPERATION error is generated by *TextureSubImage* if
the effective target of texture does not match the command, as shown in ta-
ble 8.23."
Piglit was expecting INVALID_ENUM.
Signed-off-by: Arthur Huillet <ahuillet at nvidia.com>
---
tests/spec/arb_direct_state_access/texture-errors.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/spec/arb_direct_state_access/texture-errors.c b/tests/spec/arb_direct_state_access/texture-errors.c
index c79fbc4..fa93ee4 100644
--- a/tests/spec/arb_direct_state_access/texture-errors.c
+++ b/tests/spec/arb_direct_state_access/texture-errors.c
@@ -87,18 +87,22 @@ test_pos_and_sizes(void)
glCopyTextureSubImage2D(name, 2, 0, 0, 0, 0, 4, 4);
pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
- /* To test 1D and 3D entry points, let's try using the wrong functions. */
+ /* To test 1D and 3D entry points, let's try using the wrong functions.
+ Section 8.6 of the OpenGL 4.5 compatibility specification states:
+ "An INVALID_OPERATION error is generated by *TextureSubImage* if
+ the effective target of texture does not match the command, as shown
+ in table 8.23."*/
glTextureSubImage1D(name, 0, 0, 4, GL_RGBA, GL_FLOAT, NULL);
- pass &= piglit_check_gl_error(GL_INVALID_ENUM);
+ pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
glTextureSubImage3D(name, 0, 0, 0, 0, 4, 4, 4, GL_RGBA, GL_FLOAT, NULL);
- pass &= piglit_check_gl_error(GL_INVALID_ENUM);
+ pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
glCopyTextureSubImage1D(name, 0, 0, 0, 0, 4);
- pass &= piglit_check_gl_error(GL_INVALID_ENUM);
+ pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
glCopyTextureSubImage3D(name, 0, 0, 0, 0, 0, 0, 4, 4);
- pass &= piglit_check_gl_error(GL_INVALID_ENUM);
+ pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
return pass;
}
--
2.3.5
More information about the Piglit
mailing list