Test results are from the following hardware/driver combinations: AMD Radeon HD 6670 - Catalyst 13.251 OpenGL 4.3 Nvidia GeForce 210 - NVIDIA 331.20 OpenGL 3.3 Intel Ivy Bridge - Mesa 10.1(815e064) with ARB_arrays_of_arrays enabled
arrays-of-struct-with-field-arrays.vert AMD: pass Nvida: pass Intel: pass interface-field-array-array-var.vert AMD: pass Nvida: pass Intel: pass interface-field-array-var-array.vert AMD: pass Nvida: pass Intel: pass interface-field-maxbounds-access-array-array-var.geom AMD: pass Nvida: pass Intel: pass interface-field-maxbounds-access-array-var-array.geom AMD: pass Nvida: pass Intel: pass interface-field-maxbounds-access-var-array-array.geom AMD: pass Nvida: pass Intel: pass interface-field-outofbounds-access-array-array-var.geom AMD: pass Nvida: fail (Nvidia only warns for outofbounds) Intel: pass interface-field-outofbounds-access-array-var-array.geom AMD: pass Nvida: fail (Nvidia only warns for outofbounds) Intel: pass interface-field-outofbounds-access-var-array-array.geom AMD: pass Nvida: fail (Nvidia only warns for outofbounds) Intel: pass interface-field-var-array-array.vert AMD: pass Nvida: pass Intel: pass interface-maxbounds.vert AMD: pass Nvida: pass Intel: crash interface-outofbounds.vert AMD: pass Nvida: fail (Nvidia only warns for outofbounds) Intel: pass interface.vert AMD: pass Nvida: pass Intel: pass structure-field-array-array-var.frag AMD: pass Nvida: pass Intel: pass structure-field-array-var-array.frag AMD: pass Nvida: pass Intel: pass structure-field-var-array-array.frag AMD: pass Nvida: pass Intel: pass Signed-off-by: Timothy Arceri <t_arc...@yahoo.com.au> --- .../arrays-of-struct-with-field-arrays.vert | 29 ++++++++++++++++++++++ .../compiler/interface-field-array-array-var.vert | 18 ++++++++++++++ .../compiler/interface-field-array-var-array.vert | 18 ++++++++++++++ ...ace-field-maxbounds-access-array-array-var.geom | 18 ++++++++++++++ ...ace-field-maxbounds-access-array-var-array.geom | 18 ++++++++++++++ ...ace-field-maxbounds-access-var-array-array.geom | 18 ++++++++++++++ ...e-field-outofbounds-access-array-array-var.geom | 18 ++++++++++++++ ...e-field-outofbounds-access-array-var-array.geom | 18 ++++++++++++++ ...e-field-outofbounds-access-var-array-array.geom | 18 ++++++++++++++ .../compiler/interface-field-var-array-array.vert | 18 ++++++++++++++ .../compiler/interface-maxbounds.vert | 18 ++++++++++++++ .../compiler/interface-outofbounds.vert | 18 ++++++++++++++ .../arb_arrays_of_arrays/compiler/interface.vert | 18 ++++++++++++++ .../compiler/structure-field-array-array-var.frag | 19 ++++++++++++++ .../compiler/structure-field-array-var-array.frag | 19 ++++++++++++++ .../compiler/structure-field-var-array-array.frag | 19 ++++++++++++++ 16 files changed, 302 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/arrays-of-struct-with-field-arrays.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-array-array-var.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-array-array-var.geom create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-array-var-array.geom create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-var-array-array.geom create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-array-array-var.geom create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-array-var-array.geom create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-var-array-array.geom create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-field-var-array-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-maxbounds.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface-outofbounds.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/interface.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/structure-field-array-array-var.frag create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/structure-field-array-var-array.frag create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/structure-field-var-array-array.frag diff --git a/tests/spec/arb_arrays_of_arrays/compiler/arrays-of-struct-with-field-arrays.vert b/tests/spec/arb_arrays_of_arrays/compiler/arrays-of-struct-with-field-arrays.vert new file mode 100644 index 0000000..f04568b --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/arrays-of-struct-with-field-arrays.vert @@ -0,0 +1,29 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + * + * From page 18 (page 24 of the PDF) of the GLSL 1.20 spec: + * + * "Member declarators can contain arrays. Such arrays must have a size + * specified, and the size must be an integral constant expression that's + * greater than zero (see Section 4.3.3 "Constant Expressions")." + * + * From page 19 (page 25 of the PDF) of the GLSL 1.20 spec: + * + * "All basic types and structures can be formed into arrays." + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +struct s { + float x[3][2]; + int y; +}; + +void main() +{ + s a[2][4]; + gl_Position = vec4(a.length() + a[0][0].x.length()); +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-array-array-var.vert b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-array-array-var.vert new file mode 100644 index 0000000..0ed922c --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-array-array-var.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +uniform ArraysOfArraysBlock +{ + vec4 [3][2]a; +} i; + +void main() +{ + gl_Position = vec4(1.0); +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-array-var-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-array-var-array.vert new file mode 100644 index 0000000..5001dde --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-array-var-array.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +uniform ArraysOfArraysBlock +{ + vec4[2] a[3]; +} i; + +void main() +{ + gl_Position = vec4(1.0); +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-array-array-var.geom b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-array-array-var.geom new file mode 100644 index 0000000..d91f667 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-array-array-var.geom @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +in ArraysOfArraysBlock +{ + vec4 [3][2]a; +} i[]; + +void main() +{ + gl_Position = i[0].a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-array-var-array.geom b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-array-var-array.geom new file mode 100644 index 0000000..a942656 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-array-var-array.geom @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +in ArraysOfArraysBlock +{ + vec4[2] a[3]; +} i[]; + +void main() +{ + gl_Position = i[0].a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-var-array-array.geom b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-var-array-array.geom new file mode 100644 index 0000000..d194f9b --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-maxbounds-access-var-array-array.geom @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +in ArraysOfArraysBlock +{ + vec4 a[3][2]; +} i[]; + +void main() +{ + gl_Position = i[0].a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-array-array-var.geom b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-array-array-var.geom new file mode 100644 index 0000000..897de98 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-array-array-var.geom @@ -0,0 +1,18 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +in ArraysOfArraysBlock +{ + vec4 [3][2]a; +} i[]; + +void main() +{ + gl_Position = i[0].a[2][2]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-array-var-array.geom b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-array-var-array.geom new file mode 100644 index 0000000..7860256 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-array-var-array.geom @@ -0,0 +1,18 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +in ArraysOfArraysBlock +{ + vec4[2] a[3]; +} i[]; + +void main() +{ + gl_Position = i[0].a[3][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-var-array-array.geom b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-var-array-array.geom new file mode 100644 index 0000000..d864a99 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-outofbounds-access-var-array-array.geom @@ -0,0 +1,18 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +in ArraysOfArraysBlock +{ + vec4 a[3][2]; +} i[]; + +void main() +{ + gl_Position = i[0].a[3][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-field-var-array-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-var-array-array.vert new file mode 100644 index 0000000..cd97ed4 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-field-var-array-array.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +uniform ArraysOfArraysBlock +{ + vec4 a[3][2]; +} i; + +void main() +{ + gl_Position = vec4(1.0); +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-maxbounds.vert b/tests/spec/arb_arrays_of_arrays/compiler/interface-maxbounds.vert new file mode 100644 index 0000000..7199c52 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-maxbounds.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +uniform ArraysOfArraysBlock +{ + vec4 a; +} i[4][5]; + +void main() +{ + gl_Position = i[3][4].a; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface-outofbounds.vert b/tests/spec/arb_arrays_of_arrays/compiler/interface-outofbounds.vert new file mode 100644 index 0000000..afcafdf --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface-outofbounds.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +uniform ArraysOfArraysBlock +{ + vec4 a; +} i[4][5]; + +void main() +{ + gl_Position = i[3][5].a; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/interface.vert b/tests/spec/arb_arrays_of_arrays/compiler/interface.vert new file mode 100644 index 0000000..e7a519d --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/interface.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +uniform ArraysOfArraysBlock +{ + mat4 a; +} i[4][5]; + +void main() +{ + gl_Position = vec4(1.0); +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/structure-field-array-array-var.frag b/tests/spec/arb_arrays_of_arrays/compiler/structure-field-array-array-var.frag new file mode 100644 index 0000000..c361dcb --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/structure-field-array-array-var.frag @@ -0,0 +1,19 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +struct S { + vec4[3][2] x; +}; + +uniform S s; + +void main() +{ + gl_FragData[0] = s.x[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/structure-field-array-var-array.frag b/tests/spec/arb_arrays_of_arrays/compiler/structure-field-array-var-array.frag new file mode 100644 index 0000000..2e862e6 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/structure-field-array-var-array.frag @@ -0,0 +1,19 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +struct S { + vec4 [2] x[2]; +}; + +uniform S s; + +void main() +{ + gl_FragData[0] = s.x[0][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/structure-field-var-array-array.frag b/tests/spec/arb_arrays_of_arrays/compiler/structure-field-var-array-array.frag new file mode 100644 index 0000000..bb4a95e --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/structure-field-var-array-array.frag @@ -0,0 +1,19 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +struct S { + vec4 x[2][3]; +}; + +uniform S s; + +void main() +{ + gl_FragData[0] = s.x[1][2]; +} -- 1.9.3 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit