[Piglit] [PATCH v3] arb_program_interface_query: GetProgramResourceIndex test
Test passes on Nvidia GTX 660 (binary driver version 331.38). v2: separate atomic counter index subtest (Ilia Mirkin) + code and shader cleanups + added subroutine index query test v3: fix indentation (argh!) Signed-off-by: Tapani Pälli --- tests/all.py | 1 + .../arb_program_interface_query/CMakeLists.gl.txt | 1 + .../arb_program_interface_query/resource-index.c | 284 + 3 files changed, 286 insertions(+) create mode 100644 tests/spec/arb_program_interface_query/resource-index.c diff --git a/tests/all.py b/tests/all.py index 0738de7..253f745 100644 --- a/tests/all.py +++ b/tests/all.py @@ -2049,6 +2049,7 @@ for test_type in ('shader', 'api'): arb_program_interface_query = spec['ARB_program_interface_query'] add_concurrent_test(arb_program_interface_query, ['arb_program_interface_query-resource-location']) +add_concurrent_test(arb_program_interface_query, ['arb_program_interface_query-resource-index']) # Group ARB_explicit_uniform_location arb_explicit_uniform_location = spec['ARB_explicit_uniform_location'] diff --git a/tests/spec/arb_program_interface_query/CMakeLists.gl.txt b/tests/spec/arb_program_interface_query/CMakeLists.gl.txt index 6fb7eaf..2028553 100644 --- a/tests/spec/arb_program_interface_query/CMakeLists.gl.txt +++ b/tests/spec/arb_program_interface_query/CMakeLists.gl.txt @@ -10,3 +10,4 @@ link_libraries ( ) piglit_add_executable (arb_program_interface_query-resource-location resource-location.c) +piglit_add_executable (arb_program_interface_query-resource-index resource-index.c) diff --git a/tests/spec/arb_program_interface_query/resource-index.c b/tests/spec/arb_program_interface_query/resource-index.c new file mode 100644 index 000..5c3538f --- /dev/null +++ b/tests/spec/arb_program_interface_query/resource-index.c @@ -0,0 +1,284 @@ +/* + * Copyright © 2015 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 resource-index.c + * + * Tests GetProgramResourceIndex interface. + * + * From the GL_ARB_program_interface_query spec: + * "The command returns the unsigned integer index assigned to a + * resource named in the interface type of + * program object . The error INVALID_ENUM is generated if + * is ATOMIC_COUNTER_BUFFER, since active atomic + * counter buffer resources are not assigned name strings. + * + * If exactly matches the name string of one of the active + * resources for , the index of the matched + * resource is returned. Additionally, if would exactly match + * the name string of an active resource if "[0]" were appended to , + * the index of the matched resource is returned. Otherwise, is + * considered not to be the name of an active resource, and INVALID_INDEX + * is returned. Note that if an interface enumerates a single active + * resource list entry for an array variable (e.g., "a[0]"), a + * identifying any array element other than the first (e.g., "a[1]") + * is not considered to match. + * + * For the interface TRANSFORM_FEEDBACK_VARYING, the value INVALID_INDEX + * should be returned when querying the index assigned to the special + * names "gl_NextBuffer", "gl_SkipComponents1", "gl_SkipComponents2", + * "gl_SkipComponents3", and "gl_SkipComponents4". + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_core_version = 32; + +PIGLIT_GL_TEST_CONFIG_END + +const char *xfb_markers[] = { + "gl_NextBuffer", + "gl_SkipComponents1", + "gl_SkipComponents2", + "gl_SkipComponents3", + "gl_SkipComponents4", + NULL +}; + +static const char vs_text[] = + "#version 150\n" + "in vec4 input0;\n" + "in vec4 input1;\n" + "uniform ubo { vec4 mod; };\n" + "void main() {\n" + "gl_Positi
[Piglit] [PATCH v2] arb_program_interface_query: GetProgramResourceIndex test
Test passes on Nvidia GTX 660 (binary driver version 331.38). v2: separate atomic counter index subtest (Ilia Mirkin) + code and shader cleanups + added subroutine index query test Signed-off-by: Tapani Pälli --- tests/all.py | 1 + .../arb_program_interface_query/CMakeLists.gl.txt | 1 + .../arb_program_interface_query/resource-index.c | 286 + 3 files changed, 288 insertions(+) create mode 100644 tests/spec/arb_program_interface_query/resource-index.c diff --git a/tests/all.py b/tests/all.py index 0738de7..253f745 100644 --- a/tests/all.py +++ b/tests/all.py @@ -2049,6 +2049,7 @@ for test_type in ('shader', 'api'): arb_program_interface_query = spec['ARB_program_interface_query'] add_concurrent_test(arb_program_interface_query, ['arb_program_interface_query-resource-location']) +add_concurrent_test(arb_program_interface_query, ['arb_program_interface_query-resource-index']) # Group ARB_explicit_uniform_location arb_explicit_uniform_location = spec['ARB_explicit_uniform_location'] diff --git a/tests/spec/arb_program_interface_query/CMakeLists.gl.txt b/tests/spec/arb_program_interface_query/CMakeLists.gl.txt index 6fb7eaf..2028553 100644 --- a/tests/spec/arb_program_interface_query/CMakeLists.gl.txt +++ b/tests/spec/arb_program_interface_query/CMakeLists.gl.txt @@ -10,3 +10,4 @@ link_libraries ( ) piglit_add_executable (arb_program_interface_query-resource-location resource-location.c) +piglit_add_executable (arb_program_interface_query-resource-index resource-index.c) diff --git a/tests/spec/arb_program_interface_query/resource-index.c b/tests/spec/arb_program_interface_query/resource-index.c new file mode 100644 index 000..47e31f6 --- /dev/null +++ b/tests/spec/arb_program_interface_query/resource-index.c @@ -0,0 +1,286 @@ +/* + * Copyright © 2015 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 resource-index.c + * + * Tests GetProgramResourceIndex interface. + * + * From the GL_ARB_program_interface_query spec: + * "The command returns the unsigned integer index assigned to a + * resource named in the interface type of + * program object . The error INVALID_ENUM is generated if + * is ATOMIC_COUNTER_BUFFER, since active atomic + * counter buffer resources are not assigned name strings. + * + * If exactly matches the name string of one of the active + * resources for , the index of the matched + * resource is returned. Additionally, if would exactly match + * the name string of an active resource if "[0]" were appended to , + * the index of the matched resource is returned. Otherwise, is + * considered not to be the name of an active resource, and INVALID_INDEX + * is returned. Note that if an interface enumerates a single active + * resource list entry for an array variable (e.g., "a[0]"), a + * identifying any array element other than the first (e.g., "a[1]") + * is not considered to match. + * + * For the interface TRANSFORM_FEEDBACK_VARYING, the value INVALID_INDEX + * should be returned when querying the index assigned to the special + * names "gl_NextBuffer", "gl_SkipComponents1", "gl_SkipComponents2", + * "gl_SkipComponents3", and "gl_SkipComponents4". + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_core_version = 32; + +PIGLIT_GL_TEST_CONFIG_END + +const char *xfb_markers[] = { + "gl_NextBuffer", + "gl_SkipComponents1", + "gl_SkipComponents2", + "gl_SkipComponents3", + "gl_SkipComponents4", + NULL +}; + +static const char vs_text[] = +"#version 150\n" +"in vec4 input0;\n" +"in vec4 input1;\n" + "uniform ubo { vec4 mod; };\n" +"void main() {\n" +"gl_Position = input0 * input1 * m
[Piglit] [PATCH v2 1/2] shaders: add test to check (0 cmp x+y) optimization
Signed-off-by: Samuel Iglesias Gonsalvez --- v2: * Implement it as shader_runner test tests/shaders/glsl-opt-0-cmp-xy.shader_test | 33 + 1 file changed, 33 insertions(+) create mode 100644 tests/shaders/glsl-opt-0-cmp-xy.shader_test diff --git a/tests/shaders/glsl-opt-0-cmp-xy.shader_test b/tests/shaders/glsl-opt-0-cmp-xy.shader_test new file mode 100644 index 000..57c5716 --- /dev/null +++ b/tests/shaders/glsl-opt-0-cmp-xy.shader_test @@ -0,0 +1,33 @@ +/* Test (0 cmp x+y) optimization. */ + +[require] +GLSL >= 1.10 + +[vertex shader] + +void main() +{ + gl_Position = ftransform(); +} + +[fragment shader] + +uniform float a; + +void main() +{ + if (0.0 >= (a - 1.0)) + gl_FragColor = vec4(0, 1, 0, 1); + else + gl_FragColor = vec4(1, 0, 0, 1); +} + +[test] +clear color 0.5 0.5 0.5 0.5 +clear +uniform float a 0 +draw rect -1 -1 1 2 +uniform float a 2 +draw rect 0 -1 1 2 +probe rgb 125 0 1.0 0.0 0.0 +probe rgb 0 0 0.0 1.0 0.0 -- 2.1.4 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v2 2/2] shaders: add test to check (x+y cmp 0) optimization
Signed-off-by: Samuel Iglesias Gonsalvez --- v2: * Implement it as shader_runner test tests/shaders/glsl-opt-xy-cmp-0.shader_test | 33 + 1 file changed, 33 insertions(+) create mode 100644 tests/shaders/glsl-opt-xy-cmp-0.shader_test diff --git a/tests/shaders/glsl-opt-xy-cmp-0.shader_test b/tests/shaders/glsl-opt-xy-cmp-0.shader_test new file mode 100644 index 000..97aa1fe --- /dev/null +++ b/tests/shaders/glsl-opt-xy-cmp-0.shader_test @@ -0,0 +1,33 @@ +/* Test (x+y cmp 0) optimization. */ + +[require] +GLSL >= 1.10 + +[vertex shader] + +void main() +{ + gl_Position = ftransform(); +} + +[fragment shader] + +uniform float a; + +void main() +{ + if ((a - 1.0) >= 0.0) + gl_FragColor = vec4(0, 1, 0, 1); + else + gl_FragColor = vec4(1, 0, 0, 1); +} + +[test] +clear color 0.5 0.5 0.5 0.5 +clear +uniform float a 0 +draw rect -1 -1 1 2 +uniform float a 2 +draw rect 0 -1 1 2 +probe rgb 125 0 0.0 1.0 0.0 +probe rgb 0 0 1.0 0.0 0.0 -- 2.1.4 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] shaders: add test to check (0 cmp x+y) optimization
On Fri, 2015-02-27 at 08:16 -0800, Ian Romanick wrote: > Why were these implemented as C tests instead of shader-runner tests? > Oh, you are right. They should be shader-runner tests. Please ignore these patches, I will send a new version of them but implemented as shader-runner tests instead. Thanks, Sam > On 02/27/2015 05:57 AM, Samuel Iglesias Gonsálvez wrote: > > This patch is meant to check that a Mesa patch [0] fixes a bug in (0 cmp > > x+y) optimization, as it was suggested by Ian [1]. Patch 2/2 checks (x+y > > cmp 0) optimization. > > > > My idea is to push these patches into master branch next week in order > > to have everything in place before pushing Mesa patch [0]. I am going to > > wait some days more before pushing them, just in case someone wants to > > review them. > > > > Thanks, > > > > Sam > > > > [0] > > http://lists.freedesktop.org/archives/mesa-dev/2015-February/077740.html > > [1] > > http://lists.freedesktop.org/archives/mesa-dev/2015-February/077767.html > > > > > > On Wed, 2015-02-25 at 15:03 +0100, Samuel Iglesias Gonsalvez wrote: > >> --- > >> tests/all.py | 1 + > >> tests/shaders/CMakeLists.gl.txt | 1 + > >> tests/shaders/glsl-opt-0-cmp-xy.c | 130 > >> ++ > >> 3 files changed, 132 insertions(+) > >> create mode 100644 tests/shaders/glsl-opt-0-cmp-xy.c > >> > >> diff --git a/tests/all.py b/tests/all.py > >> index 40f38cf..d07ae35 100644 > >> --- a/tests/all.py > >> +++ b/tests/all.py > >> @@ -506,6 +506,7 @@ add_concurrent_test(shaders, ['glsl-link-bug30552']) > >> add_concurrent_test(shaders, ['glsl-link-bug38015']) > >> add_concurrent_test(shaders, ['glsl-link-empty-prog-01']) > >> add_concurrent_test(shaders, ['glsl-link-empty-prog-02']) > >> +add_concurrent_test(shaders, ['glsl-opt-0-cmp-xy']) > >> shaders['GLSL link single global initializer, 2 shaders'] = \ > >> PiglitGLTest(['glsl-link-test', > >>os.path.join('shaders', > >> 'glsl-link-initializer-01a.vert'), > >> diff --git a/tests/shaders/CMakeLists.gl.txt > >> b/tests/shaders/CMakeLists.gl.txt > >> index 3efc6bf..521282b 100644 > >> --- a/tests/shaders/CMakeLists.gl.txt > >> +++ b/tests/shaders/CMakeLists.gl.txt > >> @@ -145,6 +145,7 @@ piglit_add_executable (glsl-routing glsl-routing.c) > >> piglit_add_executable (shader_runner shader_runner.c parser_utils.c) > >> piglit_add_executable (glsl-vs-point-size glsl-vs-point-size.c) > >> piglit_add_executable (glsl-sin glsl-sin.c) > >> +piglit_add_executable (glsl-opt-0-cmp-xy glsl-opt-0-cmp-xy.c) > >> IF (UNIX) > >>target_link_libraries(glsl-sin m) > >> ENDIF (UNIX) > >> diff --git a/tests/shaders/glsl-opt-0-cmp-xy.c > >> b/tests/shaders/glsl-opt-0-cmp-xy.c > >> new file mode 100644 > >> index 000..65cb555 > >> --- /dev/null > >> +++ b/tests/shaders/glsl-opt-0-cmp-xy.c > >> @@ -0,0 +1,130 @@ > >> +/* > >> + * Copyright © 2015 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. > >> + * > >> + * Authors: > >> + *Samuel Iglesias Gonsalvez > >> + * > >> + */ > >> + > >> +/** @file glsl-opt-0-cmp-xy.c > >> + * > >> + * It checks (0 cmp x+y) optimization (if any) works fine. > >> + * > >> + * Test renders two rectangles: left rect's color is green, right rect's > >> color > >> + * is red. Left rectangle's width is one pixel larger than right > >> rectangle's. > >> + * > >> + */ > >> + > >> +#include "piglit-util-gl.h" > >> + > >> +PIGLIT_GL_TEST_CONFIG_BEGIN > >> + > >> +config.supports_gl_compat_version = 10; > >> +config.window_visual = PIGLIT_GL_VISUAL_RGB | > >> PIGLIT_GL_VISUAL_DOUBLE; > >> +config.window_width = 50; > >> +config.window_height = 50; > >> + > >> +PIGLIT_GL_TEST_CONFIG
[Piglit] [Bug 89329] glsl-deriv-varyings regression
https://bugs.freedesktop.org/show_bug.cgi?id=89329 --- Comment #3 from lu hua --- I also see this fail on all platforms. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] arb_program_interface_query: GetProgramResourceIndex test
On 02/27/2015 06:36 PM, Ilia Mirkin wrote: On Fri, Feb 27, 2015 at 4:32 AM, Tapani Pälli wrote: diff --git a/tests/all.py b/tests/all.py index 8b9426a..d19b20a 100644 --- a/tests/all.py +++ b/tests/all.py @@ -2049,6 +2049,7 @@ for test_type in ('shader', 'api'): arb_program_interface_query = spec['ARB_program_interface_query'] add_plain_test(arb_program_interface_query, ['arb_program_interface_query-resource-location']) +add_plain_test(arb_program_interface_query, ['arb_program_interface_query-resource-index']) And one other thing -- these should probably both be add_concurrent_test (unless Dylan has redone things to make concurrent default already). Right, will change these concurrent, // Tapani ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] arb_program_interface_query: GetProgramResourceIndex test
On 02/27/2015 06:04 PM, Ilia Mirkin wrote: On Fri, Feb 27, 2015 at 4:32 AM, Tapani Pälli wrote: Test passes on Nvidia GTX 660 (binary driver version 331.38). Signed-off-by: Tapani Pälli --- tests/all.py | 1 + .../arb_program_interface_query/CMakeLists.gl.txt | 1 + .../arb_program_interface_query/resource-index.c | 210 + 3 files changed, 212 insertions(+) create mode 100644 tests/spec/arb_program_interface_query/resource-index.c diff --git a/tests/all.py b/tests/all.py index 8b9426a..d19b20a 100644 --- a/tests/all.py +++ b/tests/all.py @@ -2049,6 +2049,7 @@ for test_type in ('shader', 'api'): arb_program_interface_query = spec['ARB_program_interface_query'] add_plain_test(arb_program_interface_query, ['arb_program_interface_query-resource-location']) +add_plain_test(arb_program_interface_query, ['arb_program_interface_query-resource-index']) # Group ARB_explicit_uniform_location arb_explicit_uniform_location = spec['ARB_explicit_uniform_location'] diff --git a/tests/spec/arb_program_interface_query/CMakeLists.gl.txt b/tests/spec/arb_program_interface_query/CMakeLists.gl.txt index 6fb7eaf..2028553 100644 --- a/tests/spec/arb_program_interface_query/CMakeLists.gl.txt +++ b/tests/spec/arb_program_interface_query/CMakeLists.gl.txt @@ -10,3 +10,4 @@ link_libraries ( ) piglit_add_executable (arb_program_interface_query-resource-location resource-location.c) +piglit_add_executable (arb_program_interface_query-resource-index resource-index.c) diff --git a/tests/spec/arb_program_interface_query/resource-index.c b/tests/spec/arb_program_interface_query/resource-index.c new file mode 100644 index 000..a496c65 --- /dev/null +++ b/tests/spec/arb_program_interface_query/resource-index.c @@ -0,0 +1,210 @@ +/* + * Copyright © 2015 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 resource-index.c + * + * Tests GetProgramResourceIndex interface. + * + * From the GL_ARB_program_interface_query spec: + * "The command returns the unsigned integer index assigned to a + * resource named in the interface type of + * program object . The error INVALID_ENUM is generated if + * is ATOMIC_COUNTER_BUFFER, since active atomic + * counter buffer resources are not assigned name strings. + * + * If exactly matches the name string of one of the active + * resources for , the index of the matched + * resource is returned. Additionally, if would exactly match + * the name string of an active resource if "[0]" were appended to , + * the index of the matched resource is returned. Otherwise, is + * considered not to be the name of an active resource, and INVALID_INDEX + * is returned. Note that if an interface enumerates a single active + * resource list entry for an array variable (e.g., "a[0]"), a + * identifying any array element other than the first (e.g., "a[1]") + * is not considered to match. + * + * For the interface TRANSFORM_FEEDBACK_VARYING, the value INVALID_INDEX + * should be returned when querying the index assigned to the special + * names "gl_NextBuffer", "gl_SkipComponents1", "gl_SkipComponents2", + * "gl_SkipComponents3", and "gl_SkipComponents4". + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_compat_version = 32; + config.supports_gl_core_version = 32; You should really have just one of these... I think the compat one can go. ok + config.window_visual = PIGLIT_GL_VISUAL_RGB; + +PIGLIT_GL_TEST_CONFIG_END + [...] + +void +piglit_init(int argc, char **argv) +{ + GLuint prog, shader; + bool pass = true; + const char **marker = xfb_markers; + + piglit_require_extension("GL_ARB_program_interface_query"); + piglit_require_extension("GL_ARB_expl
Re: [Piglit] [PATCH] amd_compressed_atc_texture: add miptree test
And naturally I forgot to add the new test to all.py, I've added this hunk locally: --- a/tests/all.py +++ b/tests/all.py @@ -3901,6 +3901,9 @@ oes_compressed_paletted_texture['basic API'] = PiglitGLTest(['oes_compressed_pal oes_compressed_paletted_texture['invalid formats'] = PiglitGLTest(['arb_texture_compression-invalid-formats', 'paletted'], run_concurrent=True) oes_compressed_paletted_texture['basic API'] = PiglitGLTest(['oes_compressed_paletted_texture-api'], run_concurrent=True) +amd_compressed_atc_texture = spec['AMD_compressed_ATC_texture'] +amd_compressed_atc_texture['miptree'] = PiglitGLTest(['amd_compressed_atc_texture-miptree'], run_concurrent=True) + egl14 = spec['EGL 1.4'] egl14['eglCreateSurface'] = PiglitGLTest(['egl-create-surface'], exclude_platforms=['glx']) egl14['eglQuerySurface EGL_BAD_ATTRIBUTE'] = PiglitGLTest(['egl-query-surface', '--bad-attr'], exclude_platforms=['glx']) On Sun, Mar 1, 2015 at 10:01 PM, Ilia Mirkin wrote: > This echoes the ETC1 miptree test, and even uses the same image. > > Signed-off-by: Ilia Mirkin > --- > > I used The Compressonator tool from AMD, which generates DDS files, > so I also added *very* basic support for DDS files in piglit. It could > be extended by an interested party to actually support more formats/etc. > > tests/spec/CMakeLists.txt | 1 + > .../CMakeLists.gles2.txt | 6 + > .../spec/amd_compressed_atc_texture/CMakeLists.txt | 1 + > tests/spec/amd_compressed_atc_texture/miptree.c| 261 > + > .../waffles-compressed-atc-64x32-miptree.dds | Bin 0 -> 1512 bytes > .../waffles-decompressed-rgb-64x32-miptree.dds | Bin 0 -> 8321 bytes > tests/util/CMakeLists.txt | 1 + > tests/util/piglit-dds.c| 220 + > tests/util/piglit-dds.h| 72 ++ > 9 files changed, 562 insertions(+) > create mode 100644 tests/spec/amd_compressed_atc_texture/CMakeLists.gles2.txt > create mode 100644 tests/spec/amd_compressed_atc_texture/CMakeLists.txt > create mode 100644 tests/spec/amd_compressed_atc_texture/miptree.c > create mode 100644 > tests/spec/amd_compressed_atc_texture/waffles-compressed-atc-64x32-miptree.dds > create mode 100644 > tests/spec/amd_compressed_atc_texture/waffles-decompressed-rgb-64x32-miptree.dds > create mode 100644 tests/util/piglit-dds.c > create mode 100644 tests/util/piglit-dds.h > > diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt > index 7423589..dee56d6 100644 > --- a/tests/spec/CMakeLists.txt > +++ b/tests/spec/CMakeLists.txt > @@ -1,3 +1,4 @@ > +add_subdirectory (amd_compressed_atc_texture) > add_subdirectory (amd_performance_monitor) > add_subdirectory (amd_pinned_memory) > add_subdirectory (arb_base_instance) > diff --git a/tests/spec/amd_compressed_atc_texture/CMakeLists.gles2.txt > b/tests/spec/amd_compressed_atc_texture/CMakeLists.gles2.txt > new file mode 100644 > index 000..0509e44 > --- /dev/null > +++ b/tests/spec/amd_compressed_atc_texture/CMakeLists.gles2.txt > @@ -0,0 +1,6 @@ > +include_directories( > + ${GLEXT_INCLUDE_DIR} > + ${OPENGL_INCLUDE_PATH} > +) > +link_libraries(piglitutil_${piglit_target_api}) > +piglit_add_executable(amd_compressed_atc_texture-miptree miptree.c) > diff --git a/tests/spec/amd_compressed_atc_texture/CMakeLists.txt > b/tests/spec/amd_compressed_atc_texture/CMakeLists.txt > new file mode 100644 > index 000..144a306 > --- /dev/null > +++ b/tests/spec/amd_compressed_atc_texture/CMakeLists.txt > @@ -0,0 +1 @@ > +piglit_include_target_api() > diff --git a/tests/spec/amd_compressed_atc_texture/miptree.c > b/tests/spec/amd_compressed_atc_texture/miptree.c > new file mode 100644 > index 000..c533dac > --- /dev/null > +++ b/tests/spec/amd_compressed_atc_texture/miptree.c > @@ -0,0 +1,261 @@ > +/* > + * Copyright 2012 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, TOR
[Piglit] [PATCH] amd_compressed_atc_texture: add miptree test
This echoes the ETC1 miptree test, and even uses the same image. Signed-off-by: Ilia Mirkin --- I used The Compressonator tool from AMD, which generates DDS files, so I also added *very* basic support for DDS files in piglit. It could be extended by an interested party to actually support more formats/etc. tests/spec/CMakeLists.txt | 1 + .../CMakeLists.gles2.txt | 6 + .../spec/amd_compressed_atc_texture/CMakeLists.txt | 1 + tests/spec/amd_compressed_atc_texture/miptree.c| 261 + .../waffles-compressed-atc-64x32-miptree.dds | Bin 0 -> 1512 bytes .../waffles-decompressed-rgb-64x32-miptree.dds | Bin 0 -> 8321 bytes tests/util/CMakeLists.txt | 1 + tests/util/piglit-dds.c| 220 + tests/util/piglit-dds.h| 72 ++ 9 files changed, 562 insertions(+) create mode 100644 tests/spec/amd_compressed_atc_texture/CMakeLists.gles2.txt create mode 100644 tests/spec/amd_compressed_atc_texture/CMakeLists.txt create mode 100644 tests/spec/amd_compressed_atc_texture/miptree.c create mode 100644 tests/spec/amd_compressed_atc_texture/waffles-compressed-atc-64x32-miptree.dds create mode 100644 tests/spec/amd_compressed_atc_texture/waffles-decompressed-rgb-64x32-miptree.dds create mode 100644 tests/util/piglit-dds.c create mode 100644 tests/util/piglit-dds.h diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt index 7423589..dee56d6 100644 --- a/tests/spec/CMakeLists.txt +++ b/tests/spec/CMakeLists.txt @@ -1,3 +1,4 @@ +add_subdirectory (amd_compressed_atc_texture) add_subdirectory (amd_performance_monitor) add_subdirectory (amd_pinned_memory) add_subdirectory (arb_base_instance) diff --git a/tests/spec/amd_compressed_atc_texture/CMakeLists.gles2.txt b/tests/spec/amd_compressed_atc_texture/CMakeLists.gles2.txt new file mode 100644 index 000..0509e44 --- /dev/null +++ b/tests/spec/amd_compressed_atc_texture/CMakeLists.gles2.txt @@ -0,0 +1,6 @@ +include_directories( + ${GLEXT_INCLUDE_DIR} + ${OPENGL_INCLUDE_PATH} +) +link_libraries(piglitutil_${piglit_target_api}) +piglit_add_executable(amd_compressed_atc_texture-miptree miptree.c) diff --git a/tests/spec/amd_compressed_atc_texture/CMakeLists.txt b/tests/spec/amd_compressed_atc_texture/CMakeLists.txt new file mode 100644 index 000..144a306 --- /dev/null +++ b/tests/spec/amd_compressed_atc_texture/CMakeLists.txt @@ -0,0 +1 @@ +piglit_include_target_api() diff --git a/tests/spec/amd_compressed_atc_texture/miptree.c b/tests/spec/amd_compressed_atc_texture/miptree.c new file mode 100644 index 000..c533dac --- /dev/null +++ b/tests/spec/amd_compressed_atc_texture/miptree.c @@ -0,0 +1,261 @@ +/* + * Copyright 2012 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 + * \brief Test texturing from an ATC miptree of a real image. + * + * Copied from identical ETC1 test. + * + * This test uses two data files. The file waffles-compressed-atc-64x32.dds + * contains a full miptree in GL_ATC_RGB_AMD format of a 2D texture of + * waffles and fruit [1]. The base level size is 64x32 pixels. The file + * waffles-decompressed-rgb-64x32.ktx contains a parallel miptree in GL_RGB + * format. Each of its RGB images was obtained by decompressing the corresponding + * ATC image with AMD-supplied Compressonator [2]. + * + * This test draws each miplevel i of the ATC texture such that the image's + * lower left corner is at (x=0, y=sum(height of miplevel j for j=0 to i-1)), + * and it draws each miplevel of the RGB texture to the right of its + * corresponding ETC1 image. Then it compares that the images are identical. + * + * [1] The reference image is located at http://people.freedesktop.org/~chadversary/permalink/2012-07-09/1574cff2-d091-4421-a3cf-b56c7943
Re: [Piglit] [PATCH] AMD_performance_monitor: add missing subtest result
On 03/01/2015 07:16 AM, Kenneth Graunke wrote: On Saturday, February 28, 2015 06:20:15 PM Samuel Pitoiset wrote: The "counters in range" subtest was not reported. Signed-off-by: Samuel Pitoiset --- tests/spec/amd_performance_monitor/measure.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/spec/amd_performance_monitor/measure.c b/tests/spec/amd_performance_monitor/measure.c index 5fe75d5..ace2879 100644 --- a/tests/spec/amd_performance_monitor/measure.c +++ b/tests/spec/amd_performance_monitor/measure.c @@ -244,6 +244,8 @@ test_basic_measurement(unsigned group) } verify(result_size == ((char *) p - (char *) data)); + piglit_report_subtest_result(PIGLIT_PASS, "%s", test_name); + free(data); /** Oops! Good catch. Reviewed-by: Kenneth Graunke Do you need someone to commit this for you? Yes, I don't have commit access to piglit. Thank you. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit