Re: [Piglit] [PATCH] arb_bindless_texture: add new compiler tests for struct with image arrays
Reviewed-by: Nicolai HähnleOn 05.06.2017 16:34, Samuel Pitoiset wrote: ping? On 05/25/2017 08:02 PM, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset --- .../nested-struct-arrays-mismatch-format.frag | 27 .../nested-struct-with-arrays-no-qualifiers.frag | 29 ++ .../images/struct-with-arrays-mismatch-format.frag | 22 .../images/struct-with-arrays-no-qualifiers.frag | 24 ++ 4 files changed, 102 insertions(+) create mode 100644 tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag diff --git a/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag new file mode 100644 index 0..dfb518f80 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag @@ -0,0 +1,27 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable +#extension GL_ARB_arrays_of_arrays: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "It is a compile-time error to declare an image variable where the format +// qualifier does not match the image variable type." + +struct S_inner { +layout (r32i) image2D img; +}; + +struct { +S_inner si[2][2]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag new file mode 100644 index 0..5fbec1386 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag @@ -0,0 +1,29 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable +#extension GL_ARB_arrays_of_arrays: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "Uniforms not qualified with writeonly must have a format layout qualifier." +// +// Because GL_ARB_bindless_texture allows to declare images insides structures, +// this rule applies and this test should fail. + +struct S_inner { +image2D img; +}; + +struct { +S_inner si[2][2]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag new file mode 100644 index 0..b9981de77 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag @@ -0,0 +1,22 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "It is a compile-time error to declare an image variable where the format +// qualifier does not match the image variable type." + +struct { +layout (r32i) image2D imgs[6]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag new file mode 100644 index 0..bb29340fb --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag @@ -0,0 +1,24 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "Uniforms not qualified with writeonly must have a format layout qualifier." +// +// Because GL_ARB_bindless_texture allows to declare images insides structures, +//
Re: [Piglit] [PATCH] arb_bindless_texture: add new compiler tests for struct with image arrays
ping? On 05/25/2017 08:02 PM, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset--- .../nested-struct-arrays-mismatch-format.frag | 27 .../nested-struct-with-arrays-no-qualifiers.frag | 29 ++ .../images/struct-with-arrays-mismatch-format.frag | 22 .../images/struct-with-arrays-no-qualifiers.frag | 24 ++ 4 files changed, 102 insertions(+) create mode 100644 tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag diff --git a/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag new file mode 100644 index 0..dfb518f80 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag @@ -0,0 +1,27 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable +#extension GL_ARB_arrays_of_arrays: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "It is a compile-time error to declare an image variable where the format +// qualifier does not match the image variable type." + +struct S_inner { + layout (r32i) image2D img; +}; + +struct { + S_inner si[2][2]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag new file mode 100644 index 0..5fbec1386 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag @@ -0,0 +1,29 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable +#extension GL_ARB_arrays_of_arrays: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "Uniforms not qualified with writeonly must have a format layout qualifier." +// +// Because GL_ARB_bindless_texture allows to declare images insides structures, +// this rule applies and this test should fail. + +struct S_inner { + image2D img; +}; + +struct { + S_inner si[2][2]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag new file mode 100644 index 0..b9981de77 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag @@ -0,0 +1,22 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "It is a compile-time error to declare an image variable where the format +// qualifier does not match the image variable type." + +struct { + layout (r32i) image2D imgs[6]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag new file mode 100644 index 0..bb29340fb --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag @@ -0,0 +1,24 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "Uniforms not qualified with writeonly must have a format layout qualifier." +// +// Because GL_ARB_bindless_texture allows to declare images insides structures, +// this rule applies and this test should fail. + +struct { + image2D imgs[6]; +} s; + +void main() +{ +}
[Piglit] [PATCH] arb_bindless_texture: add new compiler tests for struct with image arrays
Signed-off-by: Samuel Pitoiset--- .../nested-struct-arrays-mismatch-format.frag | 27 .../nested-struct-with-arrays-no-qualifiers.frag | 29 ++ .../images/struct-with-arrays-mismatch-format.frag | 22 .../images/struct-with-arrays-no-qualifiers.frag | 24 ++ 4 files changed, 102 insertions(+) create mode 100644 tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag create mode 100644 tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag diff --git a/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag new file mode 100644 index 0..dfb518f80 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-arrays-mismatch-format.frag @@ -0,0 +1,27 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable +#extension GL_ARB_arrays_of_arrays: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "It is a compile-time error to declare an image variable where the format +// qualifier does not match the image variable type." + +struct S_inner { + layout (r32i) image2D img; +}; + +struct { + S_inner si[2][2]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag new file mode 100644 index 0..5fbec1386 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/nested-struct-with-arrays-no-qualifiers.frag @@ -0,0 +1,29 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable +#extension GL_ARB_arrays_of_arrays: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "Uniforms not qualified with writeonly must have a format layout qualifier." +// +// Because GL_ARB_bindless_texture allows to declare images insides structures, +// this rule applies and this test should fail. + +struct S_inner { + image2D img; +}; + +struct { + S_inner si[2][2]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag new file mode 100644 index 0..b9981de77 --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-mismatch-format.frag @@ -0,0 +1,22 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "It is a compile-time error to declare an image variable where the format +// qualifier does not match the image variable type." + +struct { + layout (r32i) image2D imgs[6]; +} s; + +void main() +{ +} diff --git a/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag new file mode 100644 index 0..bb29340fb --- /dev/null +++ b/tests/spec/arb_bindless_texture/compiler/images/struct-with-arrays-no-qualifiers.frag @@ -0,0 +1,24 @@ +// [config] +// expect_result: fail +// glsl_version: 3.30 +// require_extensions: GL_ARB_bindless_texture GL_ARB_shader_image_load_store +// [end config] + +#version 330 +#extension GL_ARB_bindless_texture: require +#extension GL_ARB_shader_image_load_store: enable + +// From Section 4.4.6.2 (Format Layout Qualifiers) of the GLSL 4.50 spec: +// +// "Uniforms not qualified with writeonly must have a format layout qualifier." +// +// Because GL_ARB_bindless_texture allows to declare images insides structures, +// this rule applies and this test should fail. + +struct { + image2D imgs[6]; +} s; + +void main() +{ +} -- 2.13.0 ___ Piglit mailing list