[Piglit] [PATCH] arb_shader_storage_buffer_object: add compiler test for dynamic indexing

Samuel Iglesias Gonsálvez siglesias at igalia.com
Thu Oct 1 05:15:19 PDT 2015


On 01/10/15 13:54, Tapani Pälli wrote:
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  ...hader-storage-block-array-dynamic-indexing.frag | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>  create mode 100644 tests/spec/arb_shader_storage_buffer_object/compiler/shader-storage-block-array-dynamic-indexing.frag
> 
> diff --git a/tests/spec/arb_shader_storage_buffer_object/compiler/shader-storage-block-array-dynamic-indexing.frag b/tests/spec/arb_shader_storage_buffer_object/compiler/shader-storage-block-array-dynamic-indexing.frag
> new file mode 100644
> index 0000000..a05e7fc
> --- /dev/null
> +++ b/tests/spec/arb_shader_storage_buffer_object/compiler/shader-storage-block-array-dynamic-indexing.frag
> @@ -0,0 +1,24 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50

As this is a test that checks one case of OpenGL ES 3.1 spec,
I think it should be "glsl_version: 3.10 es" if we supported it. If not,
maybe: glsl_version: 3.00 es

> +// require_extensions: GL_ARB_shader_storage_buffer_object
> +// [end config]
> +
> +#version 150

And here, in theory "#version 310 es"

Do we supported it in Mesa? If not... "#version 300 es" ??

But they are just suggestions. In any case,

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

Sam

> +#extension GL_ARB_shader_storage_buffer_object: require
> +
> +/* Page 50 in section 4.3.9 of the OpenGL ES 3.10 spec says:
> + *
> + *    "All indices used to index a uniform or shader storage block
> + *    array must be constant integral expressions."
> + */
> +
> +buffer buf {
> +	vec4 v;
> +} array[2];
> +
> +uniform int index;
> +
> +vec4 foo(void) {
> +	return array[index].v;
> +}
> 


More information about the Piglit mailing list