summaryrefslogtreecommitdiff
path: root/kernels
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2013-05-16 10:58:51 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-05-17 15:19:00 +0800
commitfce9f3eb89eeee3fba2296cad936fac582b1dc9f (patch)
treef133b093015da084cb173bfc9d7adafe7417e4cd /kernels
parent2d33298c289fc7194b2770c751b50e079178ee0e (diff)
utests: Refine the fill image0 test case to use map gtt.
Now we don't fill the whole image to a const color. we fill it according to the coords. Then we can use map gtt to get the result and verify the result easily on cpu side. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Tested-by: Simon Richter <Simon.Richter@hogyros.de>
Diffstat (limited to 'kernels')
-rw-r--r--kernels/test_fill_image0.cl2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernels/test_fill_image0.cl b/kernels/test_fill_image0.cl
index ad1339fa..9428092a 100644
--- a/kernels/test_fill_image0.cl
+++ b/kernels/test_fill_image0.cl
@@ -2,8 +2,8 @@ __kernel void
test_fill_image0(__write_only image2d_t dst)
{
int2 coord;
- int4 color4 = {0x12, 0x34, 0x56, 0x78};
coord.x = (int)get_global_id(0);
coord.y = (int)get_global_id(1);
+ int4 color4 = {coord.y & 0xFF, (coord.y & 0xFF00) >> 8, coord.x & 0xFF, (coord.x & 0xFF00) >> 8};
write_imagei(dst, coord, color4);
}