The subject is too long for a commit message. Perhaps: "Test invalid parameters for GL_ARB_texture_rectangle".
Nicholas Mack <[email protected]> writes: > --- > tests/all.tests | 1 + > tests/spec/gl-3.3/CMakeLists.gl.txt | 1 + > tests/spec/gl-3.3/texture-base-level-error.c | 64 > ++++++++++++++++++++++++++++ > 3 files changed, 66 insertions(+) > create mode 100644 tests/spec/gl-3.3/texture-base-level-error.c > > diff --git a/tests/all.tests b/tests/all.tests > index e9a579c..ec8cf31 100644 > --- a/tests/all.tests > +++ b/tests/all.tests > @@ -770,6 +770,7 @@ spec['!OpenGL/get-active-attrib-returns-all-inputs'] = > concurrent_test('gl-get-a > spec['!OpenGL 3.2/texture-border-deprecated'] = > concurrent_test('gl-3.2-texture-border-deprecated') > > spec['!OpenGL 3.3/minmax'] = concurrent_test('gl-3.3-minmax') > +spec['!OpenGL 3.3/texture-base-level-error'] = > concurrent_test('gl-3.3-texture-base-level-error') > spec['!OpenGL 3.3/required-renderbuffer-attachment-formats'] = > concurrent_test('gl-3.0-required-renderbuffer-attachment-formats 33') > spec['!OpenGL 3.3/required-sized-texture-formats'] = > concurrent_test('gl-3.0-required-sized-texture-formats 33') > spec['!OpenGL 3.3/required-texture-attachment-formats'] = > concurrent_test('gl-3.0-required-texture-attachment-formats 33') > diff --git a/tests/spec/gl-3.3/CMakeLists.gl.txt > b/tests/spec/gl-3.3/CMakeLists.gl.txt > index b58b541..7143680 100644 > --- a/tests/spec/gl-3.3/CMakeLists.gl.txt > +++ b/tests/spec/gl-3.3/CMakeLists.gl.txt > @@ -10,5 +10,6 @@ link_libraries ( > ) > > piglit_add_executable (gl-3.3-minmax minmax.c) > +piglit_add_executable (gl-3.3-texture-base-level-error > texture-base-level-error.c) > > # vim: ft=cmake: > diff --git a/tests/spec/gl-3.3/texture-base-level-error.c > b/tests/spec/gl-3.3/texture-base-level-error.c > new file mode 100644 > index 0000000..86180c0 > --- /dev/null > +++ b/tests/spec/gl-3.3/texture-base-level-error.c > @@ -0,0 +1,64 @@ > +/** > + * Copyright © 2013 Intel Corporation > + * > + * Permission is hereby granted, free of charge, to any person obtaining a > + * copy of this software and associated documentation files (the "Software"), > + * to deal in the Software without restriction, including without limitation > + * the rights to use, copy, modify, merge, publish, distribute, sublicense, > + * and/or sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice (including the next > + * paragraph) shall be included in all copies or substantial portions of the > + * Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > DEALINGS > + * IN THE SOFTWARE. > + */ > + > +/** > + * Test that when setting texture parameters, a TEXTURE_BASE_LEVEL of > non-zero > + * results in INVALID_VALUE when target is TEXTURE_RECTANGLE. > + * > + * Section 3.8.8(Texture Parameters) of OpenGL 3.3 Core says: > + * "When target is TEXTURE_RECTANGLE, certain texture parameter values may > + * not be specified. In this case, the error INVALID_ENUM is generated if > the > + * TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R parameter is set > + * to REPEAT or MIRRORED_REPEAT. The error INVALID_ENUM is generated if > + * TEXTURE_MIN_FILTER is set to a value other than NEAREST or LINEAR (no > + * mipmap filtering is permitted). The error INVALID_VALUE is generated if > + * TEXTURE_BASE_LEVEL is set to any value other than zero." > + * Since the spec text you quoted is from ARB_texture_rectangle, and doesn't require GL 3.3, this test should probably be moved to that spec directory and have its requirements updated. This is fairly specific for an errors test -- usually we'll put in a bunch of error tests for the same group of functions in a single .c file, so we add coverage for that function all at once (in this case, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_*)
pgpE4wA9vu0Dw.pgp
Description: PGP signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
