Reviewed-by: Iago Toral Quiroga <[email protected]>

I guess you will also send the struct version of this, right?

Iago

On Fri, 2015-11-20 at 10:58 -0800, Jordan Justen wrote:
> We test linking of programs that copy a large array, and a large
> structure.
> 
> Signed-off-by: Jordan Justen <[email protected]>
> ---
>  
> tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
>  seemed a bit too complex, when the more immediate issue was the linking
>  failure. Maybe it would be good to verify that the copy actually works, but
>  these at least expose the linking issue.
> 
>  .../linker/copy-large-array.shader_test            | 27 +++++++++++++++++++
>  .../linker/copy-large-struct.shader_test           | 31 
> ++++++++++++++++++++++
>  2 files changed, 58 insertions(+)
>  create mode 100644 
> tests/spec/arb_shader_storage_buffer_object/linker/copy-large-array.shader_test
>  create mode 100644 
> tests/spec/arb_shader_storage_buffer_object/linker/copy-large-struct.shader_test
> 
> diff --git 
> a/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-array.shader_test
>  
> b/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-array.shader_test
> new file mode 100644
> index 0000000..e0b04e5
> --- /dev/null
> +++ 
> b/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-array.shader_test
> @@ -0,0 +1,27 @@
> +# Tests linking of a fragment shader that copies a 'large' array field
> +# within an SSBO.
> +
> +[require]
> +GL >= 3.3
> +GLSL >= 3.30
> +GL_ARB_shader_storage_buffer_object
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 330
> +#extension GL_ARB_shader_storage_buffer_object: require
> +
> +#define SIZE 16
> +
> +buffer SSBO {
> +    mat4 src[SIZE];
> +    mat4 dst[SIZE];
> +};
> +
> +void main() {
> +    dst = src;
> +}
> +
> +[test]
> +link success
> diff --git 
> a/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-struct.shader_test
>  
> b/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-struct.shader_test
> new file mode 100644
> index 0000000..81de526
> --- /dev/null
> +++ 
> b/tests/spec/arb_shader_storage_buffer_object/linker/copy-large-struct.shader_test
> @@ -0,0 +1,31 @@
> +# Tests linking of a fragment shader that copies a 'large' struct
> +# field within an SSBO.
> +
> +[require]
> +GL >= 3.3
> +GLSL >= 3.30
> +GL_ARB_shader_storage_buffer_object
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 330
> +#extension GL_ARB_shader_storage_buffer_object: require
> +
> +#define SIZE 16
> +
> +struct S {
> +    mat4 m[SIZE];
> +};
> +
> +buffer SSBO {
> +    S src;
> +    S dst;
> +};
> +
> +void main() {
> +    dst = src;
> +}
> +
> +[test]
> +link success


_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to