--- tests/all.py | 2 +- tests/bugs/CMakeLists.gl.txt | 1 - tests/bugs/crash-texparameter-before-teximage.c | 42 --------------- tests/spec/gl-1.2/CMakeLists.gl.txt | 1 + tests/spec/gl-1.2/texparameter-before-teximage.c | 68 ++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 44 deletions(-) delete mode 100644 tests/bugs/crash-texparameter-before-teximage.c create mode 100644 tests/spec/gl-1.2/texparameter-before-teximage.c
diff --git a/tests/all.py b/tests/all.py index 5940928..065ec9a 100644 --- a/tests/all.py +++ b/tests/all.py @@ -885,7 +885,7 @@ with profile.test_list.group_manager( with profile.test_list.group_manager( PiglitGLTest, grouptools.join('spec', '!opengl 1.2')) as g: - g(['crash-texparameter-before-teximage']) + g(['gl-1.2-texparameter-before-teximage']) g(['draw-elements-vs-inputs']) g(['two-sided-lighting-separate-specular']) g(['levelclamp']) diff --git a/tests/bugs/CMakeLists.gl.txt b/tests/bugs/CMakeLists.gl.txt index 23e59e4..f8cf104 100644 --- a/tests/bugs/CMakeLists.gl.txt +++ b/tests/bugs/CMakeLists.gl.txt @@ -10,7 +10,6 @@ link_libraries ( ${OPENGL_gl_LIBRARY} ) -piglit_add_executable (crash-texparameter-before-teximage crash-texparameter-before-teximage.c) piglit_add_executable (drawbuffer-modes drawbuffer-modes.c) piglit_add_executable (fdo10370 fdo10370.c) piglit_add_executable (fdo14575 fdo14575.c) diff --git a/tests/bugs/crash-texparameter-before-teximage.c b/tests/bugs/crash-texparameter-before-teximage.c deleted file mode 100644 index 0fd4a9e..0000000 --- a/tests/bugs/crash-texparameter-before-teximage.c +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file crash-texparameter-before-teximage.c - * - * Test case for "crash before first TexImage"; this happened in the R300 - * driver before Mesa commit c1fb448ce8dd98f8e5fd5a39707f96cc14535bd4 - * - * This bug was originally triggered by Glest. - */ - -#include "piglit-util-gl.h" - -PIGLIT_GL_TEST_CONFIG_BEGIN - - config.supports_gl_compat_version = 10; - - config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB; - config.khr_no_error_support = PIGLIT_NO_ERRORS; - -PIGLIT_GL_TEST_CONFIG_END - -enum piglit_result -piglit_display(void) -{ - return PIGLIT_PASS; -} - -void -piglit_init(int argc, char **argv) -{ - glViewport(0, 0, piglit_width, piglit_height); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - if (piglit_is_extension_supported("GL_ARB_shadow")) - glTexParameteri(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE_ARB, GL_ALPHA); - if (piglit_is_extension_supported("GL_ARB_shadow_ambient")) - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, 0.1); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, -4); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4); -} diff --git a/tests/spec/gl-1.2/CMakeLists.gl.txt b/tests/spec/gl-1.2/CMakeLists.gl.txt index ce291da..c6595ee 100644 --- a/tests/spec/gl-1.2/CMakeLists.gl.txt +++ b/tests/spec/gl-1.2/CMakeLists.gl.txt @@ -9,6 +9,7 @@ link_libraries ( ) piglit_add_executable (gl-1.2-rescale-normal rescale-normal.c) +piglit_add_executable (gl-1.2-texparameter-before-teximage texparameter-before-teximage.c) piglit_add_executable (gl-1.2-texture-base-level texture-base-level.c) # vim: ft=cmake: diff --git a/tests/spec/gl-1.2/texparameter-before-teximage.c b/tests/spec/gl-1.2/texparameter-before-teximage.c new file mode 100644 index 0000000..af2ca28 --- /dev/null +++ b/tests/spec/gl-1.2/texparameter-before-teximage.c @@ -0,0 +1,68 @@ +/* + * Copyright © 2008 Nicolai Hähnle + * + * 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. + */ + +/** + * @file texparameter-before-teximage.c + * + * Test case for "crash before first TexImage"; this happened in the R300 + * driver before Mesa commit c1fb448ce8dd98f8e5fd5a39707f96cc14535bd4 + * + * This bug was originally triggered by Glest. + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_compat_version = 12; + + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB; + config.khr_no_error_support = PIGLIT_NO_ERRORS; + +PIGLIT_GL_TEST_CONFIG_END + +enum piglit_result +piglit_display(void) +{ + return PIGLIT_PASS; +} + +void +piglit_init(int argc, char **argv) +{ + glViewport(0, 0, piglit_width, piglit_height); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + if (piglit_is_extension_supported("GL_ARB_shadow")) + glTexParameteri(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE_ARB, + GL_ALPHA); + if (piglit_is_extension_supported("GL_ARB_shadow_ambient")) + glTexParameterf(GL_TEXTURE_2D, + GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, 0.1); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + GL_LINEAR_MIPMAP_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, -4); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4); +} -- 2.7.4 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit