From a8897597eb666b3579cb9f9e5efabd180f1278ac Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Thu, 13 Aug 2015 10:24:15 +0800 Subject: utests: refine image 1d buffer test case. We need to test large image 1d buffer read and write testing. Signed-off-by: Zhigang Gong Reviewed-by: "Yang, Rong R" --- kernels/image_1D_buffer.cl | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'kernels/image_1D_buffer.cl') diff --git a/kernels/image_1D_buffer.cl b/kernels/image_1D_buffer.cl index e8e0a863..2c1da694 100644 --- a/kernels/image_1D_buffer.cl +++ b/kernels/image_1D_buffer.cl @@ -1,13 +1,7 @@ -__kernel void image_1D_buffer(image1d_buffer_t image1, image1d_t image2, sampler_t sampler, __global int *results) +__kernel void image_1D_buffer(image1d_buffer_t image1, image1d_buffer_t image2) { int x = get_global_id(0); - int offset = x; - int4 col = read_imagei(image1, x); - int4 test = (col != read_imagei(image2, sampler, x)); - - if (test.x || test.y || test.z || test.w) - results[offset] = 0; - else - results[offset] = 1; + uint4 color = read_imageui(image1, x); + write_imageui(image2, x, color); } -- cgit v1.2.3