[Piglit] [PATCH] arb_direct_state_access/create-textures: also check invalid zero target
Brian Paul
brianp at vmware.com
Mon Oct 5 10:23:06 PDT 2015
Check that glCreateTextures rejects target=0, per the spec. Also, Mesa
internally uses target=0 for a special state (texture gen'd but not bound)
so it's good to test.
---
tests/spec/arb_direct_state_access/create-textures.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/spec/arb_direct_state_access/create-textures.c b/tests/spec/arb_direct_state_access/create-textures.c
index ca6d43c..5479844 100644
--- a/tests/spec/arb_direct_state_access/create-textures.c
+++ b/tests/spec/arb_direct_state_access/create-textures.c
@@ -62,6 +62,10 @@ piglit_display(void)
glCreateTextures(GL_PROXY_TEXTURE_2D, 1, &name);
pass = piglit_check_gl_error(GL_INVALID_ENUM) && pass;
+ /* Invalid zero target */
+ glCreateTextures(0, 1, &name);
+ pass = piglit_check_gl_error(GL_INVALID_ENUM) && pass;
+
/* n is negative */
glCreateTextures(GL_TEXTURE_2D, -1, &name);
pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
--
1.9.1
More information about the Piglit
mailing list