[Piglit] [PATCH RESEND 1/1] cl: Add test program-scope-arrays.
Tom Stellard
tom at stellard.net
Mon Jan 13 08:55:43 PST 2014
On Tue, Jan 07, 2014 at 06:21:36PM -0500, Jan Vesely wrote:
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
These patches should fix this test:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131216/199497.html
> ---
>
> Resending to not be forgotten.
>
> The last two tests fail on my AMD TURKS. All 4 tests pass on nVidia and Intel OCL.
> This functionality is used in gegl color kernels making at least 3 tests in
> their suite to fail.
>
> Jan
>
> tests/cl/program/execute/program-scope-arrays.cl | 57 ++++++++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644 tests/cl/program/execute/program-scope-arrays.cl
>
> diff --git a/tests/cl/program/execute/program-scope-arrays.cl b/tests/cl/program/execute/program-scope-arrays.cl
> new file mode 100644
> index 0000000..b9a962c
> --- /dev/null
> +++ b/tests/cl/program/execute/program-scope-arrays.cl
> @@ -0,0 +1,57 @@
> +/*!
> +[config]
> +name: program-scope-arrays
> +dimensions: 1
> +global_size: 4 0 0
> +
> +
> +[test]
> +name: simple-constant
> +kernel_name: simple_constant
> +arg_out: 0 buffer float[4] 3.0 3.0 3.0 3.0
> +
> +[test]
> +name: given-constant
> +kernel_name: given_constant
> +arg_in: 1 int 1
> +arg_out: 0 buffer float[4] 3.0 3.0 3.0 3.0
> +
> +[test]
> +name: simple-gid
> +kernel_name: simple_gid
> +arg_out: 0 buffer float[4] 4.0 3.0 2.0 1.0
> +
> +[test]
> +name: indirection
> +kernel_name: indirection
> +arg_in: 1 buffer uchar[4] 0 1 2 3
> +arg_out: 0 buffer float[4] 4.0 3.0 2.0 1.0
> +
> +!*/
> +
> +__constant float arr[] = {
> +4.0f,
> +3.0f,
> +2.0f,
> +1.0f,
> +};
> +
> +__kernel void simple_constant(__global float *out) {
> + int i = get_global_id(0);
> + out[i] = arr[1];
> +}
> +
> +__kernel void given_constant(__global float *out, int c) {
> + int i = get_global_id(0);
> + out[i] = arr[c];
> +}
> +
> +__kernel void simple_gid(__global float *out) {
> + int i = get_global_id(0);
> + out[i] = arr[i];
> +}
> +
> +__kernel void indirection(__global float *out, __global uchar *in) {
> + int i = get_global_id(0);
> + out[i] = arr[in[i]];
> +}
> --
> 1.8.4.2
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list