summaryrefslogtreecommitdiff
path: root/kernels/image_1D_buffer.cl
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2015-08-13 10:24:15 +0800
committerYang Rong <rong.r.yang@intel.com>2015-08-27 15:07:10 +0800
commita8897597eb666b3579cb9f9e5efabd180f1278ac (patch)
treecde49b73e1710fc52b9cda289823694f8ad6470e /kernels/image_1D_buffer.cl
parentd0b775e727c224f031db049a6302baca306bab9d (diff)
utests: refine image 1d buffer test case.
We need to test large image 1d buffer read and write testing. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Diffstat (limited to 'kernels/image_1D_buffer.cl')
-rw-r--r--kernels/image_1D_buffer.cl12
1 files changed, 3 insertions, 9 deletions
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);
}