[Piglit] [PATCH] gles-es-3.10: unsized-array-not-in-last-position
Andres Gomez
agomez at igalia.com
Fri Feb 17 10:18:15 UTC 2017
Reviewed-by: Andres Gomez <agomez at 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 <jmcasanova at 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 0000000..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
More information about the Piglit
mailing list