[Piglit] [PATCH 6/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single input declaration tests
Timothy Arceri
timothy.arceri at collabora.com
Fri Nov 25 23:36:08 UTC 2016
On Wed, 2016-10-26 at 19:14 +0300, Andres Gomez wrote:
> 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.
Please reword this to:
This adds tests to check that all layout-qualifier-ids are taken into
account when spread across multiple layout-qualifiers for a single
global input declaration.
Also just us "Add" rather than "Adds" in the commit summary.
Otherwise:
Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com>
>
> 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 <agomez at 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 0000000..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 0000000..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 0000000..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 than one layout qualifier may appear in a single
> declaration."
> +//
> +// 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
> +
> +layout(lines) layout(invocations=4) in;
> +layout(triangle_strip, max_vertices=3) out;
> +layout(invocations=3) in;
> +
> +void main()
> +{
> +}
> diff --git a/tests/spec/arb_shading_language_420pack/compiler/layout-
> qualifiers/multiple-input-value-layout-qualifier-in-single-
> declaration-4.geom
> b/tests/spec/arb_shading_language_420pack/compiler/layout-
> qualifiers/multiple-input-value-layout-qualifier-in-single-
> declaration-4.geom
> new file mode 100644
> index 0000000..92371cc
> --- /dev/null
> +++ b/tests/spec/arb_shading_language_420pack/compiler/layout-
> qualifiers/multiple-input-value-layout-qualifier-in-single-
> declaration-4.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 than one layout qualifier may appear in a single
> declaration."
> +//
> +// 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
> +
> +layout(invocations=4) layout(lines) in;
> +layout(triangle_strip, max_vertices=3) out;
> +layout(invocations=3) in;
> +
> +void main()
> +{
> +}
More information about the Piglit
mailing list