Re: [Piglit] [PATCH v2] ext_texture_norm16-render: test for GL_EXT_texture_norm16
On 02.05.2018 21:29, Eric Anholt wrote: Tapani Pälliwrites: Test includes: - texture uploads - mipmap generation - framebuffer creation - rendering to - reading from - interaction with GL_EXT_copy_image v2: code cleanup Signed-off-by: Tapani Pälli --- tests/all.py | 5 + tests/spec/CMakeLists.txt | 1 + tests/spec/ext_texture_norm16/CMakeLists.gles2.txt | 7 + tests/spec/ext_texture_norm16/CMakeLists.txt | 1 + tests/spec/ext_texture_norm16/render.c | 374 + 5 files changed, 388 insertions(+) create mode 100644 tests/spec/ext_texture_norm16/CMakeLists.gles2.txt create mode 100644 tests/spec/ext_texture_norm16/CMakeLists.txt create mode 100644 tests/spec/ext_texture_norm16/render.c diff --git a/tests/all.py b/tests/all.py index 26638cd82..101a6c149 100644 --- a/tests/all.py +++ b/tests/all.py @@ -3187,6 +3187,11 @@ with profile.test_list.group_manager( with profile.test_list.group_manager( PiglitGLTest, +grouptools.join('spec', 'ext_texture_norm16')) as g: +g(['ext_texture_norm16-render'], 'render') + +with profile.test_list.group_manager( +PiglitGLTest, grouptools.join('spec', 'ext_frag_depth')) as g: g(['fragdepth_gles2']) diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt index dc14beb4e..405d35a53 100644 --- a/tests/spec/CMakeLists.txt +++ b/tests/spec/CMakeLists.txt @@ -178,3 +178,4 @@ add_subdirectory (arb_fragment_shader_interlock) add_subdirectory (ext_occlusion_query_boolean) add_subdirectory (ext_disjoint_timer_query) add_subdirectory (intel_blackhole_render) +add_subdirectory (ext_texture_norm16) diff --git a/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt b/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt new file mode 100644 index 0..e9cebd101 --- /dev/null +++ b/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt @@ -0,0 +1,7 @@ +link_libraries ( + piglitutil_${piglit_target_api} +) + +piglit_add_executable (ext_texture_norm16-render render.c) + +# vim: ft=cmake: diff --git a/tests/spec/ext_texture_norm16/CMakeLists.txt b/tests/spec/ext_texture_norm16/CMakeLists.txt new file mode 100644 index 0..144a306f4 --- /dev/null +++ b/tests/spec/ext_texture_norm16/CMakeLists.txt @@ -0,0 +1 @@ +piglit_include_target_api() diff --git a/tests/spec/ext_texture_norm16/render.c b/tests/spec/ext_texture_norm16/render.c new file mode 100644 index 0..f99b1fd9c --- /dev/null +++ b/tests/spec/ext_texture_norm16/render.c @@ -0,0 +1,374 @@ +/* + * Copyright © 2018 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. + */ + +/** + * @file + * Basic tests for formats added by GL_EXT_texture_norm16 extension + * + * https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_norm16.txt + * + * Test includes: + * - texture uploads + * - mipmap generation + * - framebuffer creation + * - rendering to + * - reading from + * - interaction with GL_EXT_copy_image + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + config.supports_gl_es_version = 31; + config.window_visual = PIGLIT_GL_VISUAL_RGBA; +PIGLIT_GL_TEST_CONFIG_END + +static const char vs_source[] = + "#version 310 es\n" + "layout(location = 0) in highp vec4 vertex;\n" + "layout(location = 1) in highp vec4 uv;\n" + "out highp vec2 tex_coord;\n" + "\n" + "void main()\n" + "{\n" + " gl_Position = vertex;\n" + " tex_coord = uv.st;\n" + "}\n"; + +static const char fs_source[] = + "#version 310 es\n" + "layout(location = 0) uniform sampler2D texture;\n" + "in highp vec2 tex_coord;\n" + "out highp vec4 color;\n" + "void main()\n" +
Re: [Piglit] [PATCH v2] ext_texture_norm16-render: test for GL_EXT_texture_norm16
Tapani Pälliwrites: > Test includes: >- texture uploads >- mipmap generation >- framebuffer creation >- rendering to >- reading from >- interaction with GL_EXT_copy_image > > v2: code cleanup > > Signed-off-by: Tapani Pälli > --- > tests/all.py | 5 + > tests/spec/CMakeLists.txt | 1 + > tests/spec/ext_texture_norm16/CMakeLists.gles2.txt | 7 + > tests/spec/ext_texture_norm16/CMakeLists.txt | 1 + > tests/spec/ext_texture_norm16/render.c | 374 > + > 5 files changed, 388 insertions(+) > create mode 100644 tests/spec/ext_texture_norm16/CMakeLists.gles2.txt > create mode 100644 tests/spec/ext_texture_norm16/CMakeLists.txt > create mode 100644 tests/spec/ext_texture_norm16/render.c > > diff --git a/tests/all.py b/tests/all.py > index 26638cd82..101a6c149 100644 > --- a/tests/all.py > +++ b/tests/all.py > @@ -3187,6 +3187,11 @@ with profile.test_list.group_manager( > > with profile.test_list.group_manager( > PiglitGLTest, > +grouptools.join('spec', 'ext_texture_norm16')) as g: > +g(['ext_texture_norm16-render'], 'render') > + > +with profile.test_list.group_manager( > +PiglitGLTest, > grouptools.join('spec', 'ext_frag_depth')) as g: > g(['fragdepth_gles2']) > > diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt > index dc14beb4e..405d35a53 100644 > --- a/tests/spec/CMakeLists.txt > +++ b/tests/spec/CMakeLists.txt > @@ -178,3 +178,4 @@ add_subdirectory (arb_fragment_shader_interlock) > add_subdirectory (ext_occlusion_query_boolean) > add_subdirectory (ext_disjoint_timer_query) > add_subdirectory (intel_blackhole_render) > +add_subdirectory (ext_texture_norm16) > diff --git a/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt > b/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt > new file mode 100644 > index 0..e9cebd101 > --- /dev/null > +++ b/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt > @@ -0,0 +1,7 @@ > +link_libraries ( > + piglitutil_${piglit_target_api} > +) > + > +piglit_add_executable (ext_texture_norm16-render render.c) > + > +# vim: ft=cmake: > diff --git a/tests/spec/ext_texture_norm16/CMakeLists.txt > b/tests/spec/ext_texture_norm16/CMakeLists.txt > new file mode 100644 > index 0..144a306f4 > --- /dev/null > +++ b/tests/spec/ext_texture_norm16/CMakeLists.txt > @@ -0,0 +1 @@ > +piglit_include_target_api() > diff --git a/tests/spec/ext_texture_norm16/render.c > b/tests/spec/ext_texture_norm16/render.c > new file mode 100644 > index 0..f99b1fd9c > --- /dev/null > +++ b/tests/spec/ext_texture_norm16/render.c > @@ -0,0 +1,374 @@ > +/* > + * Copyright © 2018 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. > + */ > + > +/** > + * @file > + * Basic tests for formats added by GL_EXT_texture_norm16 extension > + * > + * > https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_norm16.txt > + * > + * Test includes: > + * - texture uploads > + * - mipmap generation > + * - framebuffer creation > + * - rendering to > + * - reading from > + * - interaction with GL_EXT_copy_image > + */ > + > +#include "piglit-util-gl.h" > + > +PIGLIT_GL_TEST_CONFIG_BEGIN > + config.supports_gl_es_version = 31; > + config.window_visual = PIGLIT_GL_VISUAL_RGBA; > +PIGLIT_GL_TEST_CONFIG_END > + > +static const char vs_source[] = > + "#version 310 es\n" > + "layout(location = 0) in highp vec4 vertex;\n" > + "layout(location = 1) in highp vec4 uv;\n" > + "out highp vec2 tex_coord;\n" > + "\n" > + "void main()\n" > + "{\n" > + " gl_Position = vertex;\n" > + " tex_coord = uv.st;\n" > + "}\n"; > + > +static const char fs_source[] = > +
[Piglit] [PATCH v2] ext_texture_norm16-render: test for GL_EXT_texture_norm16
Test includes: - texture uploads - mipmap generation - framebuffer creation - rendering to - reading from - interaction with GL_EXT_copy_image v2: code cleanup Signed-off-by: Tapani Pälli--- tests/all.py | 5 + tests/spec/CMakeLists.txt | 1 + tests/spec/ext_texture_norm16/CMakeLists.gles2.txt | 7 + tests/spec/ext_texture_norm16/CMakeLists.txt | 1 + tests/spec/ext_texture_norm16/render.c | 374 + 5 files changed, 388 insertions(+) create mode 100644 tests/spec/ext_texture_norm16/CMakeLists.gles2.txt create mode 100644 tests/spec/ext_texture_norm16/CMakeLists.txt create mode 100644 tests/spec/ext_texture_norm16/render.c diff --git a/tests/all.py b/tests/all.py index 26638cd82..101a6c149 100644 --- a/tests/all.py +++ b/tests/all.py @@ -3187,6 +3187,11 @@ with profile.test_list.group_manager( with profile.test_list.group_manager( PiglitGLTest, +grouptools.join('spec', 'ext_texture_norm16')) as g: +g(['ext_texture_norm16-render'], 'render') + +with profile.test_list.group_manager( +PiglitGLTest, grouptools.join('spec', 'ext_frag_depth')) as g: g(['fragdepth_gles2']) diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt index dc14beb4e..405d35a53 100644 --- a/tests/spec/CMakeLists.txt +++ b/tests/spec/CMakeLists.txt @@ -178,3 +178,4 @@ add_subdirectory (arb_fragment_shader_interlock) add_subdirectory (ext_occlusion_query_boolean) add_subdirectory (ext_disjoint_timer_query) add_subdirectory (intel_blackhole_render) +add_subdirectory (ext_texture_norm16) diff --git a/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt b/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt new file mode 100644 index 0..e9cebd101 --- /dev/null +++ b/tests/spec/ext_texture_norm16/CMakeLists.gles2.txt @@ -0,0 +1,7 @@ +link_libraries ( + piglitutil_${piglit_target_api} +) + +piglit_add_executable (ext_texture_norm16-render render.c) + +# vim: ft=cmake: diff --git a/tests/spec/ext_texture_norm16/CMakeLists.txt b/tests/spec/ext_texture_norm16/CMakeLists.txt new file mode 100644 index 0..144a306f4 --- /dev/null +++ b/tests/spec/ext_texture_norm16/CMakeLists.txt @@ -0,0 +1 @@ +piglit_include_target_api() diff --git a/tests/spec/ext_texture_norm16/render.c b/tests/spec/ext_texture_norm16/render.c new file mode 100644 index 0..f99b1fd9c --- /dev/null +++ b/tests/spec/ext_texture_norm16/render.c @@ -0,0 +1,374 @@ +/* + * Copyright © 2018 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. + */ + +/** + * @file + * Basic tests for formats added by GL_EXT_texture_norm16 extension + * + * https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_norm16.txt + * + * Test includes: + * - texture uploads + * - mipmap generation + * - framebuffer creation + * - rendering to + * - reading from + * - interaction with GL_EXT_copy_image + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + config.supports_gl_es_version = 31; + config.window_visual = PIGLIT_GL_VISUAL_RGBA; +PIGLIT_GL_TEST_CONFIG_END + +static const char vs_source[] = + "#version 310 es\n" + "layout(location = 0) in highp vec4 vertex;\n" + "layout(location = 1) in highp vec4 uv;\n" + "out highp vec2 tex_coord;\n" + "\n" + "void main()\n" + "{\n" + " gl_Position = vertex;\n" + " tex_coord = uv.st;\n" + "}\n"; + +static const char fs_source[] = + "#version 310 es\n" + "layout(location = 0) uniform sampler2D texture;\n" + "in highp vec2 tex_coord;\n" + "out highp vec4 color;\n" + "void main()\n" + "{\n" + " color = texture2D(texture, tex_coord);\n" + "}\n"; + +/* trianglestrip,