Re: [Piglit] [PATCH] arb_program_interface_query: corrected AoA's index variable expectation
On Sat, 2019-02-16 at 10:05 +1100, Timothy Arceri wrote: > NAK. > > The problem is this will end up making the test fail on the Nvidia blob. > Technically neither is incorrect, but the test does show Mesa's failure > to detect the unused element. Again this is not technically a failure of > the spec as it's dependent on the implementations ability to detect > active array elements. However I'd rather leave this than work around > our substandard detection of inactive elements. I wonder if it's really worthy, then, to test something that is implementation dependent. > See [1] for more information, and note I also rejected the Mesa solution > proposed by Andrii in the bug report because it was too much code for > something that didn't actually remove the unused components but just hid > them from the resource list. > > I think if we actually want to fix this properly then we could do it by > making a NIR linker for GLSL. > > [1] https://bugs.freedesktop.org/show_bug.cgi?id=92822 OK. Thanks for the thorough explanation! I'll drop this patch. > > On 9/2/19 3:59 am, Andres Gomez wrote: > > Naming conventions, from the GL_ARB_program_interface_query extension: > > > > " * For an active variable declared as an array of an aggregate > > data type (structures or arrays), a separate entry will be > > generated for each active array element, unless noted > > immediately below. The name of each entry is formed by > > concatenating the name of the array, the "[" character, an > > integer identifying the element number, and the "]" character. > > These enumeration rules are applied recursively, treating each > > enumerated array element as a separate active variable." > > > > Cc: Timothy Arceri > > Cc: Martin Peres > > Signed-off-by: Andres Gomez > > --- > > .../spec/arb_program_interface_query/getprogramresourceindex.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git > > a/tests/spec/arb_program_interface_query/getprogramresourceindex.c > > b/tests/spec/arb_program_interface_query/getprogramresourceindex.c > > index 16b38e2d5..2afc9eeb9 100755 > > --- a/tests/spec/arb_program_interface_query/getprogramresourceindex.c > > +++ b/tests/spec/arb_program_interface_query/getprogramresourceindex.c > > @@ -167,7 +167,7 @@ static const struct subtest_index_t index_subtests[] = { > > { vs_aofa, GL_PROGRAM_INPUT, "vs_input2", > > false, -1, GL_NO_ERROR }, > > { vs_aofa, GL_PROGRAM_INPUT, "vs_input2[0]", > > true, -1, GL_NO_ERROR }, > > { vs_aofa, GL_PROGRAM_INPUT,"vs_input2[0][0]", > > true, -1, GL_NO_ERROR }, > > - { vs_aofa, GL_PROGRAM_INPUT,"vs_input2[1][0]", > > false, -1, GL_NO_ERROR }, > > + { vs_aofa, GL_PROGRAM_INPUT,"vs_input2[1][0]", > > true, -1, GL_NO_ERROR }, > > { vs_aofa, GL_PROGRAM_INPUT,"vs_input2[0][1]", > > false, -1, GL_NO_ERROR }, > > {vs_sub, GL_VERTEX_SUBROUTINE,"vss", > > true, -1, GL_NO_ERROR }, > > {vs_sub, GL_VERTEX_SUBROUTINE, "vss2", > > true, -1, GL_NO_ERROR }, > > -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-1.10: test for crash in loop analysis
This is: Reviewed-by: Andres Gomez On Tue, 2019-03-19 at 14:29 +1100, Timothy Arceri wrote: > This test for a crash in Mesa seen in an Assasins Creed Odyssey shader. > --- > ...riable-iteration-limit-unroll4.shader_test | 88 +++ > 1 file changed, 88 insertions(+) > create mode 100644 > tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test > > diff --git > a/tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test > > b/tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test > new file mode 100644 > index 0..38fdda4ca > --- /dev/null > +++ > b/tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test > @@ -0,0 +1,88 @@ > +# This tests unrolling of a loop with a single exit point but where the > +# exact trip count is unknown, only the max iteration count (4) is known. > +# > +# Here we test all possible outcomes for the loop and also add some > +# unreachable code to make sure it is not accessible after unrolling. > +[require] > +GLSL >= 1.10 > + > +[vertex shader] > +uniform int loop_count; > +uniform int loop_count2; > + > +void main() > +{ > + gl_Position = gl_Vertex; > + > + vec4 colour = vec4(1.0, 1.0, 1.0, 1.0); > + > + int i = 0; > + int j = 0; > + int x = 0; > + > + /* Here we add a second && and put the known limit i < 4 in parentheses in > + * order to trigger a Mesa bug seen in a Assasins Creed Odyssey shader > + */ > + while (x < loop_count && (i < 4 && j < loop_count2)) { > +if (x == 0 && i == 0) > + colour = vec4(0.0, 0.25, 0.0, 1.0); > + > +if (x == 2 && i == 1 && j == 4) > + colour = vec4(0.0, 0.5, 0.0, 1.0); > + > +if (x == 4 && i == 2 && j == 8) > + colour = vec4(0.0, 0.75, 0.0, 1.0); > + > +if (x == 6 && i == 3 && j == 12) > + colour = vec4(0.0, 1.0, 0.0, 1.0); > + > +/* This should be unreachable */ > +if (x >= 8 || i >= 4) > + colour = vec4(1.0, 0.0, 0.0, 1.0); > + > +i++; > +x+=2; > +j+=4; > + } > + > + gl_FrontColor = colour; > +} > + > +[fragment shader] > +void main() > +{ > + gl_FragColor = gl_Color; > +} > + > +[test] > +clear color 0.5 0.5 0.5 0.5 > + > +uniform int loop_count 0 > +uniform int loop_count2 16 > +draw rect -1 -1 2 2 > +probe all rgba 1.0 1.0 1.0 1.0 > + > +uniform int loop_count 2 > +uniform int loop_count2 16 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 0.25 0.0 1.0 > + > +uniform int loop_count 4 > +uniform int loop_count2 16 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 0.5 0.0 1.0 > + > +uniform int loop_count 6 > +uniform int loop_count2 16 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 0.75 0.0 1.0 > + > +uniform int loop_count 8 > +uniform int loop_count2 16 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 1.0 0.0 1.0 > + > +uniform int loop_count 10 > +uniform int loop_count2 16 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 1.0 0.0 1.0 -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 04/10] arb_enhanced_layouts: add aliasing tests with mixed type widths
On Wed, 2019-03-20 at 20:56 +1100, Timothy Arceri wrote: > > On 20/3/19 7:58 pm, Juan A. Suarez Romero wrote: > > For the 4 first patches in the series: > > > > Reviewed-by: Juan A. Suarez > > > > > > On Fri, 2019-02-01 at 19:55 +0200, Andres Gomez wrote: > > > Added tests which check component aliasing between types that have > > > different bit widths. > > > > > > From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.60 spec: > > > > > > "Further, when location aliasing, the aliases sharing the location > > > must have the same underlying numerical type and bit > > > width (floating-point or integer, 32-bit versus 64-bit, etc.) > > > and the same auxiliary storage and interpolation > > > qualification. The one exception where component aliasing is > > > permitted is for two input variables (not block members) to a > > > vertex shader, which are allowed to have component aliasing. This > > > vertex-variable component aliasing is intended only to support > > > vertex shaders where each execution path accesses at most one > > > input per each aliased component. Implementations are permitted, > > > but not required, to generate link-time errors if they detect > > > that every path through the vertex shader executable accesses > > > multiple inputs aliased to any single component." > > > > > > Cc: Timothy Arceri > > > Cc: Iago Toral Quiroga > > > Cc: Ilia Mirkin > > > Signed-off-by: Andres Gomez > > > --- > > > .../type-mismatch-signed-double.vert | 59 +++ > > > .../width-mismatch-float-double.vert | 59 +++ > > > ...s-width-mismatch-double-float.shader_test} | 25 > > > 3 files changed, 131 insertions(+), 12 deletions(-) > > > create mode 100644 > > > tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert > > > create mode 100644 > > > tests/spec/arb_enhanced_layouts/compiler/component-layout/width-mismatch-float-double.vert > > > rename > > > tests/spec/arb_enhanced_layouts/linker/component-layout/{vs-to-fs-type-mismatch-double-float.shader_test > > > => vs-to-fs-width-mismatch-double-float.shader_test} (56%) > > > > > > diff --git > > > a/tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert > > > > > > b/tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert > > > new file mode 100644 > > > index 0..01bfb0df1 > > > --- /dev/null > > > +++ > > > b/tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert > > > @@ -0,0 +1,59 @@ > > > +// [config] > > > +// expect_result: pass > > > +// glsl_version: 1.50 > > > +// check_link: true > > > +// require_extensions: GL_ARB_enhanced_layouts > > > GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 > > > GL_ARB_vertex_attrib_64bit > > > +// [end config] > > > +// > > > +// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec: > > > +// > > > +// "Further, when location aliasing, the aliases sharing the location > > > must > > > +// have the same underlying numerical type (floating-point or integer) > > > and > > > +// the same auxiliary storage and interpolation qualification" > > > +// > > > +// ... > > > +// > > > +// "The one exception where component aliasing is permitted is for two > > > input > > > +// variables (not block members) to a vertex shader, which are allowed > > > to > > > +// have component aliasing. This vertex-variable component aliasing is > > > +// intended only to support vertex shaders where each execution path > > > +// accesses at most one input per each aliased component. > > > Implementations > > > +// are permitted, but not required, to generate link-time errors if > > > they > > > +// detect that every path through the vertex shader executable accesses > > > +// multiple inputs aliased to any single component." > > > +// > > > +// Issue 16 from the ARB_enhanced_layouts spec: > > > +// > > > +// "We do allow this for vertex shader inputs, because we've supported > >
Re: [Piglit] [PATCH 2/2] arb_program_interface_query: correct rendez-vous by name matching
On Tue, 2019-03-19 at 16:14 +0200, Andres Gomez wrote: > On Sat, 2019-02-16 at 10:22 +1100, Timothy Arceri wrote: > > It would be great if you could run this test on the Nvidia binary blob > > to confirm the results. If everything works as expected the series is: > > The problem is that nVIDIA shows many other failures in these tests due > to other conditions. However, the results do not change after this > patch. > > Additionally, I've tried to address all the other failures exhibited by > nVIDIA in a series that I'll send shortly after. See: https://gitlab.freedesktop.org/mesa/piglit/merge_requests/20 https://gitlab.freedesktop.org/mesa/piglit/merge_requests/21 > In other words, the > nVIDIA blob likes this changes. It just happens that it needs several > additional other. > > Hence, I'll understand I can land this series with your Rb. > > > > Reviewed-by: Timothy Arceri > > > > Thanks for fixing all this! > > > > On 9/2/19 3:57 am, Andres Gomez wrote: > > > Previuosly, this was overlooked asuming that, since they were SSOs, no > > > inner interface matching check was needed. > > > > > > From the ARB_separate_shader_objects spec v.25: > > > > > >" With separable program objects, interfaces between shader stages > > > may involve the outputs from one program object and the inputs > > > from a second program object. For such interfaces, it is not > > > possible to detect mismatches at link time, because the programs > > > are linked separately. When each such program is linked, all > > > inputs or outputs interfacing with another program stage are > > > treated as active. The linker will generate an executable that > > > assumes the presence of a compatible program on the other side of > > > the interface. If a mismatch between programs occurs, no GL error > > > will be generated, but some or all of the inputs on the interface > > > will be undefined." > > > > > > Cc: Timothy Arceri > > > Cc: Tapani Pälli > > > Cc: Ilia Mirkin > > > Cc: Martin Peres > > > Signed-off-by: Andres Gomez > > > --- > > > .../spec/arb_program_interface_query/common.h | 61 --- > > > .../getprogramresourceiv.c| 8 +-- > > > .../resource-query.c | 48 +++ > > > 3 files changed, 79 insertions(+), 38 deletions(-) > > > > > > diff --git a/tests/spec/arb_program_interface_query/common.h > > > b/tests/spec/arb_program_interface_query/common.h > > > index 371b0338b..c0a99ea64 100755 > > > --- a/tests/spec/arb_program_interface_query/common.h > > > +++ b/tests/spec/arb_program_interface_query/common.h > > > @@ -74,9 +74,11 @@ static const char vs_std[] = > > > "uniform vs_struct sa[2];\n" > > > "in vec4 vs_input0;\n" > > > "in vec4 vs_input1;\n" > > > + "out vec4 vs_output1;\n" > > > "void main() {\n" > > > " gl_Position = vs_input0 * vs_test * vs_input1 + > > > sa[0].a[1] +" > > > " sa[1].a[1];\n" > > > + " vs_output1 = vs_input0;\n" > > > "}"; > > > > > > const char gs_std[] = > > > @@ -86,18 +88,38 @@ const char gs_std[] = > > > "uniform gs_uniform_block {\n" > > > " vec4 gs_test;\n" > > > "};\n" > > > - "in vec4 gs_input[3];\n" > > > - "out vec4 gs_output0;\n" > > > + "in vec4 vs_output1[3];\n" > > > + "out vec4 fs_input1;\n" > > > "void main() {\n" > > > " for (int i = 0; i < 6; i++) {\n" > > > - " gl_Position = gs_input[i % 3] *" > > > + " gl_Position = vs_output1[i % 3] *" > > > " gl_in[i % 3].gl_Position * > > > gs_test;\n" > > > - " gs_output0 = gs_input[0];\n" > > > + " fs_input1 = vs_output1[0];\n" > > > " EmitVertex();\n" > > > " }\n" > > > "}\n"; > > > > > > static const char fs_std[] = > > > + "#
Re: [Piglit] [PATCH 2/2] arb_program_interface_query: correct rendez-vous by name matching
On Sat, 2019-02-16 at 10:22 +1100, Timothy Arceri wrote: > It would be great if you could run this test on the Nvidia binary blob > to confirm the results. If everything works as expected the series is: The problem is that nVIDIA shows many other failures in these tests due to other conditions. However, the results do not change after this patch. Additionally, I've tried to address all the other failures exhibited by nVIDIA in a series that I'll send shortly after. I other words, the nVIDIA blob likes this changes. It just happens that it needs several additional other. Hence, I'll understand I can land this series with your Rb. > Reviewed-by: Timothy Arceri > > Thanks for fixing all this! > > On 9/2/19 3:57 am, Andres Gomez wrote: > > Previuosly, this was overlooked asuming that, since they were SSOs, no > > inner interface matching check was needed. > > > > From the ARB_separate_shader_objects spec v.25: > > > >" With separable program objects, interfaces between shader stages > > may involve the outputs from one program object and the inputs > > from a second program object. For such interfaces, it is not > > possible to detect mismatches at link time, because the programs > > are linked separately. When each such program is linked, all > > inputs or outputs interfacing with another program stage are > > treated as active. The linker will generate an executable that > > assumes the presence of a compatible program on the other side of > > the interface. If a mismatch between programs occurs, no GL error > > will be generated, but some or all of the inputs on the interface > > will be undefined." > > > > Cc: Timothy Arceri > > Cc: Tapani Pälli > > Cc: Ilia Mirkin > > Cc: Martin Peres > > Signed-off-by: Andres Gomez > > --- > > .../spec/arb_program_interface_query/common.h | 61 --- > > .../getprogramresourceiv.c| 8 +-- > > .../resource-query.c | 48 +++ > > 3 files changed, 79 insertions(+), 38 deletions(-) > > > > diff --git a/tests/spec/arb_program_interface_query/common.h > > b/tests/spec/arb_program_interface_query/common.h > > index 371b0338b..c0a99ea64 100755 > > --- a/tests/spec/arb_program_interface_query/common.h > > +++ b/tests/spec/arb_program_interface_query/common.h > > @@ -74,9 +74,11 @@ static const char vs_std[] = > > "uniform vs_struct sa[2];\n" > > "in vec4 vs_input0;\n" > > "in vec4 vs_input1;\n" > > + "out vec4 vs_output1;\n" > > "void main() {\n" > > " gl_Position = vs_input0 * vs_test * vs_input1 + sa[0].a[1] +" > > " sa[1].a[1];\n" > > + " vs_output1 = vs_input0;\n" > > "}"; > > > > const char gs_std[] = > > @@ -86,18 +88,38 @@ const char gs_std[] = > > "uniform gs_uniform_block {\n" > > " vec4 gs_test;\n" > > "};\n" > > - "in vec4 gs_input[3];\n" > > - "out vec4 gs_output0;\n" > > + "in vec4 vs_output1[3];\n" > > + "out vec4 fs_input1;\n" > > "void main() {\n" > > " for (int i = 0; i < 6; i++) {\n" > > - " gl_Position = gs_input[i % 3] *" > > + " gl_Position = vs_output1[i % 3] *" > > " gl_in[i % 3].gl_Position * gs_test;\n" > > - " gs_output0 = gs_input[0];\n" > > + " fs_input1 = vs_output1[0];\n" > > " EmitVertex();\n" > > " }\n" > > "}\n"; > > > > static const char fs_std[] = > > + "#version 150\n" > > + "uniform fs_uniform_block {" > > + " vec4 fs_color;\n" > > + " float fs_array[4];\n" > > + "};\n" > > + "uniform fs_array_uniform_block {\n" > > + " vec4 fs_color;\n" > > + " float fs_array[4];\n" > > + "} faub[4];\n" > > + "in vec4 vs_output1;\n" > > + "out vec4 fs_output0;\n" > > + "out vec4 fs_output1;\n" > > + "void main() {\n" > > + "fs_output0 = fs_color * vs_output1 * fs_array[2] * \n" > > + "
Re: [Piglit] [PATCH] editorconfig: Add max_line_length property
On Fri, 2019-02-22 at 18:15 +, Eric Engestrom wrote: > > On February 22, 2019 2:51:28 PM UTC, Andres Gomez wrote: > > The property is supported by most of the editors, but not all: > > https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#max_line_length > > > > Cc: Eric Engestrom > > Cc: Eric Anholt > > Signed-off-by: Andres Gomez > > --- > > .editorconfig | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/.editorconfig b/.editorconfig > > index c614fcca7..e0f13a949 100644 > > --- a/.editorconfig > > +++ b/.editorconfig > > @@ -4,15 +4,19 @@ root = true > > indent_style = space > > indent_size = 4 > > trim_trailing_whitespace = true > > +max_line_length = 79 > > I'm assuming that's a "78" typo? Not really. Python code has its own rules: https://gitlab.freedesktop.org/mesa/piglit/blob/master/HACKING#L133 And, as you can see, it is 79: https://www.python.org/dev/peps/pep-0008/#maximum-line-length > Anyway: > Acked-by: Eric Engestrom Can I still have your Ack-b? > If the idea is to have it everywhere though, just put it once in a [*] > section. Python is special and, in the rest of sections, the other values are also individual so I'm being coherent. > > > > > [*.{c,cpp,h,hpp}] > > indent_style = tab > > tab_width = 8 > > +max_line_length = 78 > > > > [*.{cmake,txt}] > > indent_style = tab > > tab_width = 8 > > +max_line_length = 78 > > > > [{README,HACKING}] > > indent_style = tab > > tab_width = 8 > > +max_line_length = 78 -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] editorconfig: Add max_line_length property
The property is supported by most of the editors, but not all: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#max_line_length Cc: Eric Engestrom Cc: Eric Anholt Signed-off-by: Andres Gomez --- .editorconfig | 4 1 file changed, 4 insertions(+) diff --git a/.editorconfig b/.editorconfig index c614fcca7..e0f13a949 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,15 +4,19 @@ root = true indent_style = space indent_size = 4 trim_trailing_whitespace = true +max_line_length = 79 [*.{c,cpp,h,hpp}] indent_style = tab tab_width = 8 +max_line_length = 78 [*.{cmake,txt}] indent_style = tab tab_width = 8 +max_line_length = 78 [{README,HACKING}] indent_style = tab tab_width = 8 +max_line_length = 78 -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_program_interface_query: corrected AoA's index variable expectation
Naming conventions, from the GL_ARB_program_interface_query extension: " * For an active variable declared as an array of an aggregate data type (structures or arrays), a separate entry will be generated for each active array element, unless noted immediately below. The name of each entry is formed by concatenating the name of the array, the "[" character, an integer identifying the element number, and the "]" character. These enumeration rules are applied recursively, treating each enumerated array element as a separate active variable." Cc: Timothy Arceri Cc: Martin Peres Signed-off-by: Andres Gomez --- .../spec/arb_program_interface_query/getprogramresourceindex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/arb_program_interface_query/getprogramresourceindex.c b/tests/spec/arb_program_interface_query/getprogramresourceindex.c index 16b38e2d5..2afc9eeb9 100755 --- a/tests/spec/arb_program_interface_query/getprogramresourceindex.c +++ b/tests/spec/arb_program_interface_query/getprogramresourceindex.c @@ -167,7 +167,7 @@ static const struct subtest_index_t index_subtests[] = { { vs_aofa, GL_PROGRAM_INPUT, "vs_input2", false, -1, GL_NO_ERROR }, { vs_aofa, GL_PROGRAM_INPUT, "vs_input2[0]", true, -1, GL_NO_ERROR }, { vs_aofa, GL_PROGRAM_INPUT,"vs_input2[0][0]", true, -1, GL_NO_ERROR }, - { vs_aofa, GL_PROGRAM_INPUT,"vs_input2[1][0]", false, -1, GL_NO_ERROR }, + { vs_aofa, GL_PROGRAM_INPUT,"vs_input2[1][0]", true, -1, GL_NO_ERROR }, { vs_aofa, GL_PROGRAM_INPUT,"vs_input2[0][1]", false, -1, GL_NO_ERROR }, {vs_sub, GL_VERTEX_SUBROUTINE,"vss", true, -1, GL_NO_ERROR }, {vs_sub, GL_VERTEX_SUBROUTINE, "vss2", true, -1, GL_NO_ERROR }, -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] arb_program_interface_query: correct rendez-vous by name matching
Previuosly, this was overlooked asuming that, since they were SSOs, no inner interface matching check was needed. From the ARB_separate_shader_objects spec v.25: " With separable program objects, interfaces between shader stages may involve the outputs from one program object and the inputs from a second program object. For such interfaces, it is not possible to detect mismatches at link time, because the programs are linked separately. When each such program is linked, all inputs or outputs interfacing with another program stage are treated as active. The linker will generate an executable that assumes the presence of a compatible program on the other side of the interface. If a mismatch between programs occurs, no GL error will be generated, but some or all of the inputs on the interface will be undefined." Cc: Timothy Arceri Cc: Tapani Pälli Cc: Ilia Mirkin Cc: Martin Peres Signed-off-by: Andres Gomez --- .../spec/arb_program_interface_query/common.h | 61 --- .../getprogramresourceiv.c| 8 +-- .../resource-query.c | 48 +++ 3 files changed, 79 insertions(+), 38 deletions(-) diff --git a/tests/spec/arb_program_interface_query/common.h b/tests/spec/arb_program_interface_query/common.h index 371b0338b..c0a99ea64 100755 --- a/tests/spec/arb_program_interface_query/common.h +++ b/tests/spec/arb_program_interface_query/common.h @@ -74,9 +74,11 @@ static const char vs_std[] = "uniform vs_struct sa[2];\n" "in vec4 vs_input0;\n" "in vec4 vs_input1;\n" + "out vec4 vs_output1;\n" "void main() {\n" " gl_Position = vs_input0 * vs_test * vs_input1 + sa[0].a[1] +" " sa[1].a[1];\n" + " vs_output1 = vs_input0;\n" "}"; const char gs_std[] = @@ -86,18 +88,38 @@ const char gs_std[] = "uniform gs_uniform_block {\n" " vec4 gs_test;\n" "};\n" - "in vec4 gs_input[3];\n" - "out vec4 gs_output0;\n" + "in vec4 vs_output1[3];\n" + "out vec4 fs_input1;\n" "void main() {\n" " for (int i = 0; i < 6; i++) {\n" - " gl_Position = gs_input[i % 3] *" + " gl_Position = vs_output1[i % 3] *" " gl_in[i % 3].gl_Position * gs_test;\n" - " gs_output0 = gs_input[0];\n" + " fs_input1 = vs_output1[0];\n" " EmitVertex();\n" " }\n" "}\n"; static const char fs_std[] = + "#version 150\n" + "uniform fs_uniform_block {" + " vec4 fs_color;\n" + " float fs_array[4];\n" + "};\n" + "uniform fs_array_uniform_block {\n" + " vec4 fs_color;\n" + " float fs_array[4];\n" + "} faub[4];\n" + "in vec4 vs_output1;\n" + "out vec4 fs_output0;\n" + "out vec4 fs_output1;\n" + "void main() {\n" + "fs_output0 = fs_color * vs_output1 * fs_array[2] * \n" + " faub[0].fs_array[2] * faub[2].fs_array[2];\n" + "fs_output1 = fs_color * vs_output1 * fs_array[3] * \n" + " faub[1].fs_array[3] * faub[3].fs_array[3];\n" + "}"; + +static const char fs_in[] = "#version 150\n" "uniform fs_uniform_block {" " vec4 fs_color;\n" @@ -296,8 +318,8 @@ static const char tcs_sub[] = "uniform tcs_uniform_block {\n" " vec4 tcs_test;\n" "};\n" - "out vec4 tcs_output[3];\n" - "in vec4 tcs_input[gl_MaxPatchVertices];\n" + "out vec4 tes_input1[3];\n" + "in vec4 vs_output1[gl_MaxPatchVertices];\n" "patch out vec4 tcs_patch;\n" "subroutine vec4 tcs_offset();\n" "subroutine uniform tcs_offset TESS_CONTROL;\n" @@ -306,7 +328,7 @@ static const char tcs_sub[] = " gl_out[gl_InvocationID].gl_Position = tcs_test +" " gl_in[0].gl_Position *" " TESS_CONTROL();\n" - " tcs_output[gl_InvocationID] = tcs_input[0] + TESS_CONTROL();\n" + " tes_input1[gl_InvocationID] = vs_output1[0] + TESS_CONTROL();\n&
[Piglit] [PATCH 1/2] arb_program_interface_query: correct tests table indentation
Cc: Timothy Arceri Cc: Martin Peres Signed-off-by: Andres Gomez --- tests/spec/arb_program_interface_query/resource-query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/spec/arb_program_interface_query/resource-query.c b/tests/spec/arb_program_interface_query/resource-query.c index a0bc3b700..bf60dde93 100755 --- a/tests/spec/arb_program_interface_query/resource-query.c +++ b/tests/spec/arb_program_interface_query/resource-query.c @@ -391,12 +391,12 @@ static const struct subtest_t subtests[] = { ST( 1, 4, -1, -1, vs_sub,NULL,NULL, gs_sub,NULL, NULL, GL_GEOMETRY_SUBROUTINE, "", st_r_gs_sub), ST( 1, 4, -1, -1, vs_sub,NULL,NULL, gs_sub, fs_sub, NULL, GL_FRAGMENT_SUBROUTINE, "", st_r_fs_sub), ST( 1, 4, -1, -1,NULL,NULL,NULL,NULL,NULL, cs_sub, GL_COMPUTE_SUBROUTINE, "", st_r_cs_sub), - ST( 1, 5, -1, -1, vs_sub,tcs_sub, NULL,NULL,NULL, NULL, GL_TESS_CONTROL_SUBROUTINE, "", st_r_tcs_sub), + ST( 1, 5, -1, -1, vs_sub, tcs_sub,NULL,NULL,NULL, NULL, GL_TESS_CONTROL_SUBROUTINE, "", st_r_tcs_sub), ST( 1, 5, -1, -1, vs_sub,NULL, tes_sub,NULL,NULL, NULL, GL_TESS_EVALUATION_SUBROUTINE, "", st_r_tes_sub), ST( 1, 7, -1, 2, vs_sub,NULL,NULL,NULL,NULL, NULL, GL_VERTEX_SUBROUTINE_UNIFORM, "", st_r_vs_sub_uni), ST( 1, 9, -1, 1, vs_sub,NULL,NULL, gs_sub,NULL, NULL, GL_GEOMETRY_SUBROUTINE_UNIFORM, "", st_r_gs_sub_uni), ST( 1, 9, -1, 1, vs_sub,NULL,NULL, gs_sub, fs_sub, NULL, GL_FRAGMENT_SUBROUTINE_UNIFORM, "", st_r_fs_sub_uni), - ST( 1, 13, -1, 1, vs_sub,tcs_sub, NULL,NULL,NULL, NULL, GL_TESS_CONTROL_SUBROUTINE_UNIFORM, "", st_r_tcs_sub_uni), + ST( 1, 13, -1, 1, vs_sub, tcs_sub,NULL,NULL,NULL, NULL, GL_TESS_CONTROL_SUBROUTINE_UNIFORM, "", st_r_tcs_sub_uni), ST( 1, 16, -1, 1, vs_sub,NULL, tes_sub,NULL,NULL, NULL, GL_TESS_EVALUATION_SUBROUTINE_UNIFORM, "", st_r_tes_sub_uni), ST( 1, 8, -1, 1,NULL,NULL,NULL,NULL,NULL, cs_sub, GL_COMPUTE_SUBROUTINE_UNIFORM, "", st_r_cs_sub_uni), }; -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 0/2] arb_program_interface_query: series correcting existing tests
This addresses, basically, problems due to interface mismatching with separable program objects. Andres Gomez (2): arb_program_interface_query: correct tests table indentation arb_program_interface_query: correct rendez-vous by name matching .../spec/arb_program_interface_query/common.h | 61 --- .../getprogramresourceiv.c| 8 +-- .../resource-query.c | 52 3 files changed, 81 insertions(+), 40 deletions(-) -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_separate_shader_objects: add rendez-vous-by mismatch tests
New tests to check that, with separable program objects, interface matching by name or location are still checked at link time between the inner interfaces existing inside the program. From the ARB_separate_shader_objects spec v.25: " With separable program objects, interfaces between shader stages may involve the outputs from one program object and the inputs from a second program object. For such interfaces, it is not possible to detect mismatches at link time, because the programs are linked separately. When each such program is linked, all inputs or outputs interfacing with another program stage are treated as active. The linker will generate an executable that assumes the presence of a compatible program on the other side of the interface. If a mismatch between programs occurs, no GL error will be generated, but some or all of the inputs on the interface will be undefined." Cc: Timothy Arceri Cc: Iago Toral Quiroga Cc: Samuel Iglesias Gonsálvez Cc: Tapani Pälli Cc: Ian Romanick Cc: Ilia Mirkin Signed-off-by: Andres Gomez --- .../CMakeLists.gl.txt | 2 + .../rendezvous_by_location-invalid.c | 106 ++ .../rendezvous_by_name-invalid.c | 103 + 3 files changed, 211 insertions(+) create mode 100644 tests/spec/arb_separate_shader_objects/rendezvous_by_location-invalid.c create mode 100644 tests/spec/arb_separate_shader_objects/rendezvous_by_name-invalid.c diff --git a/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt b/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt index 1b61f3312..ce257ca2e 100644 --- a/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt +++ b/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt @@ -20,9 +20,11 @@ piglit_add_executable (arb_separate_shader_object-mixed_explicit_and_non_explici piglit_add_executable (arb_separate_shader_object-mix-and-match-tcs-tes mix-and-match-tcs-tes.c) piglit_add_executable (arb_separate_shader_object-ProgramUniform-coverage ProgramUniform-coverage.c) piglit_add_executable (arb_separate_shader_object-rendezvous_by_location rendezvous_by_location.c sso-common.c) +piglit_add_executable (arb_separate_shader_object-rendezvous_by_location-invalid rendezvous_by_location-invalid.c) piglit_add_executable (arb_separate_shader_object-rendezvous_by_location-3-stages rendezvous_by_location-3-stages.c) piglit_add_executable (arb_separate_shader_object-rendezvous_by_location-5-stages rendezvous_by_location-5-stages.c) piglit_add_executable (arb_separate_shader_object-rendezvous_by_name rendezvous_by_name.c sso-common.c) +piglit_add_executable (arb_separate_shader_object-rendezvous_by_name-invalid rendezvous_by_name-invalid.c) piglit_add_executable (arb_separate_shader_object-rendezvous_by_name_interpolation rendezvous_by_name_interpolation.c sso-common.c) piglit_add_executable (arb_separate_shader_object-uniform-namespace uniform-namespace.c sso-common.c) piglit_add_executable (arb_separate_shader_object-UseProgramStages-non-separable UseProgramStages-non-separable.c) diff --git a/tests/spec/arb_separate_shader_objects/rendezvous_by_location-invalid.c b/tests/spec/arb_separate_shader_objects/rendezvous_by_location-invalid.c new file mode 100644 index 0..7fd7af86d --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/rendezvous_by_location-invalid.c @@ -0,0 +1,106 @@ +/* + * Copyright © 2013, 2019 Intel Corporation + * Copyright © 2015 Advanced Micro Devices, Inc. + * + * 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. + */ + +/** + * This test uses separable program objects with 2 shaders (VS, GS) + * and tests that the same interface matching rules by location apply + * in between the VS -> GS interface as if it would not be separable. + */ + +#include "piglit-uti
[Piglit] [PATCH v2 10/10] arb_enhanced_layouts: add xfb_offset overlap test
From the GL_ARB_enhanced_layouts spec: " No aliasing in output buffers is allowed: It is a compile-time or link-time error to specify variables with overlapping transform feedback offsets." v2: added forgotten check_link. Cc: Timothy Arceri Signed-off-by: Andres Gomez --- .../xfb_offset/invalid-overlap.vert | 24 +++ 1 file changed, 24 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert new file mode 100644 index 0..5e8adc154 --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert @@ -0,0 +1,24 @@ +// [config] +// expect_result: fail +// glsl_version: 1.40 +// check_link: true +// require_extensions: GL_ARB_enhanced_layouts +// [end config] +// +// From the GL_ARB_enhanced_layouts spec: +// +// " No aliasing in output buffers is allowed: It is a compile-time +// or link-time error to specify variables with overlapping +// transform feedback offsets." + +#version 140 +#extension GL_ARB_enhanced_layouts: require + +layout(xfb_offset = 0) out vec4 a; +layout(xfb_offset = 0) out vec4 b; + +void main() +{ + a = vec4(1.0); + b = vec4(0.0); +} -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 09/10] arb_enhanced_layouts: add another xfb_stride overflow test
On Sat, 2019-02-02 at 10:15 +1100, Timothy Arceri wrote: > On 2/2/19 4:55 am, Andres Gomez wrote: > > Additional check to address a bug in mesa in which a stride which > > is a divisor of the declared offset for an overflowing varying > > won't fail. > > > > From the GL_ARB_enhanced_layouts spec: > > > >" It is a compile-time or link-time error to have any *xfb_offset* > > that overflows *xfb_stride*, whether stated on declarations before > > or after the *xfb_stride*, or in different compilation units." > > > > Cc: Timothy Arceri > > Signed-off-by: Andres Gomez > > --- > > .../xfb_stride/variable-stride-overflow2.vert | 28 +++ > > 1 file changed, 28 insertions(+) > > create mode 100644 > > tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert > > > > diff --git > > a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert > > > > b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert > > new file mode 100644 > > index 0..469c5e430 > > --- /dev/null > > +++ > > b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert > > @@ -0,0 +1,28 @@ > > +// [config] > > +// expect_result: fail > > +// glsl_version: 1.40 > > +// check_link: true > > +// require_extensions: GL_ARB_enhanced_layouts > > +// [end config] > > +// > > +// Additional check to address a bug in mesa in which a stride which > > +// is a divisor of the declared offset for an overflowing varying > > +// won't fail. > > +// > > +// From the GL_ARB_enhanced_layouts spec: > > +// > > +//"It is a compile-time or link-time error to have any *xfb_offset* > > +//that overflows *xfb_stride*, whether stated on declarations before or > > +//after the *xfb_stride*, or in different compilation units." > > + > > +#version 140 > > +#extension GL_ARB_enhanced_layouts: require > > + > > +layout(xfb_stride = 16) out vec4 var; > > +layout(xfb_offset = 16) out vec4 var2; > > This test looks wrong to me. This looks like it *should* compile. > > vec4 var uses bytes 0-15. So there is no issue with vec4 vec2 having an > offset of 16. Its been a long time since I worked on this but I think > this change is wrong. I see no reason this should fail compilation. I believe I've answered now this in: https://lists.freedesktop.org/archives/mesa-dev/2019-February/214457.html > > > + > > +void main() > > +{ > > + var = vec4(1.0); > > + var2 = vec4(0.0); > > +} > > -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 10/10] arb_enhanced_layouts: add xfb_offset overlap test
From the GL_ARB_enhanced_layouts spec: " No aliasing in output buffers is allowed: It is a compile-time or link-time error to specify variables with overlapping transform feedback offsets." Cc: Timothy Arceri Signed-off-by: Andres Gomez --- .../xfb_offset/invalid-overlap.vert | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert new file mode 100644 index 0..0c523378b --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert @@ -0,0 +1,23 @@ +// [config] +// expect_result: fail +// glsl_version: 1.40 +// require_extensions: GL_ARB_enhanced_layouts +// [end config] +// +// From the GL_ARB_enhanced_layouts spec: +// +// " No aliasing in output buffers is allowed: It is a compile-time +// or link-time error to specify variables with overlapping +// transform feedback offsets." + +#version 140 +#extension GL_ARB_enhanced_layouts: require + +layout(xfb_offset = 0) out vec4 a; +layout(xfb_offset = 0) out vec4 b; + +void main() +{ + a = vec4(1.0); + b = vec4(0.0); +} -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 09/10] arb_enhanced_layouts: add another xfb_stride overflow test
Additional check to address a bug in mesa in which a stride which is a divisor of the declared offset for an overflowing varying won't fail. From the GL_ARB_enhanced_layouts spec: " It is a compile-time or link-time error to have any *xfb_offset* that overflows *xfb_stride*, whether stated on declarations before or after the *xfb_stride*, or in different compilation units." Cc: Timothy Arceri Signed-off-by: Andres Gomez --- .../xfb_stride/variable-stride-overflow2.vert | 28 +++ 1 file changed, 28 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert new file mode 100644 index 0..469c5e430 --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert @@ -0,0 +1,28 @@ +// [config] +// expect_result: fail +// glsl_version: 1.40 +// check_link: true +// require_extensions: GL_ARB_enhanced_layouts +// [end config] +// +// Additional check to address a bug in mesa in which a stride which +// is a divisor of the declared offset for an overflowing varying +// won't fail. +// +// From the GL_ARB_enhanced_layouts spec: +// +//"It is a compile-time or link-time error to have any *xfb_offset* +//that overflows *xfb_stride*, whether stated on declarations before or +//after the *xfb_stride*, or in different compilation units." + +#version 140 +#extension GL_ARB_enhanced_layouts: require + +layout(xfb_stride = 16) out vec4 var; +layout(xfb_offset = 16) out vec4 var2; + +void main() +{ + var = vec4(1.0); + var2 = vec4(0.0); +} -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 04/10] arb_enhanced_layouts: add aliasing tests with mixed type widths
Added tests which check component aliasing between types that have different bit widths. From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.60 spec: "Further, when location aliasing, the aliases sharing the location must have the same underlying numerical type and bit width (floating-point or integer, 32-bit versus 64-bit, etc.) and the same auxiliary storage and interpolation qualification. The one exception where component aliasing is permitted is for two input variables (not block members) to a vertex shader, which are allowed to have component aliasing. This vertex-variable component aliasing is intended only to support vertex shaders where each execution path accesses at most one input per each aliased component. Implementations are permitted, but not required, to generate link-time errors if they detect that every path through the vertex shader executable accesses multiple inputs aliased to any single component." Cc: Timothy Arceri Cc: Iago Toral Quiroga Cc: Ilia Mirkin Signed-off-by: Andres Gomez --- .../type-mismatch-signed-double.vert | 59 +++ .../width-mismatch-float-double.vert | 59 +++ ...s-width-mismatch-double-float.shader_test} | 25 3 files changed, 131 insertions(+), 12 deletions(-) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/width-mismatch-float-double.vert rename tests/spec/arb_enhanced_layouts/linker/component-layout/{vs-to-fs-type-mismatch-double-float.shader_test => vs-to-fs-width-mismatch-double-float.shader_test} (56%) diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert new file mode 100644 index 0..01bfb0df1 --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert @@ -0,0 +1,59 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// check_link: true +// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_vertex_attrib_64bit +// [end config] +// +// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec: +// +// "Further, when location aliasing, the aliases sharing the location must +// have the same underlying numerical type (floating-point or integer) and +// the same auxiliary storage and interpolation qualification" +// +// ... +// +// "The one exception where component aliasing is permitted is for two input +// variables (not block members) to a vertex shader, which are allowed to +// have component aliasing. This vertex-variable component aliasing is +// intended only to support vertex shaders where each execution path +// accesses at most one input per each aliased component. Implementations +// are permitted, but not required, to generate link-time errors if they +// detect that every path through the vertex shader executable accesses +// multiple inputs aliased to any single component." +// +// Issue 16 from the ARB_enhanced_layouts spec: +// +// "We do allow this for vertex shader inputs, because we've supported +// "aliasing" behavior since OpenGL 2.0. This allows for an "uber-shader" +//with variables like: +// +// layout(location=3) in float var1; +// layout(location=3) in int var2; +// +// where sometimes it uses and sometimes . Since we don't +// treat the code above (with overlapping components) as an error, it +// would be strange to treat non-overlapping component assignments as an +// error." + +#version 150 +#extension GL_ARB_enhanced_layouts: require +#extension GL_ARB_explicit_attrib_location: require +#extension GL_ARB_gpu_shader_fp64: require +#extension GL_ARB_vertex_attrib_64bit: require + +uniform int i; + +// consume X/Y components +layout(location = 0) in ivec2 a; + +// consume Z/W components +layout(location = 0, component = 2) in double b; + +void main() +{ + if (i == 1) +gl_Position = vec4(a, 1.0, 1.0); + else +gl_Position = vec4(b); +} diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/width-mismatch-float-double.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/width-mismatch-float-double.vert new file mode 100644 index 0..74926c1ea --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/width-mismatch-float-double.vert @@ -0,0 +1,59 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// check_link: true +// require_extensions: GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_vertex_attrib_64bit +// [end config] +// +// Fro
[Piglit] [PATCH 07/10] arb_enhanced_layouts: add component aliasing tests
New tests for component aliasing with duplicated inputs which match the same output variable in the previous stage. From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.60 spec: " Location aliasing is causing two variables or block members to have the same location number. Component aliasing is assigning the same (or overlapping) component numbers for two location aliases. (Recall if component is not used, components are assigned starting with 0.) With one exception, location aliasing is allowed only if it does not cause component aliasing; it is a compile-time or link-time error to cause component aliasing." From Section 7.4.1 (Shader Interface Matching) of the OpenGL 4.60 spec: " * An output variable is considered to match an input variable in the subsequent shader if: – the two variables match in name, type, and qualification, and neither has a location qualifier, or – the two variables are declared with the same location and component layout qualifiers and match in type and qualification." Cc: Timothy Arceri Cc: Iago Toral Quiroga Cc: Ilia Mirkin Signed-off-by: Andres Gomez --- ...uplicated-input-overlap-double.shader_test | 62 +++ ...to-fs-duplicated-input-overlap.shader_test | 59 ++ 2 files changed, 121 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap-double.shader_test create mode 100644 tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap.shader_test diff --git a/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap-double.shader_test b/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap-double.shader_test new file mode 100644 index 0..1c9117b9b --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap-double.shader_test @@ -0,0 +1,62 @@ +// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.60 spec: +// +// " Location aliasing is causing two variables or block members to +// have the same location number. Component aliasing is assigning +// the same (or overlapping) component numbers for two location +// aliases. (Recall if component is not used, components are +// assigned starting with 0.) With one exception, location +// aliasing is allowed only if it does not cause component +// aliasing; it is a compile-time or link-time error to cause +// component aliasing." +// +// From Section 7.4.1 (Shader Interface Matching) of the OpenGL 4.60 spec: +// +// " * An output variable is considered to match an input variable +// in the subsequent shader if: +// +// – the two variables match in name, type, and qualification, +// and neither has a location qualifier, or +// +// – the two variables are declared with the same location and +// component layout qualifiers and match in type and +// qualification." + +[require] +GLSL >= 1.50 +GL_ARB_enhanced_layouts +GL_ARB_gpu_shader_fp64 +GL_ARB_separate_shader_objects + +[vertex shader] +#version 150 +#extension GL_ARB_enhanced_layouts: require +#extension GL_ARB_gpu_shader_fp64: require +#extension GL_ARB_separate_shader_objects: require + +// consumes Z/W components +layout(location = 0, component = 2) flat out double a; + +void main() +{ + a = 1.0; +} + +[fragment shader] +#version 150 +#extension GL_ARB_enhanced_layouts: require +#extension GL_ARB_gpu_shader_fp64: require +#extension GL_ARB_separate_shader_objects: require + +out vec4 color; + +// consumes Z/W components +layout(location = 0, component = 2) flat in double b; +layout(location = 0, component = 2) flat in double c; + +void main() +{ + color = vec4(c, b, 0.0, 1.0); +} + +[test] +link error diff --git a/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap.shader_test b/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap.shader_test new file mode 100644 index 0..3dea88a51 --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap.shader_test @@ -0,0 +1,59 @@ +// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.60 spec: +// +// " Location aliasing is causing two variables or block members to +// have the same location number. Component aliasing is assigning +// the same (or overlapping) component numbers for two location +// aliases. (Recall if component is not used, components are +// assigned starting with 0.) With one exception, location +// aliasing is allowed only if it does not cause component +// aliasing; it is a compile-time or link-time error to cause +// component aliasing."
[Piglit] [PATCH 08/10] arb_separate_shader_objects: add unused location qualified input test
New tests to check that an unused input varying, which would be matched based on its explicit location, won't cause a link failure if there is no matching output variable. From the ARB_separate_shader_objects spec v.25: " * An output variable is considered to match an input variable in the subequent shader if: * the two variables match in name, type, and qualification; or * the two variables are declared with the same location layout qualifier and match in type and qualification." ... " For program objects containing multiple shaders, LinkProgram will check for mismatches on interfaces between shader stages in the program being linked and generate a link error if a mismatch is detected. A link error will be generated if any statically referenced input variable or block does not have a matching output." Cc: Timothy Arceri Cc: Iago Toral Quiroga Cc: Samuel Iglesias Gonsálvez Cc: Tapani Pälli Cc: Ian Romanick Signed-off-by: Andres Gomez --- ...explicit-location-unused-input.shader_test | 38 +++ 1 file changed, 38 insertions(+) create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-unused-input.shader_test diff --git a/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-unused-input.shader_test b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-unused-input.shader_test new file mode 100644 index 0..c39fd4033 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-unused-input.shader_test @@ -0,0 +1,38 @@ +// From the ARB_separate_shader_objects spec v.25: +// +// " * An output variable is considered to match an input variable +// in the subequent shader if: +// +// * the two variables match in name, type, and qualification; +// or +// +// * the two variables are declared with the same location +// layout qualifier and match in type and qualification." +// +// ... +// +// " For program objects containing multiple shaders, LinkProgram +// will check for mismatches on interfaces between shader stages +// in the program being linked and generate a link error if a +// mismatch is detected. A link error will be generated if any +// statically referenced input variable or block does not have a +// matching output." + +[require] +GLSL >= 1.40 +GL_ARB_separate_shader_objects + +[vertex shader passthrough] + +[fragment shader] +#version 140 +#extension GL_ARB_separate_shader_objects : require + +layout(location = 0) in vec4 in1; + +void main() +{ +} + +[test] +link success -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 06/10] arb_separate_shader_objects: add location overlapping tests
New tests for location overlap with scalars, doubles and for duplicated inputs which match the same output variable in the previous stage. From the ARB_separate_shader_objects spec v.25: " * An output variable is considered to match an input variable in the subequent shader if: * the two variables match in name, type, and qualification; or * the two variables are declared with the same location layout qualifier and match in type and qualification." ... " A program will fail to link if any two non-vertex shader input variables are assigned to the same location." Cc: Timothy Arceri Cc: Iago Toral Quiroga Cc: Ilia Mirkin Signed-off-by: Andres Gomez --- ...uplicated-input-overlap-double.shader_test | 58 +++ ...ation-duplicated-input-overlap.shader_test | 55 ++ ...plicit-location-overlap-double.shader_test | 49 ...o-fs-explicit-location-overlap.shader_test | 49 4 files changed, 211 insertions(+) create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap-double.shader_test create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap.shader_test create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-overlap-double.shader_test create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-overlap.shader_test diff --git a/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap-double.shader_test b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap-double.shader_test new file mode 100644 index 0..f0a966e6a --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap-double.shader_test @@ -0,0 +1,58 @@ +// From the ARB_separate_shader_objects spec v.25: +// +// " * An output variable is considered to match an input variable +// in the subequent shader if: +// +// * the two variables match in name, type, and qualification; +// or +// +// * the two variables are declared with the same location +// layout qualifier and match in type and qualification." +// +// ... +// +// " A program will fail to link if any two non-vertex shader input +// variables are assigned to the same location." + +[require] +GLSL >= 1.50 +GL_ARB_separate_shader_objects +GL_ARB_gpu_shader_fp64 + +[vertex shader] +#version 150 +#extension GL_ARB_separate_shader_objects : require +#extension GL_ARB_gpu_shader_fp64 : require + +in vec4 piglit_vertex; + +layout(location = 0) flat out dvec4 out1; + +void main() +{ + gl_Position = piglit_vertex; + out1 = dvec4(1.0, 0.0, 0.0, 1.0); +} + +[fragment shader] +#version 150 +#extension GL_ARB_separate_shader_objects : require +#extension GL_ARB_gpu_shader_fp64 : require + +uniform int i; + +layout(location = 0) flat in dvec4 in1; +layout(location = 0) flat in dvec4 in2; + +out vec4 color; + +void main() +{ + if (i == 0) + color = vec4(in1); + else + color = vec4(in2); +} + +[test] +link error diff --git a/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap.shader_test b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap.shader_test new file mode 100644 index 0..d7e5769b3 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap.shader_test @@ -0,0 +1,55 @@ +// From the ARB_separate_shader_objects spec v.25: +// +// " * An output variable is considered to match an input variable +// in the subequent shader if: +// +// * the two variables match in name, type, and qualification; +// or +// +// * the two variables are declared with the same location +// layout qualifier and match in type and qualification." +// +// ... +// +// " A program will fail to link if any two non-vertex shader input +// variables are assigned to the same location." + +[require] +GLSL >= 1.40 +GL_ARB_separate_shader_objects + +[vertex shader] +#version 140 +#extension GL_ARB_separate_shader_objects : require + +in vec4 piglit_vertex; + +layout(location = 0) out vec4 out1; + +void main() +{ + gl_Position = piglit_vertex; + out1 = vec4(1.0, 0.0, 0.0, 1.0); +} + +[fragment shader] +#version 140 +#extension GL_ARB_separate_shader_objects : require + +uniform int i; + +layout(location = 0) in vec4 in1; +layout(location = 0) in vec4 in2; + +out vec4 color; + +void main() +{ + if (i == 0) + color = in1; + else + color = in2; +} + +[test] +link
[Piglit] [PATCH 02/10] arb_enhanced_layouts: GL_ARB_gpu_shader_fp64 requires GLSL 1.50
Cc: Timothy Arceri Signed-off-by: Andres Gomez --- .../compiler/component-layout/double-component-1.vert | 4 ++-- .../compiler/component-layout/double-component-3.vert | 4 ++-- .../compiler/component-layout/dvec2.vert | 4 ++-- .../compiler/component-layout/dvec3.vert | 4 ++-- .../compiler/component-layout/dvec4.vert | 4 ++-- .../compiler/component-layout/overflow-double.vert| 4 ++-- .../compiler/component-layout/overflow-dvec2.vert | 4 ++-- .../component-layout/vs-fs-array-dvec3.shader_test| 6 +++--- .../execution/component-layout/vs-fs-doubles.shader_test | 6 +++--- .../component-layout/vs-to-fs-double-overlap.shader_test | 6 +++--- .../vs-to-fs-type-mismatch-double-float.shader_test | 8 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-1.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-1.vert index c8da16566..f0fb1616b 100644 --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-1.vert +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-1.vert @@ -1,6 +1,6 @@ // [config] // expect_result: fail -// glsl_version: 1.40 +// glsl_version: 1.50 // require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64 GL_ARB_separate_shader_objects // [end config] // @@ -9,7 +9,7 @@ // "It is a compile-time error to use component 1 or 3 as the beginning of a // double or dvec2." -#version 140 +#version 150 #extension GL_ARB_enhanced_layouts: require #extension GL_ARB_gpu_shader_fp64: require #extension GL_ARB_separate_shader_objects: require diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-3.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-3.vert index d054cd2a5..3c0a197fc 100644 --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-3.vert +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/double-component-3.vert @@ -1,6 +1,6 @@ // [config] // expect_result: fail -// glsl_version: 1.40 +// glsl_version: 1.50 // require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64 GL_ARB_separate_shader_objects // [end config] // @@ -9,7 +9,7 @@ // "It is a compile-time error to use component 1 or 3 as the beginning of a // double or dvec2." -#version 140 +#version 150 #extension GL_ARB_enhanced_layouts: require #extension GL_ARB_gpu_shader_fp64: require #extension GL_ARB_separate_shader_objects: require diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec2.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec2.vert index 090aac090..9cf96ea0d 100644 --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec2.vert +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec2.vert @@ -1,6 +1,6 @@ // [config] // expect_result: pass -// glsl_version: 1.40 +// glsl_version: 1.50 // require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64 GL_ARB_separate_shader_objects // [end config] // @@ -10,7 +10,7 @@ // consume all four components available within a location. A dvec3 or dvec4 // can only be declared without specifying a component." -#version 140 +#version 150 #extension GL_ARB_enhanced_layouts: require #extension GL_ARB_gpu_shader_fp64: require #extension GL_ARB_separate_shader_objects: require diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert index 192765809..84eaf3ef7 100644 --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert @@ -1,6 +1,6 @@ // [config] // expect_result: fail -// glsl_version: 1.40 +// glsl_version: 1.50 // require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64 GL_ARB_separate_shader_objects // [end config] // @@ -8,7 +8,7 @@ // // "A dvec3 or dvec4 can only be declared without specifying a component." -#version 140 +#version 150 #extension GL_ARB_enhanced_layouts: require #extension GL_ARB_gpu_shader_fp64: require #extension GL_ARB_separate_shader_objects: require diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert index 35584170f..3c6216310 100644 --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert @@ -1,6 +1,6 @@ // [config] // expect_result: fail -// glsl_version: 1.40 +// glsl_version: 1.50 // require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64 GL_ARB_separate_shader_object
[Piglit] [PATCH 05/10] arb_enhanced_layouts: correct component usage with dvec{3, 4} tests
There was a pre-existing test using "component = 0" with dvec3 which was not failing as it should. This was because the other tests checking for the usage of the component keyword with dvec3 and dvec4 were failing due to a different restriction: the component sequence was overflowing 3 and/or a double based type was using component 1 o 3. Now we fix them by using "component = 0" when need to fail and removing the keyword when need to succeed. From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec: " It is a compile-time error if this sequence of components gets larger than 3. A scalar double will consume two of these components, and a dvec2 will consume all four components available within a location. A dvec3 or dvec4 can only be declared without specifying a component." ... " It is a compile-time error to use component 1 or 3 as the beginning of a double or dvec2." Cc: Timothy Arceri Cc: Kenneth Graunke Signed-off-by: Andres Gomez --- .../arb_enhanced_layouts/compiler/component-layout/dvec3.vert | 2 +- .../arb_enhanced_layouts/compiler/component-layout/dvec4.vert | 2 +- .../execution/component-layout/vs-fs-array-dvec3.shader_test | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert index 84eaf3ef7..fcb2a5284 100644 --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert @@ -13,7 +13,7 @@ #extension GL_ARB_gpu_shader_fp64: require #extension GL_ARB_separate_shader_objects: require -layout(location = 0, component = 1) out dvec3 b; +layout(location = 0, component = 0) out dvec3 b; void main() { diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert index 3c6216310..78696f18d 100644 --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert @@ -13,7 +13,7 @@ #extension GL_ARB_gpu_shader_fp64: require #extension GL_ARB_separate_shader_objects: require -layout(location = 0, component = 1) out dvec4 b; +layout(location = 0, component = 0) out dvec4 b; void main() { diff --git a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.shader_test b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.shader_test index de348cbb3..ebd18ad5d 100644 --- a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.shader_test +++ b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.shader_test @@ -13,7 +13,7 @@ GL_ARB_gpu_shader_fp64 #extension GL_ARB_gpu_shader_fp64: require // XYZW components of 0 & 2, XY components of 1 & 3 -layout(location = 0, component = 0) flat out dvec3 a[2]; +layout(location = 0) flat out dvec3 a[2]; // ZW component of 1 layout(location = 1, component = 2) flat out double b; @@ -38,7 +38,7 @@ void main() out vec4 color; // XYZW components of 0 & 2, XY components of 1 & 3 -layout(location = 0, component = 0) flat in dvec3 a[2]; +layout(location = 0) flat in dvec3 a[2]; // ZW component of 1 layout(location = 1, component = 2) flat in double b; -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 01/10] arb_enhanced_layouts: corrected multiple comments
Cc: Timothy Arceri Signed-off-by: Andres Gomez --- .../vs-gs-fs-double.shader_test | 16 +++ .../vs-tcs-tes-fs-double.shader_test | 42 +-- ...-fs-type-mismatch-double-float.shader_test | 4 +- ...-fs-type-mismatch-signed-float.shader_test | 4 +- ...-type-mismatch-signed-unsigned.shader_test | 4 +- ...s-type-mismatch-unsigned-float.shader_test | 4 +- 6 files changed, 46 insertions(+), 28 deletions(-) diff --git a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-gs-fs-double.shader_test b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-gs-fs-double.shader_test index bf5d6e8e6..1f753792a 100644 --- a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-gs-fs-double.shader_test +++ b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-gs-fs-double.shader_test @@ -12,10 +12,10 @@ GL_ARB_gpu_shader_fp64 #extension GL_ARB_separate_shader_objects: require #extension GL_ARB_gpu_shader_fp64: require -// consume X/Y/Z components +// consume X/Y components in location 1 layout(location = 0) flat out dvec3 a; -// consumes W component +// consume Z/W components layout(location = 1, component = 2) flat out double b; out vec4 vertex_to_gs; @@ -39,18 +39,18 @@ void main() layout(triangles) in; layout(triangle_strip, max_vertices = 3) out; -// consume X/Y/Z components +// consume X/Y components in location 1 layout(location = 0) flat in dvec3 a[3]; -// consumes W component +// consume Z/W components layout(location = 1, component = 2) flat in double b[3]; in vec4 vertex_to_gs[3]; -// consume X/Y/Z components +// consume X/Y components in location 1 layout(location = 0) flat out dvec3 a_to_fs; -// consumes W component +// consume Z/W components layout(location = 1, component = 2) flat out double b_to_fs; void main() @@ -71,10 +71,10 @@ void main() out vec4 color; -// consume X/Y/Z components +// consume X/Y components in location 1 layout(location = 0) flat in dvec3 a_to_fs; -// consumes W component +// consume Z/W components layout(location = 1, component = 2) flat in double b_to_fs; void main() diff --git a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-tcs-tes-fs-double.shader_test b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-tcs-tes-fs-double.shader_test index 938d2703d..196729aab 100644 --- a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-tcs-tes-fs-double.shader_test +++ b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-tcs-tes-fs-double.shader_test @@ -15,13 +15,16 @@ GL_ARB_gpu_shader_fp64 in vec4 vertex; -// consume Y/Z/W components +// consume also X/Y components in location 1 layout(location = 0) flat out dvec3 a; -// consumes X component +// consume Z/W components layout(location = 1, component = 2) flat out double b; +// consume X/Y components layout(location = 2, component = 0) flat out double c; + +// consume Z/W components layout(location = 2, component = 2) flat out double d; void main() @@ -44,22 +47,28 @@ void main() layout(vertices = 3) out; -// consume Y/Z/W components +// consume also X/Y components in location 1 layout(location = 0) flat in dvec3 a[]; -// consumes X component +// consume Z/W components layout(location = 1, component = 2) flat in double b[]; +// consume X/Y components layout(location = 2, component = 0) flat in double c[]; + +// consume Z/W components layout(location = 2, component = 2) flat in double d[]; -// consume Y/Z/W components +// consume also X/Y components in location 1 layout(location = 0) flat out dvec3 a_tcs[]; -// consumes X component +// consume Z/W components layout(location = 1, component = 2) flat out double b_tcs[]; +// consume X/Y components layout(location = 2, component = 0) flat out double c_tcs[]; + +// consume Z/W components layout(location = 2, component = 2) flat out double d_tcs[]; void main() { @@ -82,22 +91,28 @@ void main() { layout(triangles) in; -// consume Y/Z/W components +// consume also X/Y components in location 1 layout(location = 0) flat in dvec3 a_tcs[]; -// consumes X component +// consume Z/W components layout(location = 1, component = 2) flat in double b_tcs[]; +// consume X/Y components layout(location = 2, component = 0) flat in double c_tcs[]; + +// consume Z/W components layout(location = 2, component = 2) flat in double d_tcs[]; -// consume Y/Z/W components +// consume also X/Y components in location 1 layout(location = 0) flat out dvec3 a_tes; -// consumes X component +// consume Z/W components layout(location = 1, component = 2) flat out double b_tes; +// consume X/Y components layout(location = 2, component = 0) flat out double c_tes; + +// consume Z/W components layout(location = 2, component = 2) flat out double d_tes; void main() { @@ -119,13 +134,16 @@ void main() { out vec4 color; -// consume Y/Z/W components +// consume also X/Y components
[Piglit] [PATCH 00/10] arb_enhanced_layouts: additional tests
This series adds several arb_enhanced_layouts tests and some arb_separate_shader_objects more addressing problems found in mesa and not checked in piglit. They are mostly related to the use of the location, component, xfb_offset and xfb_stride layout qualifiers. Andres Gomez (10): arb_enhanced_layouts: corrected multiple comments arb_enhanced_layouts: GL_ARB_gpu_shader_fp64 requires GLSL 1.50 arb_enhanced_layouts: correct interpolation qualifiers arb_enhanced_layouts: add aliasing tests with mixed type widths arb_enhanced_layouts: correct component usage with dvec{3,4} tests arb_separate_shader_objects: add location overlapping tests arb_enhanced_layouts: add component aliasing tests arb_separate_shader_objects: add unused location qualified input test arb_enhanced_layouts: add another xfb_stride overflow test arb_enhanced_layouts: add xfb_offset overlap test .../component-layout/double-component-1.vert | 4 +- .../component-layout/double-component-3.vert | 4 +- .../compiler/component-layout/dvec2.vert | 4 +- .../compiler/component-layout/dvec3.vert | 6 +- .../compiler/component-layout/dvec4.vert | 6 +- .../component-layout/overflow-double.vert | 4 +- .../component-layout/overflow-dvec2.vert | 4 +- .../type-mismatch-signed-double.vert | 59 ++ .../width-mismatch-float-double.vert | 59 ++ .../xfb_offset/invalid-overlap.vert | 23 +++ .../xfb_stride/variable-stride-overflow2.vert | 28 + .../vs-fs-array-dvec3.shader_test | 10 +-- .../vs-fs-doubles.shader_test | 6 +- .../vs-gs-fs-double.shader_test | 16 ++--- .../vs-tcs-tes-fs-double.shader_test | 42 + .../vs-to-fs-double-overlap.shader_test | 6 +- ...uplicated-input-overlap-double.shader_test | 62 +++ ...to-fs-duplicated-input-overlap.shader_test | 59 ++ ...t => vs-to-fs-signed-unsigned.shader_test} | 10 +-- ...-fs-type-mismatch-double-float.shader_test | 59 -- ...-fs-type-mismatch-signed-float.shader_test | 4 +- ...s-type-mismatch-unsigned-float.shader_test | 8 +-- ...fs-width-mismatch-double-float.shader_test | 60 ++ ...uplicated-input-overlap-double.shader_test | 58 + ...ation-duplicated-input-overlap.shader_test | 55 ...plicit-location-overlap-double.shader_test | 49 +++ ...o-fs-explicit-location-overlap.shader_test | 49 +++ ...explicit-location-unused-input.shader_test | 38 28 files changed, 675 insertions(+), 117 deletions(-) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/type-mismatch-signed-double.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/component-layout/width-mismatch-float-double.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-overlap.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow2.vert create mode 100644 tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap-double.shader_test create mode 100644 tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-duplicated-input-overlap.shader_test rename tests/spec/arb_enhanced_layouts/linker/component-layout/{vs-to-fs-type-mismatch-signed-unsigned.shader_test => vs-to-fs-signed-unsigned.shader_test} (88%) delete mode 100644 tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-type-mismatch-double-float.shader_test create mode 100644 tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-width-mismatch-double-float.shader_test create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap-double.shader_test create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-duplicated-input-overlap.shader_test create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-overlap-double.shader_test create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-overlap.shader_test create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-unused-input.shader_test -- 2.20.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] travis: reflect new best-practice travis-ci configuration
This is: Reviewed-by: Andres Gomez On Sun, 2018-12-02 at 11:28 -0500, Rhys Kidd wrote: > Travis-CI has or will shortly make in early December 2018 a number of > beneficial > changes to their Linux continuous integration testing infrastructure [0][1]. > An accompanying benefit of this change is that Ubuntu Xenial (16.04 LTS) is > now > supported. > > The benefits for piglit are primarily: > * Testing against a more modern, supported Ubuntu Xenial (16.04 LTS). [2] > * Removal of a corner-case for Python 3.7, makes testing more consistent. > * Modest speed improvements from Travis-CI move to Linux infrastructure > combined > into one (virtualized), from two previously (virtualized and > container-based). > > [0] https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures > [1] > https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration > [2] https://docs.travis-ci.com/user/reference/xenial/ > > Signed-off-by: Rhys Kidd > --- > .travis.yml | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/.travis.yml b/.travis.yml > index 45b23f009..3043cd4ca 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -1,6 +1,10 @@ > -sudo: false > -os: linux > language: python > + > +os: linux > + > +# Use Ubuntu Xenial (16.04 LTS) environment. > +dist: xenial > + > cache: >- ccache >- pip > @@ -23,7 +27,6 @@ matrix: >env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}" > - python: 3.7 >env: TOX_ENV="py37-{generator,noaccel,accel-nix,streams}" > - dist: xenial# required for Python 3.7 (travis-ci/travis-ci#9069) > - env: BUILD=cmake > > install: -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] tests: Added a new GTF-GLES test profile for the Khronos CTS runner
Cc: Mark Janes Cc: Dylan Baker Cc: Juan A. Suarez Romero Signed-off-by: Andres Gomez --- tests/gtf_gles.py | 82 +++ 1 file changed, 82 insertions(+) create mode 100644 tests/gtf_gles.py diff --git a/tests/gtf_gles.py b/tests/gtf_gles.py new file mode 100644 index 0..0e0495d08 --- /dev/null +++ b/tests/gtf_gles.py @@ -0,0 +1,82 @@ +# Copyright (c) 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 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. + +"""Piglit integration for KC CTS' GTF tests + +By default this will run GLES2, GLES3 and GLES31 test cases. Those +desiring to run only a subset of them should consider using the -t or +-x options to include or exclude tests. + +For example: +./piglit run gtf_gles -c foo -t ES3- would run only ES3 tests (note +the dash to exclude ES31 tests) + +This integration requires some configuration in piglit.conf, or the +use of environment variables. + +In piglit.conf one should set the following: +[gtf_gles]:bin -- Path to the glcts binary +[gtf_gles]:extra_args -- any extra arguments to be passed to cts +(optional) + +Alternatively (or in addition, since environment variables have +precedence), one could set: +PIGLIT_GTF_GLES_BIN -- environment equivalent of [gtf_gles]:bin +PIGLIT_GTF_GLES_EXTRA_ARGS -- environment equivalent of +[gtf_gles]:extra_args + +""" + +from __future__ import ( +absolute_import, division, print_function, unicode_literals +) +import itertools + +from framework.test import deqp + +__all__ = ['profile'] + +_GTF_BIN = deqp.get_option('PIGLIT_GTF_GLES_BIN', ('gtf_gles', 'bin'), + required=True) + +_EXTRA_ARGS = deqp.get_option('PIGLIT_GTF_GLES_EXTRA_ARGS', ('gtf_gles', 'extra_args'), + default='').split() + + +class DEQPGTFTest(deqp.DEQPBaseTest): +deqp_bin = _GTF_BIN + +@property +def extra_args(self): +return super(DEQPGTFTest, self).extra_args + \ +[x for x in _EXTRA_ARGS if not x.startswith('--deqp-case')] + + +# Add all of the suites by default, users can use filters to remove them. +profile = deqp.make_profile( # pylint: disable=invalid-name +itertools.chain( +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES2-cases.txt', _EXTRA_ARGS)), +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES3-cases.txt', _EXTRA_ARGS)), +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_GTF_BIN, 'GTF-GLES31-cases.txt', _EXTRA_ARGS)), +), +DEQPGTFTest) -- 2.18.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] tox: Remove testing of end-of-life Python 3.3
On Sun, 2018-07-29 at 13:10 +0100, Daniel Stone wrote: > Hi, > > On Mon, 23 Jul 2018 at 18:20, Eric Engestrom wrote: > > On Friday, 2018-07-20 09:41:12 +0300, Andres Gomez wrote: > > > On Mon, 2018-06-11 at 12:15 +0100, Eric Engestrom wrote: > > > > On Monday, 2018-06-11 06:39:46 -0400, Rhys Kidd wrote: > > > > > On 11 June 2018 at 05:40, Eric Engestrom > > > > > wrote: > > > > > > Is there another canonical travis instance of piglit, and I should > > > > > > remove the one I just set up? > > > > > > > > > > That's as canonical as any other; I believe the Travis CI > > > > > functionality > > > > > was added originally for individual developers to have the option of > > > > > testing > > > > > their own patches. Having it run against the mesa3d GitHub read only > > > > > mirror is good though. > > > > > > That's right. In Igalia we also have our own GitHub forks and Travis CI > > > testing [0][1]. > > > > > > I was just wondering if it would be worth that Juan and I join the > > > mesa3d organization in GitHub ... maybe we can make use of the Travis > > > CI there too but suppose we will still be using our own setting, > > > mostly. > > > > You'll have to ask DanielS for that :) > > I'm more than happy to grant access if you give me your GitHub usernames. Great! Me: tanty Juan: jasuarez Thanks! -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] travis: drop python 3.3
On Thu, 2018-07-19 at 22:16 -0400, Rhys Kidd wrote: > On Thu, 19 Jul 2018 at 18:59, Andres Gomez wrote: > > It's quite old and not even supported by wheel any more. > > > > Cc: Juan A. Suarez Romero > > Cc: Dylan Baker > > Signed-off-by: Andres Gomez > > Hello Andres, > > There's a couple of related python3.3 segments that you'd want to remove > concurrently. > > I had a patch which did this here: > https://patchwork.freedesktop.org/patch/228604/ > > Actually, that one was RB'ed, so will push it shortly. Ouch! Sorry for not having realized about your patch! I'll Rb yours ... You can consider this dropped. -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] travis: drop python 3.3
It's quite old and not even supported by wheel any more. Cc: Juan A. Suarez Romero Cc: Dylan Baker Signed-off-by: Andres Gomez --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b4cbcca49..b6e8136e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,6 @@ matrix: include: - python: 2.7 env: TOX_ENV="py27-{generator,noaccel,accel-nix,streams}" -- python: 3.3 - env: TOX_ENV="py33-{generator,noaccel,accel-nix,streams}" - python: 3.4 env: TOX_ENV="py34-{generator,noaccel,accel-nix,streams}" - python: 3.5 -- 2.18.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] framework: deepcopy TestProfile's filters when copying it
This avoids modifications in the original filters object. Detected through Travis CI. Fixed also a couple of typos. Fixes: 1f0f2ad25 ("framework: Add filters class") Cc: Dylan Baker Cc: Michel Dänzer Signed-off-by: Andres Gomez --- framework/profile.py| 5 - unittests/framework/summary/test_feature.py | 2 +- unittests/framework/utils.py| 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/framework/profile.py b/framework/profile.py index a6cac2cf0..8d6fd0706 100644 --- a/framework/profile.py +++ b/framework/profile.py @@ -501,11 +501,14 @@ class TestProfile(object): This method creates a copy with references to the original instance using copy.copy. This allows profiles to be "subclassed" by other profiles, without modifying the original. + +copy.deepcopy is used for the filters so the original is +actually not modified in this case. """ new = copy.copy(self) new.test_list = copy.copy(self.test_list) new.forced_test_list = copy.copy(self.forced_test_list) -new.filters = copy.copy(self.filters) +new.filters = copy.deepcopy(self.filters) return new def itertests(self): diff --git a/unittests/framework/summary/test_feature.py b/unittests/framework/summary/test_feature.py index fc05941b6..905484991 100644 --- a/unittests/framework/summary/test_feature.py +++ b/unittests/framework/summary/test_feature.py @@ -77,7 +77,7 @@ PROFILE.test_list['spec@gl-2.0@d'] = _maketest('fail') class TestFeatResult(object): -"""Tests fro the FeatResult class.""" +"""Tests for the FeatResult class.""" @pytest.fixture(scope='session') def feature(self, tmpdir_factory): diff --git a/unittests/framework/utils.py b/unittests/framework/utils.py index bb3a19146..15117f97d 100644 --- a/unittests/framework/utils.py +++ b/unittests/framework/utils.py @@ -32,7 +32,7 @@ from framework.test.base import Test as _Test class Test(_Test): -"""A Test dericed class with a stub interpret_result. +"""A Test derived class with a stub interpret_result. This class provides a way to test the Test class. """ -- 2.18.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] tox: remove pytest-warnings and set pytest-timeout to 1.2.1
pytest-warnings is not needed since it was integrated into pytest's core since 3.1 pytest-timeout >= 1.3.0 requires pytest >= 3.6.0 and we want to keep using 3.2.5 Cc: Juan A. Suarez Romero Cc: Dylan Baker Signed-off-by: Andres Gomez --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 12e8abd9f..179405356 100644 --- a/tox.ini +++ b/tox.ini @@ -24,8 +24,7 @@ deps = pytest-mock pytest-pythonpath pytest-raises -pytest-warnings -pytest-timeout +pytest-timeout==1.2.1 py{27,33,34}: mako==0.8.0 six==1.5.2 {accel,noaccel,streams}: jsonschema -- 2.18.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] unittests: mustpass is a text list
This is: Reviewed-by: Andres Gomez <ago...@igalia.com> On Thu, 2018-04-19 at 09:44 +0200, Juan A. Suarez Romero wrote: > Commit 7cf9e743a updated deqp mustpass lists to use text based mustpass. > > Hence unit tests should use text based mustpass too. > > Fixes: 7cf9e743a ("framework: update deqp mustpass list for text based > mustpass") > --- > unittests/framework/test/test_deqp.py | 28 +--- > 1 file changed, 9 insertions(+), 19 deletions(-) > > diff --git a/unittests/framework/test/test_deqp.py > b/unittests/framework/test/test_deqp.py > index 1eb84b13f..1c24ab365 100644 > --- a/unittests/framework/test/test_deqp.py > +++ b/unittests/framework/test/test_deqp.py > @@ -299,28 +299,18 @@ class TestDEQPBaseTest(object): > class TestGenMustpassTests(object): > """Tests for the gen_mustpass_tests function.""" > > -_xml = textwrap.dedent("""\ > - > - appPackageName="com.freedesktop.org.piglit.deqp" testType="deqpTest" > xmlns:deqp="http://drawelements.com/deqp; deqp:glesVersion="196608"> > - > - > - > - > - > - > - > - > - > - > - > - > - > -""") > +_txt = """\ > +dEQP.piglit.group1.test1 > +dEQP.piglit.group1.test2 > +dEQP.piglit.nested.group2.test3 > +dEQP.piglit.nested.group2.test4 > +""" > > def test_basic(self, tmpdir): > -p = tmpdir.join('foo.xml') > -p.write(self._xml) > +p = tmpdir.join('foo.txt') > +p.write(self._txt) > tests = set(deqp.gen_mustpass_tests(six.text_type(p))) > +print(tests) > assert tests == { > 'dEQP.piglit.group1.test1', > 'dEQP.piglit.group1.test2', -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] tests: Added a new NoContext test profile for the Khronos CTS runner
After: https://github.com/KhronosGroup/VK-GL-CTS/commit/f06134c65f55a009bbe284d2b7c0e56dee0f70cd The Khronos CTS runner added a new KHR-NoContext case list. This new test profile will run this new subset. Cc: Mark Janes <mark.a.ja...@intel.com> Cc: Dylan Baker <dylanx.c.ba...@intel.com> Cc: Juan A. Suarez Romero <jasua...@igalia.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- tests/khr_noctx.py | 79 ++ 1 file changed, 79 insertions(+) create mode 100644 tests/khr_noctx.py diff --git a/tests/khr_noctx.py b/tests/khr_noctx.py new file mode 100644 index 0..4cba8130d --- /dev/null +++ b/tests/khr_noctx.py @@ -0,0 +1,79 @@ +# Copyright (c) 2017 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 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. + +"""Piglit integration for the now open sourced Khronos CTS tests being +developed at https://github.com/KhronosGroup/VK-GL-CTS + +By default this will run NoContext test cases. Those desiring to run +only a subset of them should consider using the -t or -x options to +include or exclude tests. + +For example: +./piglit run khr_noctx -c foo -t gl43 would run only gl43 tests + +This integration requires some configuration in piglit.conf, or the +use of environment variables. + +In piglit.conf one should set the following: +[khr_noctx]:bin -- Path to the glcts binary +[khr_noctx]:extra_args -- any extra arguments to be passed to cts +(optional) + +Alternatively (or in addition, since environment variables have +precedence), one could set: +PIGLIT_KHR_NOCTX_BIN -- environment equivalent of [khr_noctx]:bin +PIGLIT_KHR_NOCTX_EXTRA_ARGS -- environment equivalent of +[khr_noctx]:extra_args + +""" + +from __future__ import ( +absolute_import, division, print_function, unicode_literals +) +import itertools + +from framework.test import deqp + +__all__ = ['profile'] + +_KHR_BIN = deqp.get_option('PIGLIT_KHR_NOCTX_BIN', ('khr_noctx', 'bin'), + required=True) + +_EXTRA_ARGS = deqp.get_option('PIGLIT_KHR_NOCTX_EXTRA_ARGS', ('khr_noctx', 'extra_args'), + default='').split() + + +class DEQPKHRTest(deqp.DEQPBaseTest): +deqp_bin = _KHR_BIN + +@property +def extra_args(self): +return super(DEQPKHRTest, self).extra_args + \ +[x for x in _EXTRA_ARGS if not x.startswith('--deqp-case')] + + +# Add all of the suites by default, users can use filters to remove them. +profile = deqp.make_profile( # pylint: disable=invalid-name +itertools.chain( +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_KHR_BIN, 'KHR-NoContext-cases.txt', + _EXTRA_ARGS)), +), +DEQPKHRTest) -- 2.15.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] tests: Added a new GLES test profile for the Khronos CTS runner
OpenGL GLES*-CTS case lists were renamed to KHR-GLES* in the upstream repository. We want to keep the existing profiles so we are able to keep running the caselists from previous CTS releases and for branches in the open sourced repository created for API-specific release branches, as explained at: https://github.com/KhronosGroup/VK-GL-CTS/wiki/Contributing#branches Therefore, we add this new test profile to be able to run the renamed tests in the master branch of the opensourced Khronos CTS tests at: https://github.com/KhronosGroup/VK-GL-CTS Cc: Mark Janes <mark.a.ja...@intel.com> Cc: Dylan Baker <dylanx.c.ba...@intel.com> Cc: Juan A. Suarez Romero <jasua...@igalia.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- tests/khr_gles.py | 88 +++ 1 file changed, 88 insertions(+) create mode 100644 tests/khr_gles.py diff --git a/tests/khr_gles.py b/tests/khr_gles.py new file mode 100644 index 0..59a0fe089 --- /dev/null +++ b/tests/khr_gles.py @@ -0,0 +1,88 @@ +# Copyright (c) 2017 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 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. + +"""Piglit integration for the now open sourced Khronos CTS tests being +developed at https://github.com/KhronosGroup/VK-GL-CTS + +By default this will run GLES2, GLES3, GLES31, GLES32, and GLESEXT +test cases. Those desiring to run only a subset of them should +consider using the -t or -x options to include or exclude tests. + +For example: +./piglit run khr_gles -c foo -t ES3- would run only ES3 tests (note +the dash to exclude ES31 tests) + +This integration requires some configuration in piglit.conf, or the +use of environment variables. + +In piglit.conf one should set the following: +[khr_gles]:bin -- Path to the glcts binary +[khr_gles]:extra_args -- any extra arguments to be passed to cts +(optional) + +Alternatively (or in addition, since environment variables have +precedence), one could set: +PIGLIT_KHR_GLES_BIN -- environment equivalent of [khr_gles]:bin +PIGLIT_KHR_GLES_EXTRA_ARGS -- environment equivalent of +[khr_gles]:extra_args + +""" + +from __future__ import ( +absolute_import, division, print_function, unicode_literals +) +import itertools + +from framework.test import deqp + +__all__ = ['profile'] + +_KHR_BIN = deqp.get_option('PIGLIT_KHR_GLES_BIN', ('khr_gles', 'bin'), + required=True) + +_EXTRA_ARGS = deqp.get_option('PIGLIT_KHR_GLES_EXTRA_ARGS', ('khr_gles', 'extra_args'), + default='').split() + + +class DEQPKHRTest(deqp.DEQPBaseTest): +deqp_bin = _KHR_BIN + +@property +def extra_args(self): +return super(DEQPKHRTest, self).extra_args + \ +[x for x in _EXTRA_ARGS if not x.startswith('--deqp-case')] + + +# Add all of the suites by default, users can use filters to remove them. +profile = deqp.make_profile( # pylint: disable=invalid-name +itertools.chain( +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES2-cases.txt', _EXTRA_ARGS)), +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES3-cases.txt', _EXTRA_ARGS)), +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES31-cases.txt', _EXTRA_ARGS)), +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLES32-cases.txt', _EXTRA_ARGS)), +deqp.iter_deqp_test_cases( +deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GLESEXT-cases.txt', + _EXTRA_ARGS)), +), +DEQPKHRTest) -- 2.15.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v4] travis: add docker based cmake build job
Thanks, Dylan, Eric and Juan! I've just pushed this changed. ☺ PS: In my Travis-CI, the job is taking ~13 min. right now. On Mon, 2018-02-05 at 09:29 -0800, Dylan Baker wrote: > I haven't looked too closely at this, but I like the idea of using docker to > allow running the cmake based job. > > Acked-by: Dylan Baker <dy...@pnwbakers.com> > > Quoting Andres Gomez (2018-01-31 13:11:52) > > Until now we were only running the python unit tests. > > > > It seems desirable to also check that the CMake based build compiles > > successfully. We do that now using docker. > > > > The docker build can be tweaked with some environment variables and, > > also, be stored in the docker hub if desired. Check the changes for > > extra details regarding these variables. > > > > v2: Removed other build possibilities other than just from inside > > Travis-CI, as suggested by Juan. > > v3: Replaced the "RELEASE" parameter to create the docker image with > > "PARENT" and removed some unneeded documentation after v2, as > > suggested by Juan. > > v4: > > - Use DOCKER_PARENT, DOCKER_IMAGE and DOCKER_TAG variables from the > > custom Travis-CI setup to define the PARENT, IMAGE and TAG > > parameters during the docker image creation. > > - Upload the image only if DOCKER_IMAGE and DOCKER_TAG are set. > > > > Cc: Dylan Baker <dy...@pnwbakers.com> > > Cc: Juan A. Suarez <jasua...@igalia.com> > > Signed-off-by: Andres Gomez <ago...@igalia.com> > > Reviewed-by: Juan A. Suarez <jasua...@igalia.com> > > --- > > .travis.yml | 47 -- > > docker/Rockerfile.piglit | 74 > > > > 2 files changed, 118 insertions(+), 3 deletions(-) > > create mode 100644 docker/Rockerfile.piglit > > > > diff --git a/.travis.yml b/.travis.yml > > index b47829ff9..b4cbcca49 100644 > > --- a/.travis.yml > > +++ b/.travis.yml > > @@ -1,5 +1,16 @@ > > +sudo: false > > +os: linux > > language: python > > -cache: pip > > +cache: > > + - ccache > > + - pip > > +services: > > + - docker > > + > > +env: > > + global: > > +- BUILD=pytest > > + > > matrix: > >include: > > - python: 2.7 > > @@ -12,7 +23,37 @@ matrix: > >env: TOX_ENV="py35-{generator,noaccel,accel-nix,streams}" > > - python: 3.6 > >env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}" > > +- env: BUILD=cmake > > + > > install: > > -pip install tox > > + - | > > +if [[ $BUILD == pytest ]]; then > > + pip install tox > > +else > > + wget > > https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz > > + tar xvf rocker-1.3.1-linux_amd64.tar.gz > > + rm rocker-1.3.1-linux_amd64.tar.gz > > +fi > > + > > +before_script: > > + - | > > +if [[ $BUILD != pytest ]]; then > > + mkdir -p -m777 ~/.ccache > > +fi > > + > > script: > > -- tox -e $TOX_ENV > > + - | > > +if [[ $BUILD == pytest ]]; then > > + tox -e $TOX_ENV > > +else > > + ./rocker build -f docker/Rockerfile.piglit ${DOCKER_TAG:+--var > > TAG=}${DOCKER_TAG} ${DOCKER_IMAGE:+--var IMAGE=}${DOCKER_IMAGE} > > ${DOCKER_PARENT:+--var PARENT=}${DOCKER_PARENT} . > > +fi > > + > > +after_success: > > + - | > > +if [[ $BUILD != pytest ]]; then > > + if [[ -n $DOCKER_IMAGE && -n $DOCKER_TAG && -n $DOCKER_USERNAME && > > $TRAVIS_BRANCH == master ]]; then > > +docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" > > +docker push "${DOCKER_IMAGE}":"${DOCKER_TAG}" > > + fi > > +fi > > diff --git a/docker/Rockerfile.piglit b/docker/Rockerfile.piglit > > new file mode 100644 > > index 0..0d8f8bb45 > > --- /dev/null > > +++ b/docker/Rockerfile.piglit > > @@ -0,0 +1,74 @@ > > +# > > +# This builds Piglit. > > +# > > +# ~~~ > > +# rocker build -f Rockerfile.piglit [--attach] > > \ > > +#[--var IMAGE=freedesktop/mesa] # freedesktop/mesa, myrepo/myproyect, > > ... \ > > +#[--var TAG=piglit] # piglit-17.0, piglit-13.0, ... > > \ > > +#[--var P
Re: [Piglit] [PATCH v3] travis: add docker based cmake build job
On Mon, 2018-01-29 at 14:06 -0800, Eric Anholt wrote: > Andres Gomez <ago...@igalia.com> writes: > > > Until now we were only running the python unit tests. > > > > It seems desirable to also check that the CMake based build compiles > > successfully. We do that now using docker. > > > > The docker build can be tweaked with some environment variables and, > > also, be stored in the docker hub if desired. Check the changes for > > extra details regarding these variables. > > > > v2: Removed other build possibilities other than just from inside > > Travis-CI, as suggested by Juan. > > v3: Replaced the "RELEASE" parameter to create the docker image with > > "PARENT" and removed some unneeded documentation after v2, as > > suggested by Juan. > > > > Cc: Dylan Baker <dy...@pnwbakers.com> > > Cc: Juan A. Suarez <jasua...@igalia.com> > > Signed-off-by: Andres Gomez <ago...@igalia.com> > > Reviewed-by: Juan A. Suarez <jasua...@igalia.com> > > I'm definitely interested in extending our tests using Travis, but could > you add some comments explaining what this system does? Do we do a > bunch of image build work (numpy/six/mako install) on each Travis build, > or does it get cached? Do I need to do any setup in Travis in order for > this to take effect? Yes, I should have been already more verbose with explanations when posting this patch in the first place. First, thanks to your reply I've sent a new v4 version after finding a couple of issues. With this v4 version, you can check this travis build, which is where I've tested the patch: https://travis-ci.org/Igalia/piglit/builds/335657962 There you will see that, in addition to the usual 5 python builds running the unit tests, there is an additional cmake build, this is the docker based build: https://travis-ci.org/Igalia/piglit/jobs/335657970 Without any special setup in Travis, the docker build will run with the default options. This will be done on every run: * Download the parent ubuntu:xenial image. * Install building dependencies from APT. * Install additional Python dependencies (numpy/six/mako). * Build piglit. The build is, however, quite quick since docker and travis have many of the needed bits cached and it also makes use of ccache, but still this process has to happen every time. Now, this patch allows a couple of additional tweaks: 1. You can select a different parent image by setting in Travis-CI the env variable DOCKER_PARENT. You could want to do this for different reasons. From the top of my head: * To speed up the build; using a parent image with the APT and Python dependencies already installed. * To create a build in which there are additional or alternative libraries installed; for example, at Igalia, we have the docker image "igalia/mesa:released-17.3.3.debug". This way, in case we want to later use the generated docker image to test piglit, we will be able to run the test suite against mesa-17.3.3 built with debug symbols. 2. You can define a docker hub repository to which upload the generated build as "$DOCKER_IMAGE:$DOCKER_TAG". For that, you have to set in Travis-CI the following env variables: * DOCKER_IMAGE: The path to the docker hub repository you want to use. We use "igalia/mesa". * DOCKER_TAG: The specific tag for the newly created image. For example, you could use "piglit". Therefore, in our case, a new build will be uploaded as "igalia/mesa:piglit". * DOCKER_USERNAME: Your user to the docker hub. * DOCKER_PASSWORD: Your password for the docker hub. Combining 1. and 2. you could have, for example, automatic builds of piglit's master uploaded to your personal docker hub with a specific mesa version installed. This is very useful for later running the test suite. It is also a good way of providing a specific environment for debugging/reproducing a bug and share with other developers. I hope this clarifies further the aim of this integration. PS: If this is accepted in piglit, my next step is to work in a patch proposal for having a similar use case for mesa. This will ease the combination of 1. and 2. that I was mentioning. -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v4] travis: add docker based cmake build job
Until now we were only running the python unit tests. It seems desirable to also check that the CMake based build compiles successfully. We do that now using docker. The docker build can be tweaked with some environment variables and, also, be stored in the docker hub if desired. Check the changes for extra details regarding these variables. v2: Removed other build possibilities other than just from inside Travis-CI, as suggested by Juan. v3: Replaced the "RELEASE" parameter to create the docker image with "PARENT" and removed some unneeded documentation after v2, as suggested by Juan. v4: - Use DOCKER_PARENT, DOCKER_IMAGE and DOCKER_TAG variables from the custom Travis-CI setup to define the PARENT, IMAGE and TAG parameters during the docker image creation. - Upload the image only if DOCKER_IMAGE and DOCKER_TAG are set. Cc: Dylan Baker <dy...@pnwbakers.com> Cc: Juan A. Suarez <jasua...@igalia.com> Signed-off-by: Andres Gomez <ago...@igalia.com> Reviewed-by: Juan A. Suarez <jasua...@igalia.com> --- .travis.yml | 47 -- docker/Rockerfile.piglit | 74 2 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 docker/Rockerfile.piglit diff --git a/.travis.yml b/.travis.yml index b47829ff9..b4cbcca49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,16 @@ +sudo: false +os: linux language: python -cache: pip +cache: + - ccache + - pip +services: + - docker + +env: + global: +- BUILD=pytest + matrix: include: - python: 2.7 @@ -12,7 +23,37 @@ matrix: env: TOX_ENV="py35-{generator,noaccel,accel-nix,streams}" - python: 3.6 env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}" +- env: BUILD=cmake + install: -pip install tox + - | +if [[ $BUILD == pytest ]]; then + pip install tox +else + wget https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz + tar xvf rocker-1.3.1-linux_amd64.tar.gz + rm rocker-1.3.1-linux_amd64.tar.gz +fi + +before_script: + - | +if [[ $BUILD != pytest ]]; then + mkdir -p -m777 ~/.ccache +fi + script: -- tox -e $TOX_ENV + - | +if [[ $BUILD == pytest ]]; then + tox -e $TOX_ENV +else + ./rocker build -f docker/Rockerfile.piglit ${DOCKER_TAG:+--var TAG=}${DOCKER_TAG} ${DOCKER_IMAGE:+--var IMAGE=}${DOCKER_IMAGE} ${DOCKER_PARENT:+--var PARENT=}${DOCKER_PARENT} . +fi + +after_success: + - | +if [[ $BUILD != pytest ]]; then + if [[ -n $DOCKER_IMAGE && -n $DOCKER_TAG && -n $DOCKER_USERNAME && $TRAVIS_BRANCH == master ]]; then +docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" +docker push "${DOCKER_IMAGE}":"${DOCKER_TAG}" + fi +fi diff --git a/docker/Rockerfile.piglit b/docker/Rockerfile.piglit new file mode 100644 index 0..0d8f8bb45 --- /dev/null +++ b/docker/Rockerfile.piglit @@ -0,0 +1,74 @@ +# +# This builds Piglit. +# +# ~~~ +# rocker build -f Rockerfile.piglit [--attach] \ +#[--var IMAGE=freedesktop/mesa] # freedesktop/mesa, myrepo/myproyect, ... \ +#[--var TAG=piglit] # piglit-17.0, piglit-13.0, ... \ +#[--var PARENT=ubuntu:xenial] # ubuntu:xenial, freedesktop/mesa:17.3, ... +# ~~~ +# +# Environment variables that are used in the build: +# - MAKEFLAGS: flags to pass to make (e.g., "-j8") +# - CCACHE_DIR: ccache directory (default: ~/.ccache) +# +# To run +# +# ~~~ +# mkdir -p -m777 ~/my_results_dir +# docker run --privileged --rm -t -v ~/my_results_dir:/results:Z \ +# -v /tmp/.X11-unix:/tmp/.X11-unix freedesktop/mesa:piglit +# ~~~ +# + +{{ $image := (or .IMAGE "freedesktop/mesa") }} +{{ $parent_image := (or .PARENT "ubuntu:xenial") }} +{{ $ccachedir := (or .Env.CCACHE_DIR "~/.ccache") }} + +FROM {{ $parent_image }} + +LABEL maintainer "Andres Gomez <ago...@igalia.com>" + +USER root + +ENV LC_ALL=C.UTF-8 + +RUN apt-get update \ + && apt-get -y --no-install-recommends install sudo gcc g++ ccache \ +git pkg-config bash-completion cmake\ +libz-dev libpng-dev libgl-dev libegl1-mesa-dev libwaffle-dev\ +python3-setuptools python3-pip \ + && rm -fr /var/lib/apt/lists/* + +RUN pip3 install numpy six mako + +RUN getent passwd local > /dev/null || adduser --gecos "" local && passwd -d local && adduser local sudo + +USER local + +{{ if .Env.MAKEFLAGS }} +ENV MAKEFLAGS={{ .Env.MAKEFLAGS }} +{{ end }} + +WORKDIR /home/local + +MOUNT {{ $ccachedir }}:/home/local/.ccache:Z + +RUN sudo cho
[Piglit] [PATCH v3] travis: add docker based cmake build job
Until now we were only running the python unit tests. It seems desirable to also check that the CMake based build compiles successfully. We do that now using docker. The docker build can be tweaked with some environment variables and, also, be stored in the docker hub if desired. Check the changes for extra details regarding these variables. v2: Removed other build possibilities other than just from inside Travis-CI, as suggested by Juan. v3: Replaced the "RELEASE" parameter to create the docker image with "PARENT" and removed some unneeded documentation after v2, as suggested by Juan. Cc: Dylan Baker <dy...@pnwbakers.com> Cc: Juan A. Suarez <jasua...@igalia.com> Signed-off-by: Andres Gomez <ago...@igalia.com> Reviewed-by: Juan A. Suarez <jasua...@igalia.com> --- .travis.yml | 47 -- docker/Rockerfile.piglit | 74 2 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 docker/Rockerfile.piglit diff --git a/.travis.yml b/.travis.yml index b47829ff9..32a6b53e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,16 @@ +sudo: false +os: linux language: python -cache: pip +cache: + - ccache + - pip +services: + - docker + +env: + global: +- BUILD=pytest + matrix: include: - python: 2.7 @@ -12,7 +23,37 @@ matrix: env: TOX_ENV="py35-{generator,noaccel,accel-nix,streams}" - python: 3.6 env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}" +- env: BUILD=cmake + install: -pip install tox + - | +if [[ $BUILD == pytest ]]; then + pip install tox +else + wget https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz + tar xvf rocker-1.3.1-linux_amd64.tar.gz + rm rocker-1.3.1-linux_amd64.tar.gz +fi + +before_script: + - | +if [[ $BUILD != pytest ]]; then + mkdir -p -m777 ~/.ccache +fi + script: -- tox -e $TOX_ENV + - | +if [[ $BUILD == pytest ]]; then + tox -e $TOX_ENV +else + ./rocker build -f docker/Rockerfile.piglit . +fi + +after_success: + - | +if [[ $BUILD != pytest ]]; then + if [[ -n $DOCKER_USERNAME && $TRAVIS_BRANCH == master ]]; then +docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" +docker push ${DOCKER_IMAGE:-freedesktop/mesa}:piglit + fi +fi diff --git a/docker/Rockerfile.piglit b/docker/Rockerfile.piglit new file mode 100644 index 0..d325205b0 --- /dev/null +++ b/docker/Rockerfile.piglit @@ -0,0 +1,74 @@ +# +# This builds Piglit. +# +# ~~~ +# rocker build -f Rockerfile.piglit [--attach] \ +#[--var TAG=piglit] # piglit-17.0, piglit-13.0, ... \ +#[--var PARENT=ubuntu:xenial] # ubuntu:xenial, freedesktop/mesa:17.3, ... +# ~~~ +# +# Environment variables that are used in the build: +# - DOCKER_IMAGE: name of the final image to be tagged (default: freedesktop/mesa) +# - MAKEFLAGS: flags to pass to make (e.g., "-j8") +# - CCACHE_DIR: ccache directory (default: ~/.ccache) +# +# To run +# +# ~~~ +# mkdir -p -m777 ~/my_results_dir +# docker run --privileged --rm -t -v ~/my_results_dir:/results:Z \ +# -v /tmp/.X11-unix:/tmp/.X11-unix freedesktop/mesa:piglit +# ~~~ +# + +{{ $image := (or .Env.DOCKER_IMAGE "freedesktop/mesa") }} +{{ $parent_image := (or .PARENT "ubuntu:xenial") }} +{{ $ccachedir := (or .Env.CCACHE_DIR "~/.ccache") }} + +FROM {{ $parent_image }} + +LABEL maintainer "Andres Gomez <ago...@igalia.com>" + +USER root + +ENV LC_ALL=C.UTF-8 + +RUN apt-get update \ + && apt-get -y --no-install-recommends install sudo gcc g++ ccache \ +git pkg-config bash-completion cmake\ +libz-dev libpng-dev libgl-dev libegl1-mesa-dev libwaffle-dev\ +python3-setuptools python3-pip \ + && rm -fr /var/lib/apt/lists/* + +RUN pip3 install numpy six mako + +RUN getent passwd local > /dev/null || adduser --gecos "" local && passwd -d local && adduser local sudo + +USER local + +{{ if .Env.MAKEFLAGS }} +ENV MAKEFLAGS={{ .Env.MAKEFLAGS }} +{{ end }} + +WORKDIR /home/local + +MOUNT {{ $ccachedir }}:/home/local/.ccache:Z + +RUN sudo chown -R local:local /home/local/.ccache + +ENV PATH=/usr/lib/ccache:$PATH + +ADD . /home/local/piglit +RUN sudo chown -R local:local /home/local/piglit + +WORKDIR /home/local/piglit + +ATTACH [ "/bin/bash" ] + +RUN cmake . && cmake --build . + +VOLUME /results + +{{ if .TAG }} +TAG {{ $image }}:{{ .TAG }} +{{ end }} -- 2.15.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] tests: update documentation to include GL46 in khr_gl.py
Cc: Kenneth Graunke <kenn...@whitecape.org> Cc: Dylan Baker <dy...@pnwbakers.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- tests/khr_gl.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/khr_gl.py b/tests/khr_gl.py index 6a4e845c4..30e28b045 100644 --- a/tests/khr_gl.py +++ b/tests/khr_gl.py @@ -21,9 +21,10 @@ """Piglit integration for the now open sourced Khronos CTS tests being developed at https://github.com/KhronosGroup/VK-GL-CTS -By default this will run GL30, GL31, GL32, GL33, GL40, GL41, GL42, GL43, GL44 -and GL45 test cases. Those desiring to run only a subset of them should consider -using the -t or -x options to include or exclude tests. +By default this will run GL30, GL31, GL32, GL33, GL40, GL41, GL42, +GL43, GL44, GL45 and GL46 test cases. Those desiring to run only a +subset of them should consider using the -t or -x options to include +or exclude tests. For example: ./piglit run khr_gl -c foo -t GL30- would run only GL30 tests -- 2.15.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v2] travis: add docker based cmake build job
Until now we were only running the python unit tests. It seems desirable to also check that the CMake based build compiles successfully. We do that now using docker. The docker build can be tweaked with some environment variables and, also, be stored in the docker hub if desired. Check the changes for extra details regarding these variables. v2: Removed other build possibilities other than just from inside Travis-CI, as suggested by Juan. Cc: Dylan Baker <dy...@pnwbakers.com> Cc: Juan A. Suarez <jasua...@igalia.com> Signed-off-by: Andres Gomez <ago...@igalia.com> Reviewed-by: Juan A. Suarez <jasua...@igalia.com> --- .travis.yml | 47 +++-- docker/Rockerfile.piglit | 77 2 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 docker/Rockerfile.piglit diff --git a/.travis.yml b/.travis.yml index b47829ff9..32a6b53e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,16 @@ +sudo: false +os: linux language: python -cache: pip +cache: + - ccache + - pip +services: + - docker + +env: + global: +- BUILD=pytest + matrix: include: - python: 2.7 @@ -12,7 +23,37 @@ matrix: env: TOX_ENV="py35-{generator,noaccel,accel-nix,streams}" - python: 3.6 env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}" +- env: BUILD=cmake + install: -pip install tox + - | +if [[ $BUILD == pytest ]]; then + pip install tox +else + wget https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz + tar xvf rocker-1.3.1-linux_amd64.tar.gz + rm rocker-1.3.1-linux_amd64.tar.gz +fi + +before_script: + - | +if [[ $BUILD != pytest ]]; then + mkdir -p -m777 ~/.ccache +fi + script: -- tox -e $TOX_ENV + - | +if [[ $BUILD == pytest ]]; then + tox -e $TOX_ENV +else + ./rocker build -f docker/Rockerfile.piglit . +fi + +after_success: + - | +if [[ $BUILD != pytest ]]; then + if [[ -n $DOCKER_USERNAME && $TRAVIS_BRANCH == master ]]; then +docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" +docker push ${DOCKER_IMAGE:-freedesktop/mesa}:piglit + fi +fi diff --git a/docker/Rockerfile.piglit b/docker/Rockerfile.piglit new file mode 100644 index 0..5397462e2 --- /dev/null +++ b/docker/Rockerfile.piglit @@ -0,0 +1,77 @@ +# +# This builds and installs Piglit. +# +# ~~~ +# rocker build -f Rockerfile.piglit [--attach] \ +#[--var TAG=piglit] # piglit-17.0, piglit-13.0, ... \ +#[--var RELEASE=xenial] # master, pre-release-17.0, pre-release-13.0, ... +# ~~~ +# +# Environment variables that are used in the build: +# - BASE_DOCKER_IMAGE: name of the image in which this will be based (default: ubuntu) +# - DOCKER_IMAGE: name of the final image to be tagged (default: freedesktop/mesa) +# - BASE_PIGLIT_REPO: custom piglit repository to use with a specific release +# - MAKEFLAGS: flags to pass to make (e.g., "-j8") +# - CCACHE_DIR: ccache directory (default: ~/.ccache) +# +# To run +# +# ~~~ +# mkdir -p -m777 ~/my_results_dir +# docker run --privileged --rm -t -v ~/my_results_dir:/results:Z \ +# -v /tmp/.X11-unix:/tmp/.X11-unix freedesktop/mesa:piglit +# ~~~ +# + +{{ $base_image := (or .Env.BASE_DOCKER_IMAGE "ubuntu") }} +{{ $image := (or .Env.BASE_DOCKER_IMAGE "freedesktop/mesa") }} +{{ $release := (or .RELEASE "xenial") }} +{{ $ccachedir := (or .Env.CCACHE_DIR "~/.ccache") }} + +FROM {{ $base_image }}:{{ $release }} + +LABEL maintainer "Andres Gomez <ago...@igalia.com>" + +USER root + +ENV LC_ALL=C.UTF-8 + +RUN apt-get update \ + && apt-get -y --no-install-recommends install sudo gcc g++ ccache \ +git pkg-config bash-completion cmake\ +libz-dev libpng-dev libgl-dev libegl1-mesa-dev libwaffle-dev\ +python3-setuptools python3-pip \ + && rm -fr /var/lib/apt/lists/* + +RUN pip3 install numpy six mako + +RUN getent passwd local > /dev/null || adduser --gecos "" local && passwd -d local && adduser local sudo + +USER local + +{{ if .Env.MAKEFLAGS }} +ENV MAKEFLAGS={{ .Env.MAKEFLAGS }} +{{ end }} + +WORKDIR /home/local + +MOUNT {{ $ccachedir }}:/home/local/.ccache:Z + +RUN sudo chown -R local:local /home/local/.ccache + +ENV PATH=/usr/lib/ccache:$PATH + +ADD . /home/local/piglit +RUN sudo chown -R local:local /home/local/piglit + +WORKDIR /home/local/piglit + +ATTACH [ "/bin/bash" ] + +RUN cmake . && cmake --build . + +VOLUME /results + +{{ if .TAG }} +TAG {{ $image }}:{{ .TAG }} +{{ end }} -- 2.15.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] travis: add docker based cmake build job
Until now we were only running the python unit tests. It seems desirable to also check that the CMake based build compiles successfully. We do that now using docker. The docker build can be tweaked with some environment variables and, also, be stored in the docker hub if desired. Check the changes for extra details regarding these variables. Cc: Dylan Baker <dy...@pnwbakers.com> Cc: Juan A. Suarez Romero <jasua...@igalia.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- We choose to do this task using docker instead of directly in the Travis CI VM because of various reasons. First, the Travis env is configured for a python execution. Adding the bits for a C compilation will mean some extra complication which is not that big by just delegating this to a docker service. Second, docker brings some additional benefits. For example, using docker makes the CI indepent from the CI infrastructure; docker images are storable and downloadable so we can get the same building setting that was used in a specific moment; etc. .travis.yml | 47 -- docker/Rockerfile.piglit | 88 2 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 docker/Rockerfile.piglit diff --git a/.travis.yml b/.travis.yml index b47829ff9..32a6b53e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,16 @@ +sudo: false +os: linux language: python -cache: pip +cache: + - ccache + - pip +services: + - docker + +env: + global: +- BUILD=pytest + matrix: include: - python: 2.7 @@ -12,7 +23,37 @@ matrix: env: TOX_ENV="py35-{generator,noaccel,accel-nix,streams}" - python: 3.6 env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}" +- env: BUILD=cmake + install: -pip install tox + - | +if [[ $BUILD == pytest ]]; then + pip install tox +else + wget https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz + tar xvf rocker-1.3.1-linux_amd64.tar.gz + rm rocker-1.3.1-linux_amd64.tar.gz +fi + +before_script: + - | +if [[ $BUILD != pytest ]]; then + mkdir -p -m777 ~/.ccache +fi + script: -- tox -e $TOX_ENV + - | +if [[ $BUILD == pytest ]]; then + tox -e $TOX_ENV +else + ./rocker build -f docker/Rockerfile.piglit . +fi + +after_success: + - | +if [[ $BUILD != pytest ]]; then + if [[ -n $DOCKER_USERNAME && $TRAVIS_BRANCH == master ]]; then +docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" +docker push ${DOCKER_IMAGE:-freedesktop/mesa}:piglit + fi +fi diff --git a/docker/Rockerfile.piglit b/docker/Rockerfile.piglit new file mode 100644 index 0..989b7d919 --- /dev/null +++ b/docker/Rockerfile.piglit @@ -0,0 +1,88 @@ +# +# This builds and installs Piglit. +# +# ~~~ +# rocker build -f Rockerfile.piglit [--attach] \ +#[--var TAG=piglit] # piglit-17.0, piglit-13.0, ... \ +#[--var RELEASE=xenial] # master, pre-release-17.0, pre-release-13.0, ... +# ~~~ +# +# Environment variables that are used in the build: +# - BASE_DOCKER_IMAGE: name of the image in which this will be based (default: ubuntu) +# - DOCKER_IMAGE: name of the final image to be tagged (default: freedesktop/mesa) +# - BASE_PIGLIT_REPO: custom piglit repository to use with a specific release +# - MAKEFLAGS: flags to pass to make (e.g., "-j8") +# - CCACHE_DIR: ccache directory (default: ~/.ccache) +# +# To run +# +# ~~~ +# mkdir -p -m777 ~/my_results_dir +# docker run --privileged --rm -t -v ~/my_results_dir:/results:Z \ +# -v /tmp/.X11-unix:/tmp/.X11-unix freedesktop/mesa:piglit +# ~~~ +# + +{{ $base_image := (or .Env.BASE_DOCKER_IMAGE "ubuntu") }} +{{ $image := (or .Env.BASE_DOCKER_IMAGE "freedesktop/mesa") }} +{{ $release := (or .RELEASE "xenial") }} +{{ $ccachedir := (or .Env.CCACHE_DIR "~/.ccache") }} + +FROM {{ $base_image }}:{{ $release }} + +LABEL maintainer "Andres Gomez <ago...@igalia.com>" + +USER root + +ENV LC_ALL=C.UTF-8 + +RUN apt-get update \ + && apt-get -y --no-install-recommends install sudo gcc g++ ccache \ +git pkg-config bash-completion cmake\ +libz-dev libpng-dev libgl-dev libegl1-mesa-dev libwaffle-dev\ +python3-setuptools python3-pip \ + && rm -fr /var/lib/apt/lists/* + +RUN pip3 install numpy six mako + +RUN getent passwd local > /dev/null || adduser --gecos "" local && passwd -d local && adduser local sudo + +USER local + +{{ if .Env.MAKEFLAGS }} +ENV MAKEFLAGS={{ .Env.MAKEFLAGS }} +{{ end }} + +WORKDIR /home/local + +MOUNT {{ $ccachedir }}:/home/local/.ccache:Z + +RUN s
Re: [Piglit] [PATCH] arb_internalformat_query2: correct tessellation typo
On Tue, 2017-12-19 at 08:52 +0100, Alejandro Piñeiro wrote: > Reviewed-by: Alejandro Piñeiro> > PS: in fact I have that fix as part of one of my patches, but I have > pending to answer one Ilia question (need some investigation). In any > case, I think that we can fix the typo now. Thanks! OK. Sorry I didn't realize about that. I'll push this now. Thanks! -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_shader_image_load_store: correct tessellation typo
On Mon, 2017-12-18 at 09:47 -0800, Francisco Jerez wrote: > Andres Gomez <ago...@igalia.com> writes: > > > Cc: Francisco Jerez <curroje...@riseup.net> > > Signed-off-by: Andres Gomez <ago...@igalia.com> > > --- > > tests/spec/arb_shader_image_load_store/grid.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tests/spec/arb_shader_image_load_store/grid.c > > b/tests/spec/arb_shader_image_load_store/grid.c > > index 68d80b102..261dbfd13 100644 > > --- a/tests/spec/arb_shader_image_load_store/grid.c > > +++ b/tests/spec/arb_shader_image_load_store/grid.c > > @@ -261,7 +261,7 @@ generate_program_v(const struct grid_info grid, const > > char **sources) > > GL_GEOMETRY_SHADER_BIT); > > const unsigned stages = > > (grid.stages | > > - /* Make a full pipeline if a tesselation shader was > > + /* Make a full pipeline if a tessellation shader was > > Actually both are valid spellings AFAIA -- Unless you are searching for > the ARB extension string I guess ;). Ouch! I didn't know tesselate was a valid alternative spelling. Now I've learned something new ☺ Yes, I was doing a quick check for typos in the extensions after finding by chance one of them. Consider this patch withdrawn. -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_internalformat_query2: correct tessellation typo
Cc: Alejandro Piñeiro <apinhe...@igalia.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- tests/spec/arb_internalformat_query2/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c index a5686c0a5..9fa5fa9d1 100644 --- a/tests/spec/arb_internalformat_query2/common.c +++ b/tests/spec/arb_internalformat_query2/common.c @@ -612,7 +612,7 @@ check_query2_pname_dependencies(const GLenum pname) case GL_TESS_CONTROL_TEXTURE: case GL_TESS_EVALUATION_TEXTURE: -if (!piglit_is_extension_supported("GL_ARB_tesselation_shader")) +if (!piglit_is_extension_supported("GL_ARB_tessellation_shader")) return false; break; -- 2.14.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_shader_image_load_store: correct tessellation typo
Cc: Francisco Jerez <curroje...@riseup.net> Signed-off-by: Andres Gomez <ago...@igalia.com> --- tests/spec/arb_shader_image_load_store/grid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/arb_shader_image_load_store/grid.c b/tests/spec/arb_shader_image_load_store/grid.c index 68d80b102..261dbfd13 100644 --- a/tests/spec/arb_shader_image_load_store/grid.c +++ b/tests/spec/arb_shader_image_load_store/grid.c @@ -261,7 +261,7 @@ generate_program_v(const struct grid_info grid, const char **sources) GL_GEOMETRY_SHADER_BIT); const unsigned stages = (grid.stages | - /* Make a full pipeline if a tesselation shader was + /* Make a full pipeline if a tessellation shader was * requested. */ (grid.stages & tess_stages ? graphic_stages : 0) | /* Make sure there is always a vertex and fragment -- 2.14.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 3/3] travis: add generator unittests
Cc: Dylan Baker <dylanx.c.ba...@intel.com> Cc: Juan A. Suarez Romero <jasua...@igalia.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- .travis.yml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1d6c954f5..b47829ff9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,15 +3,15 @@ cache: pip matrix: include: - python: 2.7 - env: TOX_ENV="py27-{noaccel,accel-nix,streams}" + env: TOX_ENV="py27-{generator,noaccel,accel-nix,streams}" - python: 3.3 - env: TOX_ENV="py33-{noaccel,accel-nix,streams}" + env: TOX_ENV="py33-{generator,noaccel,accel-nix,streams}" - python: 3.4 - env: TOX_ENV="py34-{noaccel,accel-nix,streams}" + env: TOX_ENV="py34-{generator,noaccel,accel-nix,streams}" - python: 3.5 - env: TOX_ENV="py35-{noaccel,accel-nix,streams}" + env: TOX_ENV="py35-{generator,noaccel,accel-nix,streams}" - python: 3.6 - env: TOX_ENV="py36-{noaccel,accel-nix,streams}" + env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}" install: pip install tox script: -- 2.14.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/3] unittests: update python generator
Cc: Dylan Baker <dylanx.c.ba...@intel.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- unittests/generators/test_generators.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/unittests/generators/test_generators.py b/unittests/generators/test_generators.py index a3ea3e29e..ccb57e725 100644 --- a/unittests/generators/test_generators.py +++ b/unittests/generators/test_generators.py @@ -45,10 +45,14 @@ import pytest 'gen_cl_int_builtins', 'gen_cl_math_builtins', 'gen_cl_relational_builtins', +'gen_cl_shuffle2_builtins', +'gen_cl_shuffle_builtins', 'gen_cl_store_tests', +'gen_cl_vload_tests', +'gen_cl_vstore_tests', 'gen_const_builtin_equal_tests', 'gen_constant_array_size_tests_fp64', -'gen_conversion_fp64', +'gen_conversion', 'gen_extensions_defined', 'gen_flat_interpolation_qualifier', 'gen_inout_fp64', @@ -59,6 +63,7 @@ import pytest 'gen_shader_bit_encoding_tests', 'gen_shader_framebuffer_fetch_tests', 'gen_shader_image_load_store_tests', +'gen_shader_image_nv_image_formats_tests', 'gen_shader_intel_conservative_rasterization', 'gen_shader_precision_tests', 'gen_tcs_input_tests', -- 2.14.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/3] unittests: correct tessellation typo
Cc: Dylan Baker <dylanx.c.ba...@intel.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- unittests/generators/test_glsl.py | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/unittests/generators/test_glsl.py b/unittests/generators/test_glsl.py index 66e3f66e1..5eec79484 100644 --- a/unittests/generators/test_glsl.py +++ b/unittests/generators/test_glsl.py @@ -300,18 +300,18 @@ class TestMinVersion_for_stage_with_ext(object): TCS (OpenGL)""" self._test('tesc', glsl.Version('410'), (glsl.Version('410'), None)) self._test('tesc', glsl.Version('140'), - (glsl.Version('140'), 'GL_ARB_tesselation_shader')) + (glsl.Version('140'), 'GL_ARB_tessellation_shader')) self._test('tesc', glsl.Version('110'), - (glsl.Version('140'), 'GL_ARB_tesselation_shader')) + (glsl.Version('140'), 'GL_ARB_tessellation_shader')) def test_opengl_tese(self): """generated_tests.modules.glsl.MinVersion.for_stage_with_ext: TES (OpenGL)""" self._test('tese', glsl.Version('410'), (glsl.Version('410'), None)) self._test('tese', glsl.Version('140'), - (glsl.Version('140'), 'GL_ARB_tesselation_shader')) + (glsl.Version('140'), 'GL_ARB_tessellation_shader')) self._test('tese', glsl.Version('110'), - (glsl.Version('140'), 'GL_ARB_tesselation_shader')) + (glsl.Version('140'), 'GL_ARB_tessellation_shader')) def test_opengl_comp(self): """generated_tests.modules.glsl.MinVersion.for_stage_with_ext: @@ -352,9 +352,9 @@ class TestMinVersion_for_stage_with_ext(object): self._test('tesc', glsl.Version('320 es'), (glsl.Version('320 es'), None)) self._test('tesc', glsl.Version('310 es'), - (glsl.Version('310 es'), 'GL_OES_tesselation_shader')) + (glsl.Version('310 es'), 'GL_OES_tessellation_shader')) self._test('tesc', glsl.Version('100'), - (glsl.Version('310 es'), 'GL_OES_tesselation_shader')) + (glsl.Version('310 es'), 'GL_OES_tessellation_shader')) def test_opengles_tese(self): """generated_tests.modules.glsl.MinVersion.for_stage_with_ext: @@ -362,9 +362,9 @@ class TestMinVersion_for_stage_with_ext(object): self._test('tese', glsl.Version('320 es'), (glsl.Version('320 es'), None)) self._test('tese', glsl.Version('310 es'), - (glsl.Version('310 es'), 'GL_OES_tesselation_shader')) + (glsl.Version('310 es'), 'GL_OES_tessellation_shader')) self._test('tese', glsl.Version('100'), - (glsl.Version('310 es'), 'GL_OES_tesselation_shader')) + (glsl.Version('310 es'), 'GL_OES_tessellation_shader')) def test_opengles_comp(self): """generated_tests.modules.glsl.MinVersion.for_stage_with_ext: -- 2.14.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 0/3] Enable generator unittests
This is a small series which correct some small mistakes, update the unit test for the generator and enables it in Travis CI. Andres Gomez (3): unittests: correct tessellation typo unittests: update python generator travis: add generator unittests .travis.yml | 10 +- unittests/generators/test_generators.py | 7 ++- unittests/generators/test_glsl.py | 16 3 files changed, 19 insertions(+), 14 deletions(-) -- 2.14.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] tox: stick to pytest 3.2.5
This is: Reviewed-by: Andres Gomez <ago...@igalia.com> On Mon, 2017-12-18 at 13:45 +0100, Juan A. Suarez Romero wrote: > Newer pytest versions (>=3.3.) require new versions of PythonSix > (>=1.10.0). > > We want to keep the current PythonSix version required by piglit. > > So le'ts keep using a pytest version that doesn't force us to increase > PythonSix. > --- > tox.ini | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tox.ini b/tox.ini > index c1b7a0104..12e8abd9f 100644 > --- a/tox.ini > +++ b/tox.ini > @@ -20,7 +20,7 @@ deps = > py27-accel-nix: backports.lzma > py27-accel-nix: subprocess32 > py{35,36}: mako==1.0.2 > -pytest>=3.0.3 > +pytest==3.2.5 > pytest-mock > pytest-pythonpath > pytest-raises -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] tox: pytest requires python != 3.3
The message should state why we do this. The reason is that python3.3 is not supported any more by the installed 3.3.1 version of pytest, since we don't force a maximum version any more after 2b0a9cc7a. On Fri, 2017-12-15 at 11:57 +0100, Juan A. Suarez Romero wrote: > Let's remove python3.3 support. > --- > .travis.yml | 2 -- > tox.ini | 4 ++-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/.travis.yml b/.travis.yml > index 1d6c954f5..5e6011f6d 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -4,8 +4,6 @@ matrix: >include: > - python: 2.7 >env: TOX_ENV="py27-{noaccel,accel-nix,streams}" > -- python: 3.3 > - env: TOX_ENV="py33-{noaccel,accel-nix,streams}" > - python: 3.4 >env: TOX_ENV="py34-{noaccel,accel-nix,streams}" > - python: 3.5 > diff --git a/tox.ini b/tox.ini > index 2bd99f544..562095a12 100644 > --- a/tox.ini > +++ b/tox.ini > @@ -1,5 +1,5 @@ > [tox] > -envlist = py{27,33,34,35,36}-{generator,noaccel}, > py{27,33,34,35,36}-accel-{win,nix}, py{27,33,34,35,36}-streams > +envlist = py{27,34,35,36}-{generator,noaccel}, > py{27,34,35,36}-accel-{win,nix}, py{27,34,35,36}-streams > skipsdist = True > > [pytest] > @@ -16,7 +16,7 @@ deps = > accel: simplejson > generator: numpy==1.7.0 > mock==1.0.1 > -py27-accel-nix,py{33,34,35,36}-{accel,noaccel}: psutil > +py27-accel-nix,py{34,35,36}-{accel,noaccel}: psutil > py27-accel-nix: backports.lzma > py27-accel-nix: subprocess32 > py{35,36}: mako==1.0.2 -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] tox: use six >= 1.10.0
On Fri, 2017-12-15 at 11:57 +0100, Juan A. Suarez Romero wrote: > --- > tox.ini | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tox.ini b/tox.ini > index c1b7a0104..2bd99f544 100644 > --- a/tox.ini > +++ b/tox.ini > @@ -27,7 +27,7 @@ deps = > pytest-warnings > pytest-timeout > py{27,33,34}: mako==0.8.0 > -six==1.5.2 > +six>=1.10.0 It feels safer to me just to remove the explicit version dependency. pytest is already demanding a specific minimum version so, if it is available, it should be already installed in the first place, isn't it? -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] unittests: test WflInfo in its own module and correct depending ones
Fixes: edc41a1db ("framework: move WflInfo class into new wflinfo.py module") Cc: Brian Paul <bri...@vmware.com> Cc: Dylan Baker <dylanx.c.ba...@intel.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- unittests/framework/test/test_glsl_parser_test.py | 2 +- unittests/framework/test/test_opengl.py | 363 +--- unittests/framework/test_wflinfo.py | 389 ++ 3 files changed, 395 insertions(+), 359 deletions(-) create mode 100644 unittests/framework/test_wflinfo.py diff --git a/unittests/framework/test/test_glsl_parser_test.py b/unittests/framework/test/test_glsl_parser_test.py index 124f3e9e9..d252e27bc 100644 --- a/unittests/framework/test/test_glsl_parser_test.py +++ b/unittests/framework/test/test_glsl_parser_test.py @@ -55,7 +55,7 @@ class _Setup(object): self.patchers = [ mock.patch('framework.test.glsl_parser_test._HAS_GL_BIN', True), mock.patch('framework.test.glsl_parser_test._HAS_GLES_BIN', True), -mock.patch.dict('framework.test.opengl.OPTIONS.env', +mock.patch.dict('framework.wflinfo.OPTIONS.env', {'PIGLIT_PLATFORM': 'foo'}), ] diff --git a/unittests/framework/test/test_opengl.py b/unittests/framework/test/test_opengl.py index a3974081a..59024edf1 100644 --- a/unittests/framework/test/test_opengl.py +++ b/unittests/framework/test/test_opengl.py @@ -23,8 +23,6 @@ from __future__ import ( absolute_import, division, print_function, unicode_literals ) -import subprocess -import textwrap try: from unittest import mock except ImportError: @@ -32,6 +30,7 @@ except ImportError: import pytest +from framework import wflinfo from framework.test import opengl from framework.test.base import TestIsSkip as _TestIsSkip @@ -40,365 +39,13 @@ from .. import utils # pylint: disable=no-self-use,attribute-defined-outside-init,protected-access -def _has_wflinfo(): -"""Return True if wflinfo is available in PATH.""" -try: -subprocess.check_call(['wflinfo', '--help']) -except subprocess.CalledProcessError: -return False -except OSError as e: -if e.errno != 2: -raise -return False -return True - - -@pytest.mark.skipif(not _has_wflinfo(), reason="Tests require wflinfo binary.") -class TestWflInfo(object): -"""Tests for the WflInfo class.""" - -class TestAttributes(object): -"""test for attribute assignments.""" - -@pytest.yield_fixture(autouse=True) -def patch(self): -"""Mock a few things for testing purposes.""" -# This is pretty ugly, but as a Borb with a private shared state, -# the only way to test this module is to actually replace the -# shared_state with a mock value so it's reset after each test -with mock.patch.dict('framework.test.opengl.OPTIONS.env', - {'PIGLIT_PLATFORM': 'foo'}), \ -mock.patch( -'framework.test.opengl.WflInfo._WflInfo__shared_state', -{}): -yield - -def setup(self): -"""Setup each instance, patching necissary bits.""" -self._test = opengl.WflInfo() - -def test_gl_extension(self): -"""test.opengl.WflInfo.gl_extensions: Provides list of gl -extensions. -""" -rv = (b'foo\nbar\nboink\nOpenGL extensions: ' - b'GL_foobar GL_ham_sandwhich\n') -expected = set(['GL_foobar', 'GL_ham_sandwhich']) - -with mock.patch('framework.test.opengl.subprocess.check_output', -mock.Mock(return_value=rv)): -assert self._test.gl_extensions == expected - -def test_gl_version(self): -"""test.opengl.WflInfo.gl_version: Provides a version number.""" -rv = textwrap.dedent("""\ -Waffle platform: gbm -Waffle api: gl -OpenGL vendor string: Intel Open Source Technology Center -OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile -OpenGL version string: 18 (Core Profile) Mesa 11.0.4 -OpenGL context flags: 0x0 -""").encode('utf-8') -with mock.patch('framework.test.opengl.subprocess.check_output', -mock.Mock(return_value=rv)): -assert self._test.gl_version == 18.0 - -def test_gles_version(self): -"""test.opengl.WflInfo.gles_version: Provides a version number.""" -rv =
[Piglit] [PATCH] unittests: include new elapsed time from the console summary output
Fixes: e76ecd048 ("framework: also print elapsed time with piglit-summary.py") Cc: Brian Paul <bri...@vmware.com> Cc: Dylan Baker <dylanx.c.ba...@intel.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- unittests/framework/summary/test_console.py | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/unittests/framework/summary/test_console.py b/unittests/framework/summary/test_console.py index 0f7b06772..6e6ae8a7d 100644 --- a/unittests/framework/summary/test_console.py +++ b/unittests/framework/summary/test_console.py @@ -53,6 +53,7 @@ _ENUMS = { 13: 'fixes', 14: 'regressions', 15: 'total', +16: 'time', } class TestPrintSummary(object): @@ -67,11 +68,11 @@ class TestPrintSummary(object): """ names = [grouptools.join('foo', 'bar', 'oink', 'foobar', 'boink'), 'foo', 'bar'] -template = '{: >20.20} {: >6.6}' +template = '{: >20.20} {: >12.12}' expected = console_._SUMMARY_TEMPLATE.format( -names=' '.join(['this is a really rea', 'a name']), -divider=' '.join(['', '--']), +names=' '.join(['this is a really rea', 'another name']), +divider=' '.join(['', '']), pass_=template.format('1', '2'), fail=template.format('2', '0'), crash=template.format('0', '0'), @@ -84,7 +85,8 @@ class TestPrintSummary(object): changes=template.format('0', '2'), fixes=template.format('0', '1'), regressions=template.format('0', '0'), -total=template.format('3', '3')).split('\n') +total=template.format('3', '3'), +time=template.format('00:01:39', '02:14:05')).split('\n') res1 = results.TestrunResult() res1.name = 'this is a really really really really long name' @@ -92,14 +94,16 @@ class TestPrintSummary(object): res1.tests[names[1]] = results.TestResult('fail') res1.tests[names[2]] = results.TestResult('notrun') res1.tests[names[2]].subtests['1'] = 'fail' +res1.time_elapsed = results.TimeAttribute(1509747121.4873962, 1509747220.544042) res1.calculate_group_totals() res2 = results.TestrunResult() -res2.name = 'a name' +res2.name = 'another name' res2.tests[names[0]] = results.TestResult('pass') res2.tests[names[1]] = results.TestResult('pass') res2.tests[names[2]] = results.TestResult('notrun') res2.tests[names[2]].subtests['1'] = 'skip' +res2.time_elapsed = results.TimeAttribute(1464820707.4581327, 1464828753.201948) res2.calculate_group_totals() reses = common.Results([res1, res2]) -- 2.14.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] Revert "tests: Update integration for khronos CTS runner."
This reverts commit 1f93e29d853c0dc9ee1a22bb7e6366b6eb8d5ac7. This broke backwards compatibility with already released API-specific test sets. Signed-off-by: Andres Gomez <ago...@igalia.com> --- tests/cts_gl.py | 20 ++-- tests/cts_gl45.py | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/cts_gl.py b/tests/cts_gl.py index a40b0b369..d650ffd4b 100644 --- a/tests/cts_gl.py +++ b/tests/cts_gl.py @@ -69,24 +69,24 @@ class DEQPCTSTest(deqp.DEQPBaseTest): profile = deqp.make_profile( # pylint: disable=invalid-name itertools.chain( deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL30-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL30-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL31-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL31-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL32-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL32-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL33-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL33-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL40-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL40-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL41-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL41-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL42-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL42-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL43-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL43-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL44-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL44-CTS-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL45-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS-cases.txt', _EXTRA_ARGS)), ), DEQPCTSTest) diff --git a/tests/cts_gl45.py b/tests/cts_gl45.py index 580c8760a..2782e18f4 100644 --- a/tests/cts_gl45.py +++ b/tests/cts_gl45.py @@ -63,6 +63,6 @@ class DEQPCTSTest(deqp.DEQPBaseTest): profile = deqp.make_profile( # pylint: disable=invalid-name itertools.chain( deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL45-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS-cases.txt', _EXTRA_ARGS)), ), DEQPCTSTest) -- 2.11.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 0/2] Rewind the changes to the Khronos GL CTS profiles
Recently I added some changes in the cts_gl* profiles to adapt to renames in the opensourced Khronos CTS at: https://github.com/KhronosGroup/VK-GL-CTS Unfortunately, I didn't foresee that this change would break backward compatibility with previous CTS releases and with branches created for API-specific release, as explained at: https://github.com/KhronosGroup/VK-GL-CTS/wiki/Contributing#branches Now, we revert the changes and provide 2 new profiles to use with the renamed tests. Andres Gomez (2): Revert "tests: Update integration for khronos CTS runner." tests: Added a couple of new test profies for the Khronos CTS runner tests/cts_gl.py | 20 ++-- tests/cts_gl45.py | 2 +- tests/khr_gl.py | 93 +++ tests/khr_gl45.py | 69 + 4 files changed, 173 insertions(+), 11 deletions(-) create mode 100644 tests/khr_gl.py create mode 100644 tests/khr_gl45.py -- 2.11.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] tests: Update integration for khronos CTS runner.
After: https://github.com/KhronosGroup/VK-GL-CTS/commit/af8c22a343ee2c230488f6de71b36dc3070b2024 OpenGL GL*-CTS case lists have been renamed to KHR-GL*. Signed-off-by: Andres Gomez <ago...@igalia.com> --- tests/cts_gl.py | 20 ++-- tests/cts_gl45.py | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/cts_gl.py b/tests/cts_gl.py index d650ffd4b..a40b0b369 100644 --- a/tests/cts_gl.py +++ b/tests/cts_gl.py @@ -69,24 +69,24 @@ class DEQPCTSTest(deqp.DEQPBaseTest): profile = deqp.make_profile( # pylint: disable=invalid-name itertools.chain( deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL30-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL30-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL31-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL31-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL32-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL32-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL33-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL33-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL40-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL40-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL41-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL41-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL42-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL42-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL43-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL43-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL44-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL44-cases.txt', _EXTRA_ARGS)), deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL45-cases.txt', _EXTRA_ARGS)), ), DEQPCTSTest) diff --git a/tests/cts_gl45.py b/tests/cts_gl45.py index 2782e18f4..580c8760a 100644 --- a/tests/cts_gl45.py +++ b/tests/cts_gl45.py @@ -63,6 +63,6 @@ class DEQPCTSTest(deqp.DEQPBaseTest): profile = deqp.make_profile( # pylint: disable=invalid-name itertools.chain( deqp.iter_deqp_test_cases( -deqp.gen_caselist_txt(_CTS_BIN, 'GL45-CTS-cases.txt', _EXTRA_ARGS)), +deqp.gen_caselist_txt(_CTS_BIN, 'KHR-GL45-cases.txt', _EXTRA_ARGS)), ), DEQPCTSTest) -- 2.11.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-1.50: instance name is not used to match UBO/SSBOs shader interfaces
On Tue, 2017-03-28 at 08:57 +1100, Timothy Arceri wrote: ... > With the remaining tests reworded in a similar way this patch is: > > Acked-by: Timothy Arceri> Thanks a lot for checking this. I've reworded the comments and this patch has already landed. -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] arb_shader_atomic_counters: check different binding points
On Tue, 2017-03-07 at 13:20 -0800, Francisco Jerez wrote: > Andres Gomez <ago...@igalia.com> writes: > > > This adds a test to check that a link error is expected when > > specifying different binding points among compilation units for atomic > > counters with the same name. > > > > From the ARB_shader_atomic_counters spec: > > > > " It is legal for some shaders to provide a layout qualifier for a > > uniform variable of the same name, while another shader does not > > provide a layout qualifier for a uniform variable of the same > > name, but if provided, all provided layout qualifiers must be > > equal for a uniform variable of the same name, and if not > > provided, all implicitly provided layout qualifiers must be equal > > for a uniform variable of the same name." > > > > v2: Added GL minimum version restriction. > > > > Signed-off-by: Andres Gomez <ago...@igalia.com> > > Cc: Francisco Jerez <curroje...@riseup.net> > > Cc: Ian Romanick <ian.d.roman...@intel.com> > > --- > > .../different-bindings-atomic-counter.shader_test | 51 > > ++ > > 1 file changed, 51 insertions(+) > > create mode 100644 > > tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test > > > > diff --git > > a/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test > > > > b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test > > new file mode 100644 > > index 0..b331650cc > > --- /dev/null > > +++ > > b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test > > @@ -0,0 +1,51 @@ > > +/* The ARB_shader_atomic_counters says: > > + * > > + * "It is legal for some shaders to provide a layout qualifier for > > + * a uniform variable of the same name, while another shader does > > + * not provide a layout qualifier for a uniform variable of the > > + * same name, but if provided, all provided layout qualifiers > > + * must be equal for a uniform variable of the same name, and if > > + * not provided, all implicitly provided layout qualifiers must > > + * be equal for a uniform variable of the same name." > > + * > > + * Verify that a link error happens when using different binding > > + * points for an atomic counter with the same name in different > > + * compilation units. > > + */ > > + > > +[require] > > +GL >= 3.00 > > The GL version specification seems inconsistent with the GLSL version > specified below, I think you want to ask for 3.1 here, with that fixed: Thanks! Updated and pushed ☺ -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glsl-1.50: instance name is not used to match UBO/SSBOs shader interfaces
This adds tests to check that no link error occurs when two differently named but equally instanced interface blocks differ in some way. From page 35 (page 41 of the PDF) of the GLSL 1.50, v11, spec: "The block name (block-name) is used to match interfaces: an output block of one pipeline stage will be matched to an input block with the same name in the subsequent pipeline stage. For uniform blocks, the application uses the block name to identify the block. ... Outside the shading language (i.e., in the API), members are similarly identified except the block name is always used in place of the instance name (API accesses are to interfaces, not to shaders)." Signed-off-by: Andres Gomez <ago...@igalia.com> Cc: Timothy Arceri <tarc...@itsqueeze.com> --- ...age-blocks-align-qualifier-mismatch.shader_test | 54 + ...cks-member-align-qualifier-mismatch.shader_test | 54 + ...orm-blocks-align-qualifier-mismatch.shader_test | 51 ...cks-member-align-qualifier-mismatch.shader_test | 51 ...ks-member-offset-qualifier-mismatch.shader_test | 54 + ...ks-member-offset-qualifier-mismatch.shader_test | 51 ...-storage-blocks-array-size-mismatch.shader_test | 54 + ...e-blocks-binding-qualifier-mismatch.shader_test | 55 ++ ...e-blocks-member-array-size-mismatch.shader_test | 52 ...torage-blocks-member-count-mismatch.shader_test | 53 + ...storage-blocks-member-name-mismatch.shader_test | 52 ...torage-blocks-member-order-mismatch.shader_test | 54 + ...ge-blocks-member-qualifier-mismatch.shader_test | 52 ...storage-blocks-member-type-mismatch.shader_test | 52 ...ge-blocks-memory-qualifier-mismatch.shader_test | 52 ...blocks-packaging-qualifier-mismatch.shader_test | 52 ...m-blocks-binding-qualifier-mismatch.shader_test | 52 ...-uniform-blocks-array-size-mismatch.shader_test | 50 ...m-blocks-member-array-size-mismatch.shader_test | 48 +++ ...niform-blocks-member-count-mismatch.shader_test | 49 +++ ...uniform-blocks-member-name-mismatch.shader_test | 48 +++ ...niform-blocks-member-order-mismatch.shader_test | 50 ...rm-blocks-member-qualifier-mismatch.shader_test | 48 +++ ...uniform-blocks-member-type-mismatch.shader_test | 48 +++ ...rm-blocks-memory-qualifier-mismatch.shader_test | 48 +++ ...blocks-packaging-qualifier-mismatch.shader_test | 48 +++ 26 files changed, 1332 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-align-qualifier-mismatch.shader_test create mode 100644 tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-member-align-qualifier-mismatch.shader_test create mode 100644 tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-align-qualifier-mismatch.shader_test create mode 100644 tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-member-align-qualifier-mismatch.shader_test create mode 100644 tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-shader-storage-blocks-member-offset-qualifier-mismatch.shader_test create mode 100644 tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-uniform-blocks-member-offset-qualifier-mismatch.shader_test create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-array-size-mismatch.shader_test create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-qualifier-mismatch.shader_test create mode 100644 tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-type-mismatch.shader_te
[Piglit] [PATCH v2 0/2] check different binding points with UBOs, SSBOs and Opaque-Uniforms
From page 93 (page 110 of the PDF) of the GL 4.2 (Core Profile) spec: " 2.11.7 Uniform Variables ... Uniform Blocks ... When a named uniform block is declared by multiple shaders in a program, it must be declared identically in each shader. The uniforms within the block must be declared with the same names and types, and in the same order. If a program contains multiple shaders with different declarations for the same named uniform block differs between shader, the program will fail to link." From page 129 (page 150 of the PDF) of the GL 4.3 (Core Profile) spec: " 7.8 Shader Buffer Variables and Shader Storage Blocks ... When a named shader storage block is declared by multiple shaders in a program, it must be declared identically in each shader. The buffer variables within the block must be declared with the same names, types, qualification, and declaration order. If a program contains multiple shaders with different declarations for the same named shader storage block, the program will fail to link." From page 60 (page 66 of the PDF) of the GLSL 4.20 spec, v11: " A link error will result if two compilation units in a program specify different integer-constant bindings for the same opaque-uniform name. However, it is not an error to specify a binding on some but not all declarations for the same name, as shown in the examples below." This patch series adds tests to check that a link error is expected when specifying different binding points for matching Uniform Blocks, Shader Storage Blocks or Opaque-Uniforms across multiple compilation units. Andres Gomez (2): arb_shading_language_420pack: check different binding points arb_shader_atomic_counters: check different binding points .../different-bindings-atomic-counter.shader_test | 51 .../linker/different-bindings-image2D.shader_test | 57 ++ .../different-bindings-sampler2D.shader_test | 53 + ...ngs-shader-storage-blocks-instanced.shader_test | 66 + ...rent-bindings-shader-storage-blocks.shader_test | 66 + ...t-bindings-uniform-blocks-instanced.shader_test | 69 ++ .../different-bindings-uniform-blocks.shader_test | 69 ++ 7 files changed, 431 insertions(+) create mode 100644 tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-sampler2D.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-shader-storage-blocks-instanced.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-shader-storage-blocks.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-uniform-blocks-instanced.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-uniform-blocks.shader_test -- 2.11.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] arb_shader_atomic_counters: check different binding points
This adds a test to check that a link error is expected when specifying different binding points among compilation units for atomic counters with the same name. From the ARB_shader_atomic_counters spec: " It is legal for some shaders to provide a layout qualifier for a uniform variable of the same name, while another shader does not provide a layout qualifier for a uniform variable of the same name, but if provided, all provided layout qualifiers must be equal for a uniform variable of the same name, and if not provided, all implicitly provided layout qualifiers must be equal for a uniform variable of the same name." v2: Added GL minimum version restriction. Signed-off-by: Andres Gomez <ago...@igalia.com> Cc: Francisco Jerez <curroje...@riseup.net> Cc: Ian Romanick <ian.d.roman...@intel.com> --- .../different-bindings-atomic-counter.shader_test | 51 ++ 1 file changed, 51 insertions(+) create mode 100644 tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test diff --git a/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test new file mode 100644 index 0..b331650cc --- /dev/null +++ b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test @@ -0,0 +1,51 @@ +/* The ARB_shader_atomic_counters says: + * + * "It is legal for some shaders to provide a layout qualifier for + * a uniform variable of the same name, while another shader does + * not provide a layout qualifier for a uniform variable of the + * same name, but if provided, all provided layout qualifiers + * must be equal for a uniform variable of the same name, and if + * not provided, all implicitly provided layout qualifiers must + * be equal for a uniform variable of the same name." + * + * Verify that a link error happens when using different binding + * points for an atomic counter with the same name in different + * compilation units. + */ + +[require] +GL >= 3.00 +GLSL >= 1.40 +GL_ARB_shader_atomic_counters + +[vertex shader] +#version 140 +#extension GL_ARB_shader_atomic_counters: require + +layout (binding = 0) uniform atomic_uint x; + +in vec4 piglit_vertex; +out vec4 vs_fs; + +void main() +{ + vs_fs = vec4(atomicCounter(x)); + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 140 +#extension GL_ARB_shader_atomic_counters: require + +layout (binding = 1) uniform atomic_uint x; + +in vec4 vs_fs; +out vec4 fs_out; + +void main() +{ + fs_out = vs_fs * atomicCounter(x); +} + +[test] +link error -- 2.11.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] arb_shading_language_420pack: check different binding points
This adds tests to check that a link error is expected when specifying different binding points for matching Uniform Blocks, Shader Storage Blocks or Opaque-Uniforms across multiple compilation units. From page 93 (page 110 of the PDF) of the GL 4.2 (Core Profile) spec: " 2.11.7 Uniform Variables ... Uniform Blocks ... When a named uniform block is declared by multiple shaders in a program, it must be declared identically in each shader. The uniforms within the block must be declared with the same names and types, and in the same order. If a program contains multiple shaders with different declarations for the same named uniform block differs between shader, the program will fail to link." From page 129 (page 150 of the PDF) of the GL 4.3 (Core Profile) spec: " 7.8 Shader Buffer Variables and Shader Storage Blocks ... When a named shader storage block is declared by multiple shaders in a program, it must be declared identically in each shader. The buffer variables within the block must be declared with the same names, types, qualification, and declaration order. If a program contains multiple shaders with different declarations for the same named shader storage block, the program will fail to link." From page 60 (page 66 of the PDF) of the GLSL 4.20 spec, v11: " A link error will result if two compilation units in a program specify different integer-constant bindings for the same opaque-uniform name. However, it is not an error to specify a binding on some but not all declarations for the same name, as shown in the examples below." Although these restrictions are not included in the ARB_shading_language_420pack spec, it is reasonable to believe that it applies to it too. v2: - Added GL minimum version restrictions. - Corrected GLSL minimum version restrictions. - Corrected the outcome and documentation for the linking failures on UBOs and SSBOs. - Added tests for UBOs and SSBOs without instance names. Signed-off-by: Andres Gomez <ago...@igalia.com> Cc: Matt Turner <matts...@gmail.com> Cc: Ian Romanick <ian.d.roman...@intel.com> --- .../linker/different-bindings-image2D.shader_test | 57 ++ .../different-bindings-sampler2D.shader_test | 53 + ...ngs-shader-storage-blocks-instanced.shader_test | 66 + ...rent-bindings-shader-storage-blocks.shader_test | 66 + ...t-bindings-uniform-blocks-instanced.shader_test | 69 ++ .../different-bindings-uniform-blocks.shader_test | 69 ++ 6 files changed, 380 insertions(+) create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-sampler2D.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-shader-storage-blocks-instanced.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-shader-storage-blocks.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-uniform-blocks-instanced.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-uniform-blocks.shader_test diff --git a/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test b/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test new file mode 100644 index 0..27ccda57b --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test @@ -0,0 +1,57 @@ +/* The GLSL 4.20 spec, v11, says: + * + * "A link error will result if two compilation units in a program + * specify different integer-constant bindings for the same + * opaque-uniform name. However, it is not an error to specify a + * binding on some but not all declarations for the same name, as + * shown in the examples below." + * + * Although this restriction is not included in the + * ARB_shading_language_420pack spec, it is reasonable to believe that + * it applies to it too. + * + * Verify that a link error happens when using different binding + * points for an opaque type (image2D) with the same name in + * different compilation units. + */ + +[require] +GL >= 3.00 +GLSL >= 1.30 +GL_ARB_shading_language_420pack +GL_ARB_shader_image_load_store + +[vertex shader] +#version 130 +#extension GL_ARB_shading_language_420pack: require +#extension GL_ARB_shader_image_load_store: require + +layout (rgba8, binding = 0) uniform image2D img; + +in vec4 piglit_vertex; +out vec4 vs_fs; + +void main() +{ + vs_fs = imageLoad(img, ivec2(gl_Vertex.xy)); + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 130
Re: [Piglit] [PATCH] gles-es-3.10: unsized-array-not-in-last-position
Reviewed-by: Andres Gomez <ago...@igalia.com> On Fri, 2017-02-10 at 14:15 +0100, Jose Maria Casanova Crespo wrote: > From GLSL ES 3.10 spec, section 4.1.9 "Arrays": > > "If an array is declared as the last member of a shader storage block > and the size is not specified at compile-time, it is sized at run-time. > In all other cases, arrays are sized only at compile-time." > > Signed-off-by: Jose Maria Casanova Crespo <jmcasan...@igalia.com> > --- > .../unsized-array-not-in-last-position.comp | 21 > + > 1 file changed, 21 insertions(+) > create mode 100644 > tests/spec/glsl-es-3.10/compiler/unsized-array-not-in-last-position.comp > > diff --git > a/tests/spec/glsl-es-3.10/compiler/unsized-array-not-in-last-position.comp > b/tests/spec/glsl-es-3.10/compiler/unsized-array-not-in-last-position.comp > new file mode 100644 > index 000..fc9219d > --- /dev/null > +++ b/tests/spec/glsl-es-3.10/compiler/unsized-array-not-in-last-position.comp > @@ -0,0 +1,21 @@ > +// [config] > +// expect_result: fail > +// glsl_version: 3.10 es > +// [end config] > + > +#version 310 es > + > +/* From GLSL ES 3.10 spec, section 4.1.9 "Arrays": > + * > + * "If an array is declared as the last member of a shader storage block > + * and the size is not specified at compile-time, it is sized at run-time. > + * In all other cases, arrays are sized only at compile-time." > + */ > + > +buffer ssbo { > + int c[]; > + vec4 d; > +}; > + > +void main(void) { > +} -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] arb_shader_atomic_counters: check different binding points
This adds a test to check that a link error is expected when specifying different binding points among compilation units for atomic counters with the same name. From the ARB_shader_atomic_counters spec: " It is legal for some shaders to provide a layout qualifier for a uniform variable of the same name, while another shader does not provide a layout qualifier for a uniform variable of the same name, but if provided, all provided layout qualifiers must be equal for a uniform variable of the same name, and if not provided, all implicitly provided layout qualifiers must be equal for a uniform variable of the same name." Signed-off-by: Andres Gomez <ago...@igalia.com> Cc: Francisco Jerez <curroje...@riseup.net> Cc: Kenneth Graunke <kenn...@whitecape.org> --- .../different-bindings-atomic-counter.shader_test | 50 ++ 1 file changed, 50 insertions(+) create mode 100644 tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test diff --git a/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test new file mode 100644 index 0..6e7c77488 --- /dev/null +++ b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test @@ -0,0 +1,50 @@ +/* The ARB_shader_atomic_counters says: + * + * "It is legal for some shaders to provide a layout qualifier for + * a uniform variable of the same name, while another shader does + * not provide a layout qualifier for a uniform variable of the + * same name, but if provided, all provided layout qualifiers + * must be equal for a uniform variable of the same name, and if + * not provided, all implicitly provided layout qualifiers must + * be equal for a uniform variable of the same name." + * + * Verify that a link error happens when using different binding + * points for an atomic counter with the same name in different + * compilation units. + */ + +[require] +GLSL >= 1.40 +GL_ARB_shader_atomic_counters + +[vertex shader] +#version 140 +#extension GL_ARB_shader_atomic_counters: require + +layout (binding = 0) uniform atomic_uint x; + +in vec4 piglit_vertex; +out vec4 vs_fs; + +void main() +{ + vs_fs = vec4(atomicCounter(x)); + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 140 +#extension GL_ARB_shader_atomic_counters: require + +layout (binding = 1) uniform atomic_uint x; + +in vec4 vs_fs; +out vec4 fs_out; + +void main() +{ + fs_out = vs_fs * atomicCounter(x); +} + +[test] +link error -- 2.11.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 0/2] check different binding points with UBOs, SSBOs and Opaque-Uniforms
From page 60 (page 66 of the PDF) of the GLSL 4.20 spec, v11: " A link error will result if two compilation units in a program specify different integer-constant bindings for the same opaque-uniform name. However, it is not an error to specify a binding on some but not all declarations for the same name, as shown in the examples below." This patch series adds tests to check that, in the case of Uniform Blocks and Shader Storage Blocks, it is allowed to specify different binding points among the compilation units for blocks with the same name while, in the case of Opaque-Uniforms, a link error is expected. Andres Gomez (2): arb_shading_language_420pack: check different binding points arb_shader_atomic_counters: check different binding points .../different-bindings-atomic-counter.shader_test | 50 ++ .../linker/different-bindings-image2D.shader_test | 56 .../different-bindings-sampler2D.shader_test | 53 +++ ...rent-bindings-shader-storage-blocks.shader_test | 59 ++ .../different-bindings-uniform-blocks.shader_test | 56 5 files changed, 274 insertions(+) create mode 100644 tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-sampler2D.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-shader-storage-blocks.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-uniform-blocks.shader_test -- 2.11.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] arb_shading_language_420pack: check different binding points
This adds tests to check that, in the case of Uniform Blocks and Shader Storage Blocks, it is allowed to specify different binding points among the compilation units for blocks with the same name while, in the case of Opaque-Uniforms, a link error is expected. From page 60 (page 66 of the PDF) of the GLSL 4.20 spec, v11: " A link error will result if two compilation units in a program specify different integer-constant bindings for the same opaque-uniform name. However, it is not an error to specify a binding on some but not all declarations for the same name, as shown in the examples below." Although this restriction is not included in the ARB_shading_language_420pack spec, it is reasonable to believe that it applies to it too. Signed-off-by: Andres Gomez <ago...@igalia.com> Cc: Matt Turner <matts...@gmail.com> Cc: Kenneth Graunke <kenn...@whitecape.org> --- .../linker/different-bindings-image2D.shader_test | 56 .../different-bindings-sampler2D.shader_test | 53 +++ ...rent-bindings-shader-storage-blocks.shader_test | 59 ++ .../different-bindings-uniform-blocks.shader_test | 56 4 files changed, 224 insertions(+) create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-sampler2D.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-shader-storage-blocks.shader_test create mode 100644 tests/spec/arb_shading_language_420pack/linker/different-bindings-uniform-blocks.shader_test diff --git a/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test b/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test new file mode 100644 index 0..97579678e --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test @@ -0,0 +1,56 @@ +/* The GLSL 4.20 spec, v11, says: + * + * "A link error will result if two compilation units in a program + * specify different integer-constant bindings for the same + * opaque-uniform name. However, it is not an error to specify a + * binding on some but not all declarations for the same name, as + * shown in the examples below." + * + * Although this restriction is not included in the + * ARB_shading_language_420pack spec, it is reasonable to believe that + * it applies to it too. + * + * Verify that a link error happens when using different binding + * points for an opaque type (image2D) with the same name in + * different compilation units. + */ + +[require] +GLSL >= 1.30 +GL_ARB_shading_language_420pack +GL_ARB_shader_image_load_store + +[vertex shader] +#version 130 +#extension GL_ARB_shading_language_420pack: require +#extension GL_ARB_shader_image_load_store: require + +layout (rgba8, binding = 0) uniform image2D img; + +in vec4 piglit_vertex; +out vec4 vs_fs; + +void main() +{ + vs_fs = imageLoad(img, ivec2(gl_Vertex.xy)); + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 130 +#extension GL_ARB_shading_language_420pack: require +#extension GL_ARB_shader_image_load_store: require + +layout (rgba8, binding = 1) uniform image2D img; + +uniform ivec4 cst; +in vec4 vs_fs; +out vec4 fs_out; + +void main() +{ + fs_out = vs_fs * imageLoad(img, cst.xy).x; +} + +[test] +link error diff --git a/tests/spec/arb_shading_language_420pack/linker/different-bindings-sampler2D.shader_test b/tests/spec/arb_shading_language_420pack/linker/different-bindings-sampler2D.shader_test new file mode 100644 index 0..37a388be6 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/linker/different-bindings-sampler2D.shader_test @@ -0,0 +1,53 @@ +/* The GLSL 4.20 spec, v11, says: + * + * "A link error will result if two compilation units in a program + * specify different integer-constant bindings for the same + * opaque-uniform name. However, it is not an error to specify a + * binding on some but not all declarations for the same name, as + * shown in the examples below." + * + * Although this restriction is not included in the + * ARB_shading_language_420pack spec, it is reasonable to believe that + * it applies to it too. + * + * Verify that a link error happens when using different binding + * points for an opaque type (sampler2D) with the same name in + * different compilation units. + */ + +[require] +GLSL >= 1.30 +GL_ARB_shading_language_420pack + +[vertex shader] +#version 130 +#extension GL_ARB_shading_language_420pack: require + +layout (binding = 0) uniform sampler2D tex; + +in vec4 piglit_vertex; +out vec4 vs_fs; + +void main() +{ + vs_fs = texture2D(tex, gl_Vertex.xy); + gl_Position = piglit_vertex; +} + +[fragment shader] +#v
Re: [Piglit] [PATCH] tests/quick.py: reduce the number of vs_in tests in quick.py
On Wed, 2016-11-09 at 14:56 -0800, Dylan Baker wrote: > Bump. > > Anyone interested in this? > > As commented, although this is not a definitive solution I suppose this can help in the meanwhile. I'm sorry I didn't contribute a follow up. I got tangled in other tasks and never found time to get to it. In any case, my idea was to reduce the amount of tested cases since I think right now there are probably many tests that check very similar inputs. Additionally, I was thinking on something like this for the quick profile so this works for me. However, maybe a C test could be a better idea, dunno. From my side, this is: Reviewed-by: Andres Gomez <ago...@igalia.com> > > Dylan > > Quoting Dylan Baker (2016-10-31 14:40:35) > > There are 18000 of these tests, quick.py has 53000 tests, which is 34% > > of the total tests. That's just too many for quick.py. > > > > This patch takes the somewhat naive approach of just filtering out 80% > > of those tests from quick.py, which reduces the total number of tests to > > 38000, which makes a pretty big dent in the amount of time it takes to > > run quick.py. The approach is deterministic, but random. > > > > cc: Andres Gomez <ago...@igalia.com> > > Signed-off-by: <dylanx.c.ba...@intel.com> > > --- > > tests/quick.py | 27 +++ > > 1 file changed, 27 insertions(+) > > > > diff --git a/tests/quick.py b/tests/quick.py > > index 0e02f92..5f7250f 100644 > > --- a/tests/quick.py > > +++ b/tests/quick.py > > @@ -1,8 +1,19 @@ > > # -*- coding: utf-8 -*- > > > > +"""A quicker profile than all. > > + > > +This profile filters out a number of very slow tests, and tests that are > > very > > +exhaustively tested, since they add a good deal of runtime to piglit. > > + > > +There are 18000+ auto-generated tests that are exhaustive, but for > > quick.py we > > +don't want that level of exhaustiveness, so this filter removes 80% in a > > random > > +(but deterministic) way. > > +""" > > + > > from __future__ import ( > > absolute_import, division, print_function, unicode_literals > > ) > > +import random > > > > from framework import grouptools > > from framework.test import (GleanTest, PiglitGLTest) > > @@ -13,6 +24,21 @@ __all__ = ['profile'] > > # See the note in all.py about this warning > > # pylint: disable=bad-continuation > > > > + > > +class FilterVsIn(object): > > +"""Filter out 80% of the Vertex Attrib 64 vs_in tests.""" > > + > > +def __init__(self): > > +self.random = random.Random() > > +self.random.seed(42) > > + > > +def __call__(self, name, _): > > +if 'vs_in' in name: > > +# 20% > > +return self.random.random() <= .2 > > +return True > > + > > + > > GleanTest.GLOBAL_PARAMS += ["--quick"] > > > > # Set the --quick flag on a few image_load_store_tests > > @@ -37,3 +63,4 @@ with profile.group_manager( > > > > # These take too long > > profile.filter_tests(lambda n, _: '-explosion' not in n) > > +profile.filter_tests(FilterVsIn()) > > -- > > 2.10.2 > > -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] dir-locals.el: Adds whitespace support
On Tue, 2016-11-08 at 12:59 -0500, Ilia Mirkin wrote: > Could you update the change description to say precisely what each of > these things do? It's hard to review otherwise since I have to go out > and look up the things I don't know or have since forgotten. Done and sent again for review. I hope the changelog is explanatory enough ☺ > > -ilia > > On Sat, Oct 22, 2016 at 5:19 PM, Andres Gomez <ago...@igalia.com> wrote: > > Provides support for highlighting incorrect indentation. > > > > v2: python-mode inherits from prog-mode > > v3: Removed too long lines trail highlighting, as suggested by Ilia > > Mirkin. > > > > Signed-off-by: Andres Gomez <ago...@igalia.com> > > --- > > .dir-locals.el | 17 + > > 1 file changed, 13 insertions(+), 4 deletions(-) > > > > diff --git a/.dir-locals.el b/.dir-locals.el > > index 3bdca17..2a37aaf 100644 > > --- a/.dir-locals.el > > +++ b/.dir-locals.el > > @@ -1,11 +1,20 @@ > > ((nil . ((indent-tabs-mode . t) > > (tab-width . 8) > > -(show-trailing-whitespace . t))) > > +(show-trailing-whitespace . t) > > +(whitespace-style face indentation) > > +(whitespace-line-column . 79))) > > (prog-mode . > > - ((c-file-style . "linux"))) > > + ((c-file-style . "linux") > > +(eval ignore-errors > > + (require 'whitespace) > > + (whitespace-mode 1 > > (cmake-mode . > > -((cmake-tab-width . 8))) > > +((cmake-tab-width . 8) > > + (eval ignore-errors > > + (require 'whitespace) > > + (whitespace-mode 1 > > (python-mode . > > ((indent-tabs-mode . nil) > > - (tab-width . 4))) > > + (tab-width . 4) > > + (whitespace-line-column . 80))) > > ) > > -- > > 2.9.3 > > > > > -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] dir-locals.el: Adds White Space support
The White Space package, which is available since GNU Emacs 22, is loaded and activated locally in prog-mode and cmake-mode. Also, using White Space variables, we set highlighting through faces on wrong indentation and the maximum length of a coding line. Notice that: - The highlighting for the characters beyond the set length of a coding line is not activated by default, only for wrong indentations. - If the White Space package is not available, errors on loading or activation are ignored. - If the White Space mode is not activated the set variables would not have any effect. v2: python-mode inherits from prog-mode v3: Removed too long lines trail highlighting, as suggested by Ilia Mirkin. Signed-off-by: Andres Gomez <ago...@igalia.com> --- .dir-locals.el | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.dir-locals.el b/.dir-locals.el index 3bdca17..2a37aaf 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,11 +1,20 @@ ((nil . ((indent-tabs-mode . t) (tab-width . 8) -(show-trailing-whitespace . t))) +(show-trailing-whitespace . t) +(whitespace-style face indentation) +(whitespace-line-column . 79))) (prog-mode . - ((c-file-style . "linux"))) + ((c-file-style . "linux") +(eval ignore-errors + (require 'whitespace) + (whitespace-mode 1 (cmake-mode . -((cmake-tab-width . 8))) +((cmake-tab-width . 8) + (eval ignore-errors + (require 'whitespace) + (whitespace-mode 1 (python-mode . ((indent-tabs-mode . nil) - (tab-width . 4))) + (tab-width . 4) + (whitespace-line-column . 80))) ) -- 2.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] dir-locals.el: Adds whitespace support
If nobody says otherwise, I will land this by the beginning of next week. On Sun, 2016-10-23 at 00:19 +0300, Andres Gomez wrote: > Provides support for highlighting incorrect indentation. > > v2: python-mode inherits from prog-mode > v3: Removed too long lines trail highlighting, as suggested by Ilia > Mirkin. > > Signed-off-by: Andres Gomez <ago...@igalia.com> > --- > .dir-locals.el | 17 + > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/.dir-locals.el b/.dir-locals.el > index 3bdca17..2a37aaf 100644 > --- a/.dir-locals.el > +++ b/.dir-locals.el > @@ -1,11 +1,20 @@ > ((nil . ((indent-tabs-mode . t) >(tab-width . 8) > - (show-trailing-whitespace . t))) > + (show-trailing-whitespace . t) > + (whitespace-style face indentation) > + (whitespace-line-column . 79))) > (prog-mode . > - ((c-file-style . "linux"))) > + ((c-file-style . "linux") > + (eval ignore-errors > +(require 'whitespace) > +(whitespace-mode 1 > (cmake-mode . > - ((cmake-tab-width . 8))) > + ((cmake-tab-width . 8) > + (eval ignore-errors > + (require 'whitespace) > + (whitespace-mode 1 > (python-mode . > ((indent-tabs-mode . nil) > -(tab-width . 4))) > +(tab-width . 4) > +(whitespace-line-column . 80))) > ) > -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 5/9] arb_enhanced_layouts: More duplicated layout-qualifier-names tests
Added tests for the layout-qualifier-names "max_vertices", "invocations", "vertices", "local_size_[x|y|z]" and "xfb_stride" which may have redeclarations but all of them enforce that a global or variable redeclaration holds the same value than in the previous declaration(s). These tests check that multiple appearances of the same layout-qualifier-name in a single layout qualifier with different values won't trigger a compile/link error. From the ARB_enhanced_layouts spec: "More than one layout qualifier may appear in a single declaration. Additionally, the same layout-qualifier-name can occur multiple times within a layout qualifier or across multiple layout qualifiers in the same declaration. When the same layout-qualifier-name occurs multiple times, in a single declaration, the last occurrence overrides the former occurrence(s). Further, if such a layout-qualifier-name will effect subsequent declarations or other observable behavior, it is only the last occurrence that will have any effect, behaving as if the earlier occurrence(s) within the declaration are not present. This is also true for overriding layout-qualifier-names, where one overrides the other (e.g., row_major vs. column_major); only the last occurrence has any effect." V2: - Removed link check, as suggested by Timothy. - Risen GLSL version from 1.40 to 1.50, needed for default input/output layout declarations. Reviewed-by: Timothy Arceri <timothy.arc...@collabora.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...tion-identifiers-in-single-layout-mismatch.geom | 38 +++ ...le-invocation-identifiers-in-single-layout.geom | 38 +++ ...size-identifiers-in-single-layout-mismatch.comp | 37 ++ ...le-local_size-identifiers-in-single-layout.comp | 37 ++ ...ices-identifiers-in-single-layout-mismatch.geom | 40 ...-max_vertices-identifiers-in-single-layout.geom | 40 ...ices-identifiers-in-single-layout-mismatch.tesc | 39 +++ ...iple-vertices-identifiers-in-single-layout.tesc | 39 +++ ...obal-identifiers-in-single-layout-mismatch.vert | 41 ...-block-global-identifiers-in-single-layout.vert | 41 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++ ..._stride-block-identifiers-in-single-layout.vert | 44 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 37 ++ ...stride-global-identifiers-in-single-layout.vert | 37 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 41 ...dblock-global-identifiers-in-single-layout.vert | 41 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++ ...de-namedblock-identifiers-in-single-layout.vert | 44 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 39 +++ ...riable-global-identifiers-in-single-layout.vert | 39 +++ ...able-identifiers-in-single-layout-mismatch.vert | 39 +++ ...ride-variable-identifiers-in-single-layout.vert | 39 +++ 22 files changed, 878 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout-mismatch.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout-mismatch.comp create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout.comp create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout-mismatch.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout-mismatch.tesc create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout.tesc create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout-mismatch.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-
[Piglit] [PATCH 4/9] arb_shading_language_420pack: More multiple layout qualifiers in a single declaration tests
Added tests for the layout-qualifier-names "max_vertices", "invocations", "vertices" and "local_size_[x|y|z]" which may have redeclarations but all of them enforce that a redeclaration holds the same value than in the previous declaration(s). These tests check that multiple appearances of a layout-qualifier-name across different layout qualifiers with different values in the same declaration won't trigger a compile/link error. From the ARB_shading_language_420pack spec: "More than one layout qualifier may appear in a single declaration. If the same layout-qualifier-name occurs in multiple layout qualifiers for the same declaration, the last one overrides the former ones." V2: Removed link check, as suggested by Timothy. Reviewed-by: Timothy Arceri <timothy.arc...@collabora.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...-invocation-in-single-declaration-mismatch.geom | 31 ++ .../multiple-invocation-in-single-declaration.geom | 29 ...-local_size-in-single-declaration-mismatch.comp | 28 +++ .../multiple-local_size-in-single-declaration.comp | 28 +++ ...ax_vertices-in-single-declaration-mismatch.geom | 31 ++ ...ultiple-max_vertices-in-single-declaration.geom | 31 ++ ...le-vertices-in-single-declaration-mismatch.tesc | 30 + .../multiple-vertices-in-single-declaration.tesc | 30 + 8 files changed, 238 insertions(+) create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration-mismatch.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-local_size-in-single-declaration-mismatch.comp create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-local_size-in-single-declaration.comp create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-max_vertices-in-single-declaration-mismatch.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-max_vertices-in-single-declaration.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-vertices-in-single-declaration-mismatch.tesc create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-vertices-in-single-declaration.tesc diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration-mismatch.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration-mismatch.geom new file mode 100644 index 000..e55f667 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration-mismatch.geom @@ -0,0 +1,31 @@ +// [config] +// expect_result: fail +// glsl_version: 1.50 +// require_extensions: GL_ARB_shading_language_420pack +// check_link: false +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration. If +// the same layout-qualifier-name occurs in multiple layout qualifiers for +// the same declaration, the last one overrides the former ones." +// +// From the ARB_gpu_shader5 spec: +// +//"If an invocation count is declared, all such declarations must +// specify the same count." + +#version 150 +#extension GL_ARB_shading_language_420pack: enable +#extension GL_ARB_gpu_shader5 : enable + +#version 150 + +layout(points, invocations=4) layout(invocations=3) in; +layout(invocations=4) in; +layout(triangle_strip, max_vertices=3) out; + +void main() +{ +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration.geom new file mode 100644 index 000..07a13f7 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration.geom @@ -0,0 +1,29 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// require_extensions: GL_ARB_shading_language_420pack GL_ARB_gpu_shader5 +// check_link: false +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration. If +// the same layout-qualifier-name occurs in multiple layout qualifiers for +// the same declaration, the last one overrides the former ones." +// +// From the ARB_
[Piglit] [PATCH 7/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single output declaration tests
Added tests to check that all the layout-qualifier-ids in more than one layout-qualifier in a single non-variable output declaration are taken into account. The tests check that this works for value and non-value layout-qualifier-ids. From the ARB_shading_language_420pack spec: "More than one layout qualifier may appear in a single declaration." Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...e-layout-qualifier-in-single-declaration-1.geom | 25 ++ ...e-layout-qualifier-in-single-declaration-2.geom | 25 ++ ...e-layout-qualifier-in-single-declaration-3.geom | 25 ++ ...e-layout-qualifier-in-single-declaration-4.geom | 25 ++ 4 files changed, 100 insertions(+) create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-4.geom diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom new file mode 100644 index 000..50cc657 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom @@ -0,0 +1,25 @@ +// [config] +// expect_result: fail +// glsl_version: 1.50 +// require_extensions: GL_ARB_shading_language_420pack +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// From section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says: +// +//"All geometry shader output layout declarations in a program must declare the +// same layout and same value for max_vertices." + +#version 150 +#extension GL_ARB_shading_language_420pack: enable + +layout(lines) in; +layout(triangle_strip) layout(max_vertices=3) out; +layout(points) out; + +void main() +{ +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom new file mode 100644 index 000..11ec500 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom @@ -0,0 +1,25 @@ +// [config] +// expect_result: fail +// glsl_version: 1.50 +// require_extensions: GL_ARB_shading_language_420pack +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// From section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says: +// +//"All geometry shader output layout declarations in a program must declare the +// same layout and same value for max_vertices." + +#version 150 +#extension GL_ARB_shading_language_420pack: enable + +layout(lines) in; +layout(max_vertices=3) layout(triangle_strip) out; +layout(points) out; + +void main() +{ +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom new file mode 100644 index 000..d2cc48b --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom @@ -0,0 +1,25 @@ +// [config] +// expect_result: fail +// glsl_version: 1.50 +// require_extensions: GL_ARB_shading_language_420pack +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// From section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says: +// +//"All geometry shader output layout declarations in a program must declare the +// same layout and same value for max_vertices." + +#version 150 +#extension GL_ARB_shading_language_420pack: enable + +layout(lines) in; +layout(triangle_strip) layout(max_vertices=3) out
[Piglit] [PATCH 6/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single input declaration tests
Added tests to check that all the layout-qualifier-ids in more than one layout-qualifier in a single non-variable input declaration are taken into account. The tests check that this works for value and non-value layout-qualifier-ids. From the ARB_shading_language_420pack spec: "More than one layout qualifier may appear in a single declaration." Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...e-layout-qualifier-in-single-declaration-1.geom | 31 ++ ...e-layout-qualifier-in-single-declaration-2.geom | 31 ++ ...e-layout-qualifier-in-single-declaration-3.geom | 26 ++ ...e-layout-qualifier-in-single-declaration-4.geom | 26 ++ 4 files changed, 114 insertions(+) create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-1.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-2.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-3.geom create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-4.geom diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-1.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-1.geom new file mode 100644 index 000..4e36e3c --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-1.geom @@ -0,0 +1,31 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// require_extensions: GL_ARB_shading_language_420pack GL_ARB_gpu_shader5 +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec says: +// +//"For inputs declared without an array size, including +// intrinsically declared inputs (i.e., gl_in), a layout must be +// declared before any use of the method length() or other array +// use requiring its size be known." + +#version 150 +#extension GL_ARB_shading_language_420pack: enable +#extension GL_ARB_gpu_shader5 : enable + +layout(lines) layout(invocations=4) in; +layout(triangle_strip, max_vertices=3) out; + +in vec4 Color1[]; + +uniform int foo[Color1.length() == 2 ? 1 : -1]; + +void main() +{ +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-2.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-2.geom new file mode 100644 index 000..449d975 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-2.geom @@ -0,0 +1,31 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// require_extensions: GL_ARB_shading_language_420pack GL_ARB_gpu_shader5 +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec says: +// +//"For inputs declared without an array size, including +// intrinsically declared inputs (i.e., gl_in), a layout must be +// declared before any use of the method length() or other array +// use requiring its size be known." + +#version 150 +#extension GL_ARB_shading_language_420pack: enable +#extension GL_ARB_gpu_shader5 : enable + +layout(invocations=4) layout(lines) in; +layout(triangle_strip, max_vertices=3) out; + +in vec4 Color1[]; + +uniform int foo[Color1.length() == 2 ? 1 : -1]; + +void main() +{ +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-3.geom b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-3.geom new file mode 100644 index 000..d07bd97 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-3.geom @@ -0,0 +1,26 @@ +// [config] +// expect_result: fail +// glsl_version: 1.50 +// require_extensions: GL_ARB_shading_language_420pack GL_ARB_gpu_shader5 +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More
[Piglit] [PATCH 9/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single buffer declaration tests
Added tests to check that all the layout-qualifier-ids in more than one layout-qualifier in a single non-variable buffer declaration are taken into account. The tests check that this works for non-value layout-qualifier-ids. So far, there is no value layout-qualifier-ids with which to check. From the ARB_shading_language_420pack spec: "More than one layout qualifier may appear in a single declaration." Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...e-layout-qualifier-in-single-declaration-1.vert | 31 ++ ...e-layout-qualifier-in-single-declaration-2.vert | 31 ++ 2 files changed, 62 insertions(+) create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-1.vert create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-2.vert diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-1.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-1.vert new file mode 100644 index 000..65e6ac6 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-1.vert @@ -0,0 +1,31 @@ +// [config] +// expect_result: pass +// glsl_version: 1.40 +// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// ARB_enhanced_layouts spec says: +// +//"The *align* qualifier can only be used on blocks or block +// members, and only for blocks declared with *std140* or *std430* +// layouts." + +#version 140 +#extension GL_ARB_shading_language_420pack: enable +#extension GL_ARB_enhanced_layouts : enable +#extension GL_ARB_shader_storage_buffer_object : enable + +layout(std140) layout(row_major) buffer; + +layout(align = 32) buffer b { + vec4 var1; + vec4 var2; +}; + +void main() +{ +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-2.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-2.vert new file mode 100644 index 000..65e6ac6 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-2.vert @@ -0,0 +1,31 @@ +// [config] +// expect_result: pass +// glsl_version: 1.40 +// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts GL_ARB_shader_storage_buffer_object +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// ARB_enhanced_layouts spec says: +// +//"The *align* qualifier can only be used on blocks or block +// members, and only for blocks declared with *std140* or *std430* +// layouts." + +#version 140 +#extension GL_ARB_shading_language_420pack: enable +#extension GL_ARB_enhanced_layouts : enable +#extension GL_ARB_shader_storage_buffer_object : enable + +layout(std140) layout(row_major) buffer; + +layout(align = 32) buffer b { + vec4 var1; + vec4 var2; +}; + +void main() +{ +} -- 2.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 8/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single uniform declaration tests
Added tests to check that all the layout-qualifier-ids in more than one layout-qualifier in a single non-variable uniform declaration are taken into account. The tests check that this works for non-value layout-qualifier-ids. So far, there is no value layout-qualifier-ids with which to check. From the ARB_shading_language_420pack spec: "More than one layout qualifier may appear in a single declaration." Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...e-layout-qualifier-in-single-declaration-1.vert | 30 ++ ...e-layout-qualifier-in-single-declaration-2.vert | 30 ++ 2 files changed, 60 insertions(+) create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert create mode 100644 tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert new file mode 100644 index 000..947444f --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert @@ -0,0 +1,30 @@ +// [config] +// expect_result: pass +// glsl_version: 1.40 +// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// ARB_enhanced_layouts spec says: +// +//"The *align* qualifier can only be used on blocks or block +// members, and only for blocks declared with *std140* or *std430* +// layouts." + +#version 140 +#extension GL_ARB_shading_language_420pack: enable +#extension GL_ARB_enhanced_layouts : enable + +layout(std140) layout(row_major) uniform; + +layout(align = 32) uniform block { + vec4 var1; + vec4 var2; +}; + +void main() +{ +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert new file mode 100644 index 000..c82547a --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert @@ -0,0 +1,30 @@ +// [config] +// expect_result: pass +// glsl_version: 1.40 +// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts +// [end config] +// +// From the ARB_shading_language_420pack spec: +// +//"More than one layout qualifier may appear in a single declaration." +// +// ARB_enhanced_layouts spec says: +// +//"The *align* qualifier can only be used on blocks or block +// members, and only for blocks declared with *std140* or *std430* +// layouts." + +#version 140 +#extension GL_ARB_shading_language_420pack: enable +#extension GL_ARB_enhanced_layouts : enable + +layout(row_major) layout(std140) uniform; + +layout(align = 32) uniform block { + vec4 var1; + vec4 var2; +}; + +void main() +{ +} -- 2.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/9] glsl-1.50: Add GS output layout qualifier redeclaration test
Section 4.3.8.2 (Output Layout Qualifiers) of the GLSL 1.50 spec says: "All geometry shader output layout declarations in a program must declare the same layout and same value for max_vertices." V2: Renamed test, as suggested by Timothy. Reviewed-by: Timothy Arceri <timothy.arc...@collabora.com> Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...declaration-per-program-max-verts-mismatch.geom | 22 +++ ...-one-out-declaration-per-program-max-verts.geom | 25 +- 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts-mismatch.geom diff --git a/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts-mismatch.geom b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts-mismatch.geom new file mode 100644 index 000..c3b067f --- /dev/null +++ b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts-mismatch.geom @@ -0,0 +1,22 @@ +// [config] +// expect_result: fail +// glsl_version: 1.50 +// check_link: true +// [end config] +// +// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says: +// "All geometry shader output layout declarations in a program must declare the +// same layout and same value for max_vertices." + +#version 150 + +layout(lines) in; +layout(line_strip, max_vertices=2) out; + +in vec4 pos[]; + +layout(line_strip, max_vertices=3) out; + +void main() +{ +} diff --git a/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom index c3b067f..da8a86c 100644 --- a/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom +++ b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom @@ -1,21 +1,36 @@ // [config] -// expect_result: fail +// expect_result: pass // glsl_version: 1.50 // check_link: true // [end config] // -// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says: -// "All geometry shader output layout declarations in a program must declare the -// same layout and same value for max_vertices." +// Section 4.3.8.2 (Output Layout Qualifiers) of the GLSL 1.50 spec says: +// +//"layout(triangle_strip, max_vertices = 60) out; // order does not matter +// layout(max_vertices = 60) out; // redeclaration okay (*) +// layout(triangle_strip) out;// redeclaration okay (*) +// layout(points) out;// error, contradicts triangle_strip +// layout(max_vertices = 30) out; // error, contradicts 60" +// +//... +// +//"All geometry shader output layout declarations in a program must declare the +// same layout and same value for max_vertices." +// +// This test verifies the case marked with (*), namely that no error +// results from declaring a geometry shader output layout that is +// consistent with a previously declared geometry shader output layout. #version 150 layout(lines) in; -layout(line_strip, max_vertices=2) out; +layout(line_strip, max_vertices=3) out; in vec4 pos[]; layout(line_strip, max_vertices=3) out; +layout(max_vertices=3) out; +layout(line_strip) out; void main() { -- 2.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v2 0/9] More duplicated layout-qualifier-names tests
This series complements the work done for mesa at: https://lists.freedesktop.org/archives/mesa-dev/2016-October/132990.html Briefing, this is a new set of tests that check the ability to support multiple layout-qualifers in a single declaration and that only the right-most appearance of the same layout-qualifier-name, in a single layout-qualifier or across multiple layout-qualifiers in a single declaration is taken into account. The ARB_shading_language_420pack spec adds the support for multiple layout-qualifiers in the same declaration. The ARB_enhanced_layouts spec adds the support to repeat the same layout-qualifier-name inside a single layout-qualifier. The main changes in this v2 series are: Patch 1/9 has been modified renaming the additional test on it. Patches 4/9 and 5/9 have been modified to remove the link check. Patch 5/9 has been modified to check for GLSL 1.50 instead of just 1.40. Old patches 5/7 and 7/7 have been removed, which was testing multiple layout-qualifiers in the same declaration with ARB_enhanced_layouts in addition to ARB_shading_language_420pack. Patches 6/9, 7/9, 8/9 and 9/9 have been added with extra tests. Andres Gomez (9): glsl-1.50: Add GS output layout qualifier redeclaration test arb_tessellation_shader: Add tests for TCS output size redeclaration arb_enhanced_layouts: Add more xfb_stride redeclaration tests arb_shading_language_420pack: More multiple layout qualifiers in a single declaration tests arb_enhanced_layouts: More duplicated layout-qualifier-names tests arb_shading_language_420pack: Adds multiple layout qualifiers in a single input declaration tests arb_shading_language_420pack: Adds multiple layout qualifiers in a single output declaration tests arb_shading_language_420pack: Adds multiple layout qualifiers in a single uniform declaration tests arb_shading_language_420pack: Adds multiple layout qualifiers in a single buffer declaration tests ...tion-identifiers-in-single-layout-mismatch.geom | 38 +++ ...le-invocation-identifiers-in-single-layout.geom | 38 +++ ...size-identifiers-in-single-layout-mismatch.comp | 37 ++ ...le-local_size-identifiers-in-single-layout.comp | 37 ++ ...ices-identifiers-in-single-layout-mismatch.geom | 40 ...-max_vertices-identifiers-in-single-layout.geom | 40 ...ices-identifiers-in-single-layout-mismatch.tesc | 39 +++ ...iple-vertices-identifiers-in-single-layout.tesc | 39 +++ ...obal-identifiers-in-single-layout-mismatch.vert | 41 ...-block-global-identifiers-in-single-layout.vert | 41 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++ ..._stride-block-identifiers-in-single-layout.vert | 44 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 37 ++ ...stride-global-identifiers-in-single-layout.vert | 37 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 41 ...dblock-global-identifiers-in-single-layout.vert | 41 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++ ...de-namedblock-identifiers-in-single-layout.vert | 44 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 39 +++ ...riable-global-identifiers-in-single-layout.vert | 39 +++ ...able-identifiers-in-single-layout-mismatch.vert | 39 +++ ...ride-variable-identifiers-in-single-layout.vert | 39 +++ .../xfb_stride/block-stride-match-global.vert | 31 +++ .../xfb_stride/block-stride-match.vert | 29 ++ .../xfb_stride/block-stride-mismatch-global.vert | 31 +++ .../xfb_stride/block-stride-mismatch.vert | 29 ++ .../xfb_stride/global-stride-match.vert| 22 +++ .../xfb_stride/global-stride-mismatch.vert | 22 +++ .../named-block-stride-match-global.vert | 31 +++ .../xfb_stride/named-block-stride-match.vert | 29 ++ .../named-block-stride-mismatch-global.vert| 31 +++ .../xfb_stride/named-block-stride-mismatch.vert| 29 ++ .../xfb_stride/variable-stride-match-global.vert | 26 + .../xfb_stride/variable-stride-match.vert | 24 .../variable-stride-mismatch-global.vert | 6 +-- .../xfb_stride/variable-stride-mismatch.vert | 6 +-- ...e-layout-qualifier-in-single-declaration-1.vert | 31 +++ ...e-layout-qualifier-in-single-declaration-2.vert | 31 +++ ...e-layout-qualifier-in-single-declaration-1.geom | 31 +++ ...e-layout-qualifier-in-single-declaration-2.geom | 31 +++ ...e-layout-qualifier
Re: [Piglit] [PATCH 5/7] arb_enhanced_layouts: Multiple layout qualifiers in a single declaration tests
On Mon, 2016-10-24 at 11:05 +1100, Timothy Arceri wrote: > On Sat, 2016-10-22 at 23:42 +0300, Andres Gomez wrote: > > We already had tests for a repeated layout-qualifier-name in a single > > layout-qualifier. Now, we also add similar tests to check across > > multiple layout-qualifiers in the same declaration. > > > > From the ARB_enhanced_layouts spec: > > > > "More than one layout qualifier may appear in a single > > declaration. > > Additionally, the same layout-qualifier-name can occur multiple > > times > > within a layout qualifier or across multiple layout qualifiers > > in the > > same declaration" > > > I believe this is just because the spec is written against the GLSL > 4.30 spec. I'm not so sure that enhanced layouts should add this > support. Did you test the Nvidia and Amd binary drivers to see what > they do? I run the tests with the proprietary drivers in a GNU/Linux box. NVidia and AMD are a mess with respect to this. Some pass, some not. My conclusion is that their implementation depends on the specific layout-qualifier-name tested. Therefore, if with, let's say max_vertices, they don't allow duplicates with different values, they will fail in all the cases; with duplicates in a single layout- qualifier or among several in the same declaration, no matter if ARB_shading_language_420pack or ARB_enhanced_layouts are supported. If duplicates with different values are allowed for the layout- qualifier-name tested, then the ones failing will be the negative tests. A mess ... Let's drop this by now. It is always easy to add more tests later. > Also I believe we should already have negative tests for this so some > of these tests are likely duplicates of existing tests, > probably ARB_shading_language_420pack tests. Oh, right, it is stupid to test for the absence in 2 different places. Good catch. -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 4/7] arb_shading_language_420pack: More multiple layout qualifiers in a single declaration tests
On Mon, 2016-10-24 at 11:44 +1100, Timothy Arceri wrote: > Reviewed-by: Timothy Arceri <timothy.arc...@collabora.com> > > On Sat, 2016-10-22 at 23:42 +0300, Andres Gomez wrote: [snip] > > diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout- > > qualifiers/multiple-local_size-in-single-declaration-mismatch.comp > > b/tests/spec/arb_shading_language_420pack/compiler/layout- > > qualifiers/multiple-local_size-in-single-declaration-mismatch.comp > > new file mode 100644 > > index 000..b4f49f0 > > --- /dev/null > > +++ b/tests/spec/arb_shading_language_420pack/compiler/layout- > > qualifiers/multiple-local_size-in-single-declaration-mismatch.comp > > @@ -0,0 +1,29 @@ > > +// [config] > > +// expect_result: fail > > +// glsl_version: 1.50 > > +// require_extensions: GL_ARB_shading_language_420pack > > GL_ARB_compute_shader > > +// check_link: true > > > I think you need to remove this since the spec says it is a compile > time error. Good catch! The spec specifies compile-time error if the mismatch is in the same shader and link-time error if the mismatch is among shaders in the same program. I'll update this (and other tests that I've added in relation with local_size). Thanks for the review! -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/7] glsl-1.50: Add GS output layout qualifier redeclaration test
On Mon, 2016-10-24 at 11:15 +1100, Timothy Arceri wrote: > On Sat, 2016-10-22 at 23:42 +0300, Andres Gomez wrote: > > Section 4.3.8.2 (Output Layout Qualifiers) of the GLSL 1.50 spec > > says: > > > > "All geometry shader output layout declarations in a program must > > declare the > > same layout and same value for max_vertices." > > > > Signed-off-by: Andres Gomez <ago...@igalia.com> > > --- > > ...ut-declaration-consistent-with-prev-layout.geom | 37 > > ++ > > 1 file changed, 37 insertions(+) > > create mode 100644 tests/spec/glsl-1.50/compiler/layout-out- > > declaration-consistent-with-prev-layout.geom > > > We have a negative test for this: > > tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per- > program-max-verts.geom > > It would probably be nice to have similair names maybe just: > > layout-only-one-out-declaration-per-program-max-verts2.geom What about renaming the existent to: layout-only-one-out-declaration-per-program-max-verts-mismatch.geom And the new one to: layout-only-one-out-declaration-per-program-max-verts.geom That would be consistent with many existing and the rest of the newly added tests. > Otherwise: > > Reviewed-by: Timothy Arceri <timothy.arc...@collabora.com> Thanks for the review! -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 0/7] More duplicated layout-qualifier-names tests
On Mon, 2016-10-24 at 11:58 +1100, Timothy Arceri wrote: > On Sat, 2016-10-22 at 23:42 +0300, Andres Gomez wrote: > > ARB_shading_language_420pack > > > You may be interested in finishing off this patch: > > https://patchwork.freedesktop.org/patch/71093/ > > I never got around to implementing Francisco's comments that last time > I was working on this stuff. I'll give it a look. Thanks for noticing! ☺ -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] dir-locals.el: Adds whitespace support
Provides support for highlighting incorrect indentation. v2: python-mode inherits from prog-mode v3: Removed too long lines trail highlighting, as suggested by Ilia Mirkin. Signed-off-by: Andres Gomez <ago...@igalia.com> --- .dir-locals.el | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.dir-locals.el b/.dir-locals.el index 3bdca17..2a37aaf 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,11 +1,20 @@ ((nil . ((indent-tabs-mode . t) (tab-width . 8) -(show-trailing-whitespace . t))) +(show-trailing-whitespace . t) +(whitespace-style face indentation) +(whitespace-line-column . 79))) (prog-mode . - ((c-file-style . "linux"))) + ((c-file-style . "linux") +(eval ignore-errors + (require 'whitespace) + (whitespace-mode 1 (cmake-mode . -((cmake-tab-width . 8))) +((cmake-tab-width . 8) + (eval ignore-errors + (require 'whitespace) + (whitespace-mode 1 (python-mode . ((indent-tabs-mode . nil) - (tab-width . 4))) + (tab-width . 4) + (whitespace-line-column . 80))) ) -- 2.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 0/7] More duplicated layout-qualifier-names tests
This series complements the work done for mesa at: https://lists.freedesktop.org/archives/mesa-dev/2016-October/132990.html Briefing, this is a new set of tests that check the ability to support multiple layout-qualifers in a single declaration and that only the right-most appearance of the same layout-qualifier-name, in a single layout-qualifier or across multiple layout-qualifiers in a single declaration is taken into account. The ARB_shading_language_420pack spec adds the support for multiple layout-qualifiers in the same declaration. The ARB_enhanced_layouts spec adds the support to repeat the same layout-qualifier-name inside a single layout-qualifier. In addition, I believe the ARB_enhanced_layouts spec also adds the support for multiple layout-qualifiers in the same declaration. This is not 100% clear to me since the addition in ARB_enhanced_layouts is for a duplicated layout-qualifier-name in a single layout-qualifier but it seems to make sense since the change builds up on the precondition that multiple layout-qualifiers are already allowed in a single declaration. In any case, the specific tests which check this support are the ones in patches 5/7 and 7/7 so they can be dropped straight away if I didn't make a proper interpretation. Andres Gomez (7): glsl-1.50: Add GS output layout qualifier redeclaration test arb_tessellation_shader: Add tests for TCS output size redeclaration arb_enhanced_layouts: Add more xfb_stride redeclaration tests arb_shading_language_420pack: More multiple layout qualifiers in a single declaration tests arb_enhanced_layouts: Multiple layout qualifiers in a single declaration tests arb_enhanced_layouts: More duplicated layout-qualifier-names tests arb_enhanced_layouts: More multiple layout qualifiers in a single declaration tests ...identifiers-in-single-declaration-mismatch.geom | 38 +++ ...vocation-identifiers-in-single-declaration.geom | 38 +++ ...tion-identifiers-in-single-layout-mismatch.geom | 38 +++ ...le-invocation-identifiers-in-single-layout.geom | 38 +++ ...identifiers-in-single-declaration-mismatch.comp | 38 +++ ...cal_size-identifiers-in-single-declaration.comp | 38 +++ ...size-identifiers-in-single-layout-mismatch.comp | 38 +++ ...le-local_size-identifiers-in-single-layout.comp | 38 +++ ...-in-single-declaration-no-enhanced-layouts.vert | 22 +++ ...location-identifiers-in-single-declaration.vert | 23 +++ ...identifiers-in-single-declaration-mismatch.geom | 40 ...vertices-identifiers-in-single-declaration.geom | 40 ...ices-identifiers-in-single-layout-mismatch.geom | 40 ...-max_vertices-identifiers-in-single-layout.geom | 40 ...gle-declaration-global-no-enhanced-layouts.geom | 27 + ...ifiers-in-single-declaration-layout-global.geom | 28 ++ ...-in-single-declaration-no-enhanced-layouts.geom | 25 ...e-stream-identifiers-in-single-declaration.geom | 26 + ...identifiers-in-single-declaration-mismatch.tesc | 39 +++ ...vertices-identifiers-in-single-declaration.tesc | 39 +++ ...ices-identifiers-in-single-layout-mismatch.tesc | 39 +++ ...iple-vertices-identifiers-in-single-layout.tesc | 39 +++ ...identifiers-in-single-declaration-mismatch.vert | 41 ...k-global-identifiers-in-single-declaration.vert | 41 ...obal-identifiers-in-single-layout-mismatch.vert | 41 ...-block-global-identifiers-in-single-layout.vert | 41 ...identifiers-in-single-declaration-mismatch.vert | 44 ++ ...de-block-identifiers-in-single-declaration.vert | 44 ++ ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++ ..._stride-block-identifiers-in-single-layout.vert | 44 ++ ...identifiers-in-single-declaration-mismatch.vert | 37 ++ ...e-global-identifiers-in-single-declaration.vert | 37 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 37 ++ ...stride-global-identifiers-in-single-layout.vert | 37 ++ ...identifiers-in-single-declaration-mismatch.vert | 41 ...k-global-identifiers-in-single-declaration.vert | 41 ...obal-identifiers-in-single-layout-mismatch.vert | 41 ...dblock-global-identifiers-in-single-layout.vert | 41 ...identifiers-in-single-declaration-mismatch.vert | 44 ++ ...medblock-identifiers-in-single-declaration.vert | 44 ++ ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++ ...de-namedblock
[Piglit] [PATCH 1/7] glsl-1.50: Add GS output layout qualifier redeclaration test
Section 4.3.8.2 (Output Layout Qualifiers) of the GLSL 1.50 spec says: "All geometry shader output layout declarations in a program must declare the same layout and same value for max_vertices." Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...ut-declaration-consistent-with-prev-layout.geom | 37 ++ 1 file changed, 37 insertions(+) create mode 100644 tests/spec/glsl-1.50/compiler/layout-out-declaration-consistent-with-prev-layout.geom diff --git a/tests/spec/glsl-1.50/compiler/layout-out-declaration-consistent-with-prev-layout.geom b/tests/spec/glsl-1.50/compiler/layout-out-declaration-consistent-with-prev-layout.geom new file mode 100644 index 000..da8a86c --- /dev/null +++ b/tests/spec/glsl-1.50/compiler/layout-out-declaration-consistent-with-prev-layout.geom @@ -0,0 +1,37 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// check_link: true +// [end config] +// +// Section 4.3.8.2 (Output Layout Qualifiers) of the GLSL 1.50 spec says: +// +//"layout(triangle_strip, max_vertices = 60) out; // order does not matter +// layout(max_vertices = 60) out; // redeclaration okay (*) +// layout(triangle_strip) out;// redeclaration okay (*) +// layout(points) out;// error, contradicts triangle_strip +// layout(max_vertices = 30) out; // error, contradicts 60" +// +//... +// +//"All geometry shader output layout declarations in a program must declare the +// same layout and same value for max_vertices." +// +// This test verifies the case marked with (*), namely that no error +// results from declaring a geometry shader output layout that is +// consistent with a previously declared geometry shader output layout. + +#version 150 + +layout(lines) in; +layout(line_strip, max_vertices=3) out; + +in vec4 pos[]; + +layout(line_strip, max_vertices=3) out; +layout(max_vertices=3) out; +layout(line_strip) out; + +void main() +{ +} -- 2.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/7] arb_tessellation_shader: Add tests for TCS output size redeclaration
From the ARB_tessellation_shader spec: "All tessellation control shader layout declarations in a program must specify the same output patch vertex count." Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...e-qualifier-declarations-vertices-mismatch.tesc | 23 ++ ...t-multiple-qualifier-declarations-vertices.tesc | 23 ++ 2 files changed, 46 insertions(+) create mode 100644 tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices-mismatch.tesc create mode 100644 tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices.tesc diff --git a/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices-mismatch.tesc b/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices-mismatch.tesc new file mode 100644 index 000..62e369e --- /dev/null +++ b/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices-mismatch.tesc @@ -0,0 +1,23 @@ +// [config] +// expect_result: fail +// glsl_version: 1.50 +// require_extensions: GL_ARB_tessellation_shader +// check_link: true +// [end config] +// +// From the ARB_tessellation_shader spec: +// +//"All tessellation control shader layout declarations in a program must +// specify the same output patch vertex count." + +#version 150 +#extension GL_ARB_tessellation_shader: require + +layout(vertices = 3) out; +layout(vertices = 4) out; + +void main() { +gl_out[gl_InvocationID].gl_Position = vec4(0.0); +gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0); +gl_TessLevelInner = float[2](1.0, 1.0); +} diff --git a/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices.tesc b/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices.tesc new file mode 100644 index 000..62a2fba --- /dev/null +++ b/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices.tesc @@ -0,0 +1,23 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// require_extensions: GL_ARB_tessellation_shader +// check_link: true +// [end config] +// +// From the ARB_tessellation_shader spec: +// +//"All tessellation control shader layout declarations in a program must +// specify the same output patch vertex count." + +#version 150 +#extension GL_ARB_tessellation_shader: require + +layout(vertices = 3) out; +layout(vertices = 3) out; + +void main() { +gl_out[gl_InvocationID].gl_Position = vec4(0.0); +gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0); +gl_TessLevelInner = float[2](1.0, 1.0); +} -- 2.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 7/7] arb_enhanced_layouts: More multiple layout qualifiers in a single declaration tests
Added tests for the layout-qualifier-names "max_vertices", "invocations", "vertices", "local_size_[x|y|z]" and "xfb_stride" which may have redeclarations but all of them enforce that a global or variable redeclaration holds the same value than in the previous declaration(s). These tests check that multiple appearances of the same layout-qualifier-name across multiple layout-qualifiers in the same declaration with different values won't trigger a compile/link error. From the ARB_enhanced_layouts spec: "More than one layout qualifier may appear in a single declaration. Additionally, the same layout-qualifier-name can occur multiple times within a layout qualifier or across multiple layout qualifiers in the same declaration" Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...identifiers-in-single-declaration-mismatch.geom | 38 +++ ...vocation-identifiers-in-single-declaration.geom | 38 +++ ...identifiers-in-single-declaration-mismatch.comp | 38 +++ ...cal_size-identifiers-in-single-declaration.comp | 38 +++ ...identifiers-in-single-declaration-mismatch.geom | 40 ...vertices-identifiers-in-single-declaration.geom | 40 ...identifiers-in-single-declaration-mismatch.tesc | 39 +++ ...vertices-identifiers-in-single-declaration.tesc | 39 +++ ...identifiers-in-single-declaration-mismatch.vert | 41 ...k-global-identifiers-in-single-declaration.vert | 41 ...identifiers-in-single-declaration-mismatch.vert | 44 ++ ...de-block-identifiers-in-single-declaration.vert | 44 ++ ...identifiers-in-single-declaration-mismatch.vert | 37 ++ ...e-global-identifiers-in-single-declaration.vert | 37 ++ ...identifiers-in-single-declaration-mismatch.vert | 41 ...k-global-identifiers-in-single-declaration.vert | 41 ...identifiers-in-single-declaration-mismatch.vert | 44 ++ ...medblock-identifiers-in-single-declaration.vert | 44 ++ ...identifiers-in-single-declaration-mismatch.vert | 39 +++ ...e-global-identifiers-in-single-declaration.vert | 39 +++ ...identifiers-in-single-declaration-mismatch.vert | 39 +++ ...variable-identifiers-in-single-declaration.vert | 39 +++ 22 files changed, 880 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-declaration-mismatch.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-declaration.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-declaration-mismatch.comp create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-declaration.comp create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-declaration-mismatch.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-declaration.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-declaration-mismatch.tesc create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-declaration.tesc create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-declaration-mismatch.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-declaration.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-declaration-mismatch.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-declaration.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-declaration-mismatch.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-declaration.vert create mode 100644 t
[Piglit] [PATCH 6/7] arb_enhanced_layouts: More duplicated layout-qualifier-names tests
Added tests for the layout-qualifier-names "max_vertices", "invocations", "vertices", "local_size_[x|y|z]" and "xfb_stride" which may have redeclarations but all of them enforce that a global or variable redeclaration holds the same value than in the previous declaration(s). These tests check that multiple appearances of the same layout-qualifier-name in a single layout qualifier with different values won't trigger a compile/link error. From the ARB_enhanced_layouts spec: "More than one layout qualifier may appear in a single declaration. Additionally, the same layout-qualifier-name can occur multiple times within a layout qualifier or across multiple layout qualifiers in the same declaration. When the same layout-qualifier-name occurs multiple times, in a single declaration, the last occurrence overrides the former occurrence(s). Further, if such a layout-qualifier-name will effect subsequent declarations or other observable behavior, it is only the last occurrence that will have any effect, behaving as if the earlier occurrence(s) within the declaration are not present. This is also true for overriding layout-qualifier-names, where one overrides the other (e.g., row_major vs. column_major); only the last occurrence has any effect." Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...tion-identifiers-in-single-layout-mismatch.geom | 38 +++ ...le-invocation-identifiers-in-single-layout.geom | 38 +++ ...size-identifiers-in-single-layout-mismatch.comp | 38 +++ ...le-local_size-identifiers-in-single-layout.comp | 38 +++ ...ices-identifiers-in-single-layout-mismatch.geom | 40 ...-max_vertices-identifiers-in-single-layout.geom | 40 ...ices-identifiers-in-single-layout-mismatch.tesc | 39 +++ ...iple-vertices-identifiers-in-single-layout.tesc | 39 +++ ...obal-identifiers-in-single-layout-mismatch.vert | 41 ...-block-global-identifiers-in-single-layout.vert | 41 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++ ..._stride-block-identifiers-in-single-layout.vert | 44 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 37 ++ ...stride-global-identifiers-in-single-layout.vert | 37 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 41 ...dblock-global-identifiers-in-single-layout.vert | 41 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++ ...de-namedblock-identifiers-in-single-layout.vert | 44 ++ ...obal-identifiers-in-single-layout-mismatch.vert | 39 +++ ...riable-global-identifiers-in-single-layout.vert | 39 +++ ...able-identifiers-in-single-layout-mismatch.vert | 39 +++ ...ride-variable-identifiers-in-single-layout.vert | 39 +++ 22 files changed, 880 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout-mismatch.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout-mismatch.comp create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout.comp create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout-mismatch.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout-mismatch.tesc create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout.tesc create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout-mismatch.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout-mismatch.vert create mode 100644 t
[Piglit] [PATCH 5/7] arb_enhanced_layouts: Multiple layout qualifiers in a single declaration tests
We already had tests for a repeated layout-qualifier-name in a single layout-qualifier. Now, we also add similar tests to check across multiple layout-qualifiers in the same declaration. From the ARB_enhanced_layouts spec: "More than one layout qualifier may appear in a single declaration. Additionally, the same layout-qualifier-name can occur multiple times within a layout qualifier or across multiple layout qualifiers in the same declaration" Signed-off-by: Andres Gomez <ago...@igalia.com> --- ...-in-single-declaration-no-enhanced-layouts.vert | 22 + ...location-identifiers-in-single-declaration.vert | 23 ++ ...gle-declaration-global-no-enhanced-layouts.geom | 27 + ...ifiers-in-single-declaration-layout-global.geom | 28 ++ ...-in-single-declaration-no-enhanced-layouts.geom | 25 +++ ...e-stream-identifiers-in-single-declaration.geom | 26 6 files changed, 151 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration-no-enhanced-layouts.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-global-no-enhanced-layouts.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-layout-global.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-no-enhanced-layouts.geom create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration.geom diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration-no-enhanced-layouts.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration-no-enhanced-layouts.vert new file mode 100644 index 000..3e1827e --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration-no-enhanced-layouts.vert @@ -0,0 +1,22 @@ +// [config] +// expect_result: fail +// glsl_version: 1.40 +// require_extensions: GL_ARB_separate_shader_objects +// check_link: false +// [end config] +// +// From the ARB_enhanced_layouts spec: +// +//"More than one layout qualifier may appear in a single declaration. +// Additionally, the same layout-qualifier-name can occur multiple times +// within a layout qualifier or across multiple layout qualifiers in the +// same declaration" + +#version 140 +#extension GL_ARB_separate_shader_objects : enable + +layout(location=2) layout(location=1) out vec3 var; + +void main() +{ +} diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration.vert new file mode 100644 index 000..30b6875 --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-location-identifiers-in-single-declaration.vert @@ -0,0 +1,23 @@ +// [config] +// expect_result: pass +// glsl_version: 1.40 +// require_extensions: GL_ARB_separate_shader_objects GL_ARB_enhanced_layouts +// check_link: false +// [end config] +// +// From the ARB_enhanced_layouts spec: +// +//"More than one layout qualifier may appear in a single declaration. +// Additionally, the same layout-qualifier-name can occur multiple times +// within a layout qualifier or across multiple layout qualifiers in the +// same declaration" + +#version 140 +#extension GL_ARB_separate_shader_objects : enable +#extension GL_ARB_enhanced_layouts: enable + +layout(location=2) layout(location=1) out vec3 var; + +void main() +{ +} diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-global-no-enhanced-layouts.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-global-no-enhanced-layouts.geom new file mode 100644 index 000..0bc8eae --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-stream-identifiers-in-single-declaration-global-no
[Piglit] [PATCH 3/7] arb_enhanced_layouts: Add more xfb_stride redeclaration tests
From the GL_ARB_enhanced_layouts spec: "While *xfb_stride* can be declared multiple times for the same buffer, it is a compile-time or link-time error to have different values specified for the stride for the same buffer." Signed-off-by: Andres Gomez <ago...@igalia.com> --- .../xfb_stride/block-stride-match-global.vert | 31 ++ .../xfb_stride/block-stride-match.vert | 29 .../xfb_stride/block-stride-mismatch-global.vert | 31 ++ .../xfb_stride/block-stride-mismatch.vert | 29 .../xfb_stride/global-stride-match.vert| 22 +++ .../xfb_stride/global-stride-mismatch.vert | 22 +++ .../named-block-stride-match-global.vert | 31 ++ .../xfb_stride/named-block-stride-match.vert | 29 .../named-block-stride-mismatch-global.vert| 31 ++ .../xfb_stride/named-block-stride-mismatch.vert| 29 .../xfb_stride/variable-stride-match-global.vert | 26 ++ .../xfb_stride/variable-stride-match.vert | 24 + .../variable-stride-mismatch-global.vert | 6 ++--- .../xfb_stride/variable-stride-mismatch.vert | 6 ++--- 14 files changed, 340 insertions(+), 6 deletions(-) create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match-global.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch-global.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-mismatch.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-match.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/global-stride-mismatch.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match-global.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-match.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch-global.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-mismatch.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match-global.vert create mode 100644 tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-match.vert diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match-global.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match-global.vert new file mode 100644 index 000..b9fadb4 --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match-global.vert @@ -0,0 +1,31 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// check_link: true +// require_extensions: GL_ARB_enhanced_layouts +// [end config] +// +// From the GL_ARB_enhanced_layouts spec: +// +//"While *xfb_stride* can be declared multiple times for the same buffer, +// it is a compile-time or link-time error to have different values +// specified for the stride for the same buffer." + +#version 150 +#extension GL_ARB_enhanced_layouts: require + +layout(xfb_stride = 20, xfb_buffer = 0) out; + +layout(xfb_buffer = 0) out block1 { + vec4 var; +}; + +layout(xfb_stride = 20) out block2 { + vec4 var2; +}; + +void main() +{ + var = vec4(1.0); + var2 = vec4(0.0); +} diff --git a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match.vert b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match.vert new file mode 100644 index 000..fbc84da --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-match.vert @@ -0,0 +1,29 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// check_link: true +// require_extensions: GL_ARB_enhanced_layouts +// [end config] +// +// From the GL_ARB_enhanced_layouts spec: +// +//"While *xfb_stride* can be declared multiple times for the same buffer, +// it
Re: [Piglit] [PATCH] dir-locals.el: whitespace support
If nobody says otherwise, I will land this by the beginning of next week. On Tue, 2016-08-02 at 19:53 +0300, Andres Gomez wrote: > Highlight bogus indentation and long lines. > > v2: python-mode inherits from prog-mode > > Signed-off-by: Andres Gomez <ago...@igalia.com> > --- > .dir-locals.el | 17 + > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/.dir-locals.el b/.dir-locals.el > index 3bdca17..554cafb 100644 > --- a/.dir-locals.el > +++ b/.dir-locals.el > @@ -1,11 +1,20 @@ > ((nil . ((indent-tabs-mode . t) >(tab-width . 8) > - (show-trailing-whitespace . t))) > + (show-trailing-whitespace . t) > + (whitespace-style face indentation lines-tail) > + (whitespace-line-column . 79))) > (prog-mode . > - ((c-file-style . "linux"))) > + ((c-file-style . "linux") > + (eval ignore-errors > +(require 'whitespace) > +(whitespace-mode 1 > (cmake-mode . > - ((cmake-tab-width . 8))) > + ((cmake-tab-width . 8) > + (eval ignore-errors > + (require 'whitespace) > + (whitespace-mode 1 > (python-mode . > ((indent-tabs-mode . nil) > -(tab-width . 4))) > +(tab-width . 4) > +(whitespace-line-column . 80))) > ) -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] glslparsertest: Added some few more struct construction tests
On Tue, 2016-08-09 at 13:14 +1000, Timothy Arceri wrote: > On Fri, 2016-08-05 at 17:43 +0300, Andres Gomez wrote: > > This set focus on checking invalid structs construction. > > Specifically, > > adds a test to check that only implicit conversions are perform and > > vector conversions of the type vec3 to vec2 through dropping the z > > component are not allowed. > > > IMO we should try to avoid adding more tests to these directories. > > I would much rather these be added to tests/spec/glsl- > 1.20/compiler/constructor/ > > I would then name them struct-1.vert .. struct-N.vert Let's do that, then. > It's up to you if you want to move/rename the existing contructor tests > but eventually I think this is something we should do. I'll note it down in my TODO for later. I'd rather push this now as it is. > With the above and my comment below addressed you can add to this > patch: > > Acked-by: Timothy Arceri <timothy.arc...@collabora.com> Thanks! > > --- > > tests/glslparsertest/glsl2/constructor-29.vert | 13 + > > tests/glslparsertest/glsl2/constructor-30.vert | 13 + > > tests/glslparsertest/glsl2/constructor-31.vert | 15 +++ > > tests/glslparsertest/glsl2/constructor-32.vert | 15 +++ > > tests/glslparsertest/glsl2/constructor-33.vert | 15 +++ > > tests/glslparsertest/glsl2/constructor-34.vert | 15 +++ > > 6 files changed, 86 insertions(+) > > create mode 100644 tests/glslparsertest/glsl2/constructor-29.vert > > create mode 100644 tests/glslparsertest/glsl2/constructor-30.vert > > create mode 100644 tests/glslparsertest/glsl2/constructor-31.vert > > create mode 100644 tests/glslparsertest/glsl2/constructor-32.vert > > create mode 100644 tests/glslparsertest/glsl2/constructor-33.vert > > create mode 100644 tests/glslparsertest/glsl2/constructor-34.vert > > > > diff --git a/tests/glslparsertest/glsl2/constructor-29.vert > > b/tests/glslparsertest/glsl2/constructor-29.vert > > new file mode 100644 > > index 000..eecab51 > > --- /dev/null > > +++ b/tests/glslparsertest/glsl2/constructor-29.vert > > @@ -0,0 +1,13 @@ > > +// [config] > > +// expect_result: fail > > +// glsl_version: 1.20 > > +// [end config] > > + > > +/* FAIL */ > > +#version 120 > > +struct s { vec2 f; }; > > + > > +void main() > > +{ > > +s t = s(vec3(1.0, 3.0, 0.0)); // Only Section 4.1.10 “Implicit > > Conversions.” are allowed > > +} > > diff --git a/tests/glslparsertest/glsl2/constructor-30.vert > > b/tests/glslparsertest/glsl2/constructor-30.vert > > new file mode 100644 > > index 000..eecab51 > > --- /dev/null > > +++ b/tests/glslparsertest/glsl2/constructor-30.vert > > @@ -0,0 +1,13 @@ > > +// [config] > > +// expect_result: fail > > +// glsl_version: 1.20 > > +// [end config] > > + > > +/* FAIL */ > > +#version 120 > > +struct s { vec2 f; }; > > + > > +void main() > > +{ > > +s t = s(vec3(1.0, 3.0, 0.0)); // Only Section 4.1.10 “Implicit > > Conversions.” are allowed > > +} > > diff --git a/tests/glslparsertest/glsl2/constructor-31.vert > > b/tests/glslparsertest/glsl2/constructor-31.vert > > new file mode 100644 > > index 000..fafaf85 > > --- /dev/null > > +++ b/tests/glslparsertest/glsl2/constructor-31.vert > > @@ -0,0 +1,15 @@ > > +// [config] > > +// expect_result: fail > > +// glsl_version: 1.20 > > +// [end config] > > + > > +/* FAIL */ > > +#version 120 > > +struct s1 { float f; }; > > + > > +struct s2 { s1 g; }; > > + > > +void main() > > +{ > > +s2 t = s2(1); // Only Section 4.1.10 “Implicit Conversions.” are > > allowed > > +} > > diff --git a/tests/glslparsertest/glsl2/constructor-32.vert > > b/tests/glslparsertest/glsl2/constructor-32.vert > > new file mode 100644 > > index 000..b27dcac > > --- /dev/null > > +++ b/tests/glslparsertest/glsl2/constructor-32.vert > > @@ -0,0 +1,15 @@ > > +// [config] > > +// expect_result: fail > > +// glsl_version: 1.20 > > +// [end config] > > + > > +/* FAIL */ > > +#version 120 > > +struct s1 { float f; }; > > + > > +struct s2 { s1 g; }; > > > Please remove s2 > > > > + > > +void main() > > +{ > > +s1 t = s1(s1(1)); // Only Section 4.1.10 “Implicit Conversions.” > > are allowed > > +} > > diff --git a/tests/glslparsertest/glsl2/constructor-33.vert &g
Re: [Piglit] [PATCH 2/2] arb_shading_language_420pack: Added some few more struct initializing tests
On Tue, 2016-08-09 at 13:18 +1000, Timothy Arceri wrote: > On Fri, 2016-08-05 at 17:43 +0300, Andres Gomez wrote: > > This set focus on checking invalid structs > > initializations. Specifically, adds a test to check that only > > implicit > > conversions are perform and vector conversions of the type vec3 to > > vec2 through dropping the z component are not allowed. > > Bit of a nit but you have both illegal and wrong in the test name, you > only really need one or the other. > > How about illegal-struct-aggregate-initializer-struct-to-bool.frag etc Makes sense, let's rename to something more descriptive ... > Otherwise: > > Acked-by: Timothy Arceri <timothy.arc...@collabora.com> Thanks! > > > --- > > ...e-initializer-struct-wrong-bool-type-struct.frag | 20 > > > > ...e-initializer-struct-wrong-struct-type-bool.frag | 20 > > > > ...initializer-struct-wrong-struct-type-struct.frag | 21 > > + > > ...ate-initializer-struct-wrong-vec2-type-vec3.frag | 18 > > ++ > > 4 files changed, 79 insertions(+) > > create mode 100644 > > tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-bool-type-struct.frag > > create mode 100644 > > tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-struct-type-bool.frag > > create mode 100644 > > tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-struct-type-struct.frag > > create mode 100644 > > tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-vec2-type-vec3.frag > > > > diff --git > > a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-bool-type-struct.frag > > b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-bool-type-struct.frag > > new file mode 100644 > > index 000..57ec89c > > --- /dev/null > > +++ b/tests/spec/arb_shading_language_420pack/compiler/illegal- > > aggregate-initializer-struct-wrong-bool-type-struct.frag > > @@ -0,0 +1,20 @@ > > +/* [config] > > + * expect_result: fail > > + * glsl_version: 1.30 > > + * require_extensions: GL_ARB_shading_language_420pack > > + * [end config] > > + */ > > + > > +#version 130 > > +#extension GL_ARB_shading_language_420pack: enable > > + > > +struct s { bool f; }; > > + > > +void main() { > > +// Illegal since e.b is bool, but struct given as initializer > > +struct { > > +float a; > > +bool b; > > +} e = { 1.2, s(true) }; > > +gl_FragColor = vec4(1.0); > > +} > > diff --git > > a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-struct-type-bool.frag > > b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-struct-type-bool.frag > > new file mode 100644 > > index 000..739835d > > --- /dev/null > > +++ b/tests/spec/arb_shading_language_420pack/compiler/illegal- > > aggregate-initializer-struct-wrong-struct-type-bool.frag > > @@ -0,0 +1,20 @@ > > +/* [config] > > + * expect_result: fail > > + * glsl_version: 1.30 > > + * require_extensions: GL_ARB_shading_language_420pack > > + * [end config] > > + */ > > + > > +#version 130 > > +#extension GL_ARB_shading_language_420pack: enable > > + > > +struct s { float f; }; > > + > > +void main() { > > +// Illegal since e.b is struct s, but bool given as initializer > > +struct { > > +float a; > > +s b; > > +} e = { 1.2, true }; > > +gl_FragColor = vec4(1.0); > > +} > > diff --git > > a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-struct-type-struct.frag > > b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate- > > initializer-struct-wrong-struct-type-struct.frag > > new file mode 100644 > > index 000..ab72dfc > > --- /dev/null > > +++ b/tests/spec/arb_shading_language_420pack/compiler/illegal- > > aggregate-initializer-struct-wrong-struct-type-struct.frag > > @@ -0,0 +1,21 @@ > > +/* [config] > > + * expect_result: fail > > + * glsl_version: 1.30 > > + * require_extensions: GL_ARB_shading_language_420pack > > + * [end config]
[Piglit] [PATCH 2/2] arb_shading_language_420pack: Added some few more struct initializing tests
This set focus on checking invalid structs initializations. Specifically, adds a test to check that only implicit conversions are perform and vector conversions of the type vec3 to vec2 through dropping the z component are not allowed. --- ...e-initializer-struct-wrong-bool-type-struct.frag | 20 ...e-initializer-struct-wrong-struct-type-bool.frag | 20 ...initializer-struct-wrong-struct-type-struct.frag | 21 + ...ate-initializer-struct-wrong-vec2-type-vec3.frag | 18 ++ 4 files changed, 79 insertions(+) create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-bool-type-struct.frag create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-bool.frag create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-struct.frag create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-vec2-type-vec3.frag diff --git a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-bool-type-struct.frag b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-bool-type-struct.frag new file mode 100644 index 000..57ec89c --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-bool-type-struct.frag @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.30 + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ + +#version 130 +#extension GL_ARB_shading_language_420pack: enable + +struct s { bool f; }; + +void main() { +// Illegal since e.b is bool, but struct given as initializer +struct { +float a; +bool b; +} e = { 1.2, s(true) }; +gl_FragColor = vec4(1.0); +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-bool.frag b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-bool.frag new file mode 100644 index 000..739835d --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-bool.frag @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.30 + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ + +#version 130 +#extension GL_ARB_shading_language_420pack: enable + +struct s { float f; }; + +void main() { +// Illegal since e.b is struct s, but bool given as initializer +struct { +float a; +s b; +} e = { 1.2, true }; +gl_FragColor = vec4(1.0); +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-struct.frag b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-struct.frag new file mode 100644 index 000..ab72dfc --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-struct.frag @@ -0,0 +1,21 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.30 + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ + +#version 130 +#extension GL_ARB_shading_language_420pack: enable + +struct s1 { float f; }; +struct s2 { bool f; bool g; }; + +void main() { +// Illegal since e.b is struct s1, but a struct s2 given as initializer +struct { +float a; +s1 b; +} e = { 1.2, s2(true, false) }; +gl_FragColor = vec4(1.0); +} diff --git a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-vec2-type-vec3.frag b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-vec2-type-vec3.frag new file mode 100644 index 000..0648f05 --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-vec2-type-vec3.frag @@ -0,0 +1,18 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.30 + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ + +#version 130 +#extension GL_ARB_shading_language_420pack: enable + +void main() { +// Illegal since e.b is vec2, but a vec3 given as initializer and only “Implicit Conversions.” are allowed +struct { +float a; +vec2 b; +} e = { 1.2, vec3(1.0, 0.0, 1.0) }; +gl_FragColor = vec4(1.0); +} -- 2.8.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] glslparsertest: Added some few more struct construction tests
This set focus on checking invalid structs construction. Specifically, adds a test to check that only implicit conversions are perform and vector conversions of the type vec3 to vec2 through dropping the z component are not allowed. --- tests/glslparsertest/glsl2/constructor-29.vert | 13 + tests/glslparsertest/glsl2/constructor-30.vert | 13 + tests/glslparsertest/glsl2/constructor-31.vert | 15 +++ tests/glslparsertest/glsl2/constructor-32.vert | 15 +++ tests/glslparsertest/glsl2/constructor-33.vert | 15 +++ tests/glslparsertest/glsl2/constructor-34.vert | 15 +++ 6 files changed, 86 insertions(+) create mode 100644 tests/glslparsertest/glsl2/constructor-29.vert create mode 100644 tests/glslparsertest/glsl2/constructor-30.vert create mode 100644 tests/glslparsertest/glsl2/constructor-31.vert create mode 100644 tests/glslparsertest/glsl2/constructor-32.vert create mode 100644 tests/glslparsertest/glsl2/constructor-33.vert create mode 100644 tests/glslparsertest/glsl2/constructor-34.vert diff --git a/tests/glslparsertest/glsl2/constructor-29.vert b/tests/glslparsertest/glsl2/constructor-29.vert new file mode 100644 index 000..eecab51 --- /dev/null +++ b/tests/glslparsertest/glsl2/constructor-29.vert @@ -0,0 +1,13 @@ +// [config] +// expect_result: fail +// glsl_version: 1.20 +// [end config] + +/* FAIL */ +#version 120 +struct s { vec2 f; }; + +void main() +{ +s t = s(vec3(1.0, 3.0, 0.0)); // Only Section 4.1.10 “Implicit Conversions.” are allowed +} diff --git a/tests/glslparsertest/glsl2/constructor-30.vert b/tests/glslparsertest/glsl2/constructor-30.vert new file mode 100644 index 000..eecab51 --- /dev/null +++ b/tests/glslparsertest/glsl2/constructor-30.vert @@ -0,0 +1,13 @@ +// [config] +// expect_result: fail +// glsl_version: 1.20 +// [end config] + +/* FAIL */ +#version 120 +struct s { vec2 f; }; + +void main() +{ +s t = s(vec3(1.0, 3.0, 0.0)); // Only Section 4.1.10 “Implicit Conversions.” are allowed +} diff --git a/tests/glslparsertest/glsl2/constructor-31.vert b/tests/glslparsertest/glsl2/constructor-31.vert new file mode 100644 index 000..fafaf85 --- /dev/null +++ b/tests/glslparsertest/glsl2/constructor-31.vert @@ -0,0 +1,15 @@ +// [config] +// expect_result: fail +// glsl_version: 1.20 +// [end config] + +/* FAIL */ +#version 120 +struct s1 { float f; }; + +struct s2 { s1 g; }; + +void main() +{ +s2 t = s2(1); // Only Section 4.1.10 “Implicit Conversions.” are allowed +} diff --git a/tests/glslparsertest/glsl2/constructor-32.vert b/tests/glslparsertest/glsl2/constructor-32.vert new file mode 100644 index 000..b27dcac --- /dev/null +++ b/tests/glslparsertest/glsl2/constructor-32.vert @@ -0,0 +1,15 @@ +// [config] +// expect_result: fail +// glsl_version: 1.20 +// [end config] + +/* FAIL */ +#version 120 +struct s1 { float f; }; + +struct s2 { s1 g; }; + +void main() +{ +s1 t = s1(s1(1)); // Only Section 4.1.10 “Implicit Conversions.” are allowed +} diff --git a/tests/glslparsertest/glsl2/constructor-33.vert b/tests/glslparsertest/glsl2/constructor-33.vert new file mode 100644 index 000..46add14 --- /dev/null +++ b/tests/glslparsertest/glsl2/constructor-33.vert @@ -0,0 +1,15 @@ +// [config] +// expect_result: fail +// glsl_version: 1.20 +// [end config] + +/* FAIL */ +#version 120 +struct s1 { float f; }; + +struct s2 { s1 g; }; + +void main() +{ +s2 t = s2(s2(s1(1))); // Only Section 4.1.10 “Implicit Conversions.” are allowed +} diff --git a/tests/glslparsertest/glsl2/constructor-34.vert b/tests/glslparsertest/glsl2/constructor-34.vert new file mode 100644 index 000..46f1c27 --- /dev/null +++ b/tests/glslparsertest/glsl2/constructor-34.vert @@ -0,0 +1,15 @@ +// [config] +// expect_result: pass +// glsl_version: 1.20 +// [end config] + +/* PASS */ +#version 120 +struct s1 { float f; }; + +struct s2 { s1 g; }; + +void main() +{ +s2 t = s2(s1(1)); // an implicit conversion should happen here +} -- 2.8.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 0/2] Added some few more struct construction tests
This set focus on checking invalid structs construction and initializations. Specifically, adds tests to check that only implicit conversions are perform and vector conversions of the type vec3 to vec2 through dropping the z component are not allowed. This is related to this series recently landed in mesa: https://lists.freedesktop.org/archives/mesa-dev/2016-July/124852.html Andres Gomez (2): glslparsertest: Added some few more struct construction tests arb_shading_language_420pack: Added some few more struct initializing tests tests/glslparsertest/glsl2/constructor-29.vert | 13 + tests/glslparsertest/glsl2/constructor-30.vert | 13 + tests/glslparsertest/glsl2/constructor-31.vert | 15 +++ tests/glslparsertest/glsl2/constructor-32.vert | 15 +++ tests/glslparsertest/glsl2/constructor-33.vert | 15 +++ tests/glslparsertest/glsl2/constructor-34.vert | 15 +++ ...e-initializer-struct-wrong-bool-type-struct.frag | 20 ...e-initializer-struct-wrong-struct-type-bool.frag | 20 ...initializer-struct-wrong-struct-type-struct.frag | 21 + ...ate-initializer-struct-wrong-vec2-type-vec3.frag | 18 ++ 10 files changed, 165 insertions(+) create mode 100644 tests/glslparsertest/glsl2/constructor-29.vert create mode 100644 tests/glslparsertest/glsl2/constructor-30.vert create mode 100644 tests/glslparsertest/glsl2/constructor-31.vert create mode 100644 tests/glslparsertest/glsl2/constructor-32.vert create mode 100644 tests/glslparsertest/glsl2/constructor-33.vert create mode 100644 tests/glslparsertest/glsl2/constructor-34.vert create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-bool-type-struct.frag create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-bool.frag create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-struct-type-struct.frag create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-wrong-vec2-type-vec3.frag -- 2.8.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] dir-locals.el: whitespace support
Highlight bogus indentation and long lines. v2: python-mode inherits from prog-mode Signed-off-by: Andres Gomez <ago...@igalia.com> --- .dir-locals.el | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.dir-locals.el b/.dir-locals.el index 3bdca17..554cafb 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,11 +1,20 @@ ((nil . ((indent-tabs-mode . t) (tab-width . 8) -(show-trailing-whitespace . t))) +(show-trailing-whitespace . t) +(whitespace-style face indentation lines-tail) +(whitespace-line-column . 79))) (prog-mode . - ((c-file-style . "linux"))) + ((c-file-style . "linux") +(eval ignore-errors + (require 'whitespace) + (whitespace-mode 1 (cmake-mode . -((cmake-tab-width . 8))) +((cmake-tab-width . 8) + (eval ignore-errors + (require 'whitespace) + (whitespace-mode 1 (python-mode . ((indent-tabs-mode . nil) - (tab-width . 4))) + (tab-width . 4) + (whitespace-line-column . 80))) ) -- 2.8.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] generators/gen_vs_in_fp64: Different VBO values per vertex
Hi, this patch is still unreviewed. I'd welcome some help to get this into piglit with guarantees that the changes are OK. Dylan, could you give it a look? :) If there is nothing new by the end of this week, I will assume that all is OK and will proceed to land the patch. On Wed, 2016-07-06 at 14:40 +0300, Andres Gomez wrote: > Before, in every drawing we were having the same VBO values per vertex > to be compared against the values in the uniforms. Now, we also have > different values per vertex so we can be sure that it is truly its own > data. > > Signed-off-by: Andres Gomez <ago...@igalia.com> > --- > .../gen_vs_in_fp64/columns.shader_test.mako| 41 - > .../gen_vs_in_fp64/regular.shader_test.mako| 43 > +- > 2 files changed, 49 insertions(+), 35 deletions(-) > > diff --git > a/generated_tests/templates/gen_vs_in_fp64/columns.shader_test.mako > b/generated_tests/templates/gen_vs_in_fp64/columns.shader_test.mako > index 2dfb723..f094a03 100644 > --- a/generated_tests/templates/gen_vs_in_fp64/columns.shader_test.mako > +++ b/generated_tests/templates/gen_vs_in_fp64/columns.shader_test.mako > @@ -48,7 +48,9 @@ GLSL >= ${glsl} >#extension GL_ARB_vertex_attrib_64bit : require > % endif > > -uniform ${mat.name} expected; > +% for vidx in range(4): > + uniform ${mat.name} expected${vidx}; > +% endfor > > in ${mat.name} value; > in vec3 piglit_vertex; > @@ -59,15 +61,18 @@ out vec4 fs_color; > > void main() > { > - gl_Position = vec4(piglit_vertex, 1.0); > - % for idx, column in enumerate(columns): > -% if column == 1: > - if (value[${idx}] != expected[${idx}]) { > -fs_color = RED; > -return; > - } > - ## XXX: should we break here? > -% endif > + gl_Position = vec4(piglit_vertex.x, piglit_vertex.y, 0.0, 1.0); > + % for vidx, vertex in enumerate(['-1.0', '0.0', '1.0', '2.0']): > +if (piglit_vertex.z == ${vertex}) { > +% for idx, column in enumerate(columns): > + % if column == 1: > +if (value[${idx}] != expected${vidx}[${idx}]) { > +fs_color = RED; > +return; > +} > + % endif > +% endfor > +} >% endfor >fs_color = GREEN; > } > @@ -90,11 +95,11 @@ piglit_vertex/float/vec3\ >% endfor > > % for d in range(len(dvalues)): > - % for vertex in ('-1.0 -1.0 0.0', ' 1.0 -1.0 0.0', ' 1.0 1.0 0.0', > '-1.0 1.0 0.0'): > + % for vidx, vertex in enumerate(['-1.0 -1.0 -1.0', ' 1.0 -1.0 0.0', ' > 1.0 1.0 1.0', '-1.0 1.0 2.0']): > ${vertex} \ > % for i in range(mat.columns): >% for j in range(mat.rows): > -${dvalues[(d + i * mat.rows + j) % len(dvalues)]} \ > +${dvalues[(d + i * mat.rows + j + vidx) % len(dvalues)]} \ >% endfor >\ > % endfor > @@ -105,13 +110,15 @@ ${dvalues[(d + i * mat.rows + j) % len(dvalues)]} \ > [test] > % for d in range(len(dvalues)): > > - uniform ${mat.name} expected\ > - % for i in range(mat.columns): > -% for j in range(mat.rows): > - ${dvalues[(d + i * mat.rows + j) % len(dvalues)]}\ > + % for vidx in range(4): > +uniform ${mat.name} expected${vidx}\ > +% for i in range(mat.columns): > + % for j in range(mat.rows): > +${dvalues[(d + i * mat.rows + j + vidx) % len(dvalues)]}\ > + % endfor > % endfor > - % endfor > > + % endfor >clear color 0.0 0.0 1.0 0.0 >clear >draw arrays GL_TRIANGLE_FAN ${d * 4} 4 > diff --git > a/generated_tests/templates/gen_vs_in_fp64/regular.shader_test.mako > b/generated_tests/templates/gen_vs_in_fp64/regular.shader_test.mako > index b6fab62..5620cbe 100644 > --- a/generated_tests/templates/gen_vs_in_fp64/regular.shader_test.mako > +++ b/generated_tests/templates/gen_vs_in_fp64/regular.shader_test.mako > @@ -50,7 +50,9 @@ GL_MAX_VERTEX_ATTRIBS >= ${num_vs_in} > % endif > > % for idx, in_type in enumerate(in_types): > - uniform ${in_type.name} expected${idx}${'[{}]'.format(arrays[idx]) if > arrays[idx] - 1 else ''}; > + % for vidx in range(4): > +uniform ${in_type.name} > expected${idx}${vidx}${'[{}]'.format(arrays[idx]) if arrays[idx] - 1 else ''}; > + % endfor > % endfor > % for idx, in_type in enumerate(in_types): >in ${in_type.name} value${idx}${'[{}]'.format(arrays[idx]) if arrays[idx] > - 1 else ''}; > @@ -63,13 +65,16 @@ out vec4 fs_color; > > void main() > { > -gl_Position = vec4(piglit_vertex, 1.0); > -% for idx, in_type in enumerate(in_types): > -if (value${idx} != expected${idx}) { > -fs_color = RED; > -return; &g
Re: [Piglit] [PATCH] arb_texture_barrier: count of elements need to be multiple of three
Makes sense. Reviewed-by: Andres Gomez <ago...@igalia.com> On Fri, 2016-07-08 at 21:15 +0200, Alejandro Piñeiro wrote: > glDrawRangeElements is used to draw triangles so the count of elements > needs to be a multiple of three, so we need to be careful when > dividing by the number of draw calls specified for the test. > > Fixes the 40 failing subtests on i965. Now all the 144 tests are passing. > --- > > For Andres: > This is the correct version of this line you reviewed on v3: > > +{ > > +unsigned int basic_count = (total_indices * 3)/(3 * draw_passes); > > 3/3 == 1 > > That I just dropped for v4. > > > tests/spec/arb_texture_barrier/blending-in-shader-arb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tests/spec/arb_texture_barrier/blending-in-shader-arb.c > b/tests/spec/arb_texture_barrier/blending-in-shader-arb.c > index 24697bc..e438f56 100644 > --- a/tests/spec/arb_texture_barrier/blending-in-shader-arb.c > +++ b/tests/spec/arb_texture_barrier/blending-in-shader-arb.c > @@ -328,7 +328,9 @@ clean_resources() > static GLvoid > draw_rect_tex() > { > -unsigned int basic_count = total_indices / draw_passes; > +/* This multiply and divide by three is a trick to ensure that > + * basic_count is a multiple of three */ > +unsigned int basic_count = 3 * (total_indices / (3 * draw_passes)); > unsigned int first = 0; > > while (first < total_indices) { -- Br, Andres ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit