summaryrefslogtreecommitdiff
path: root/kernels/bench_copy_image.cl
blob: fb6d4f39e2a0c8d04091574e290b1db2a750c7d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
__kernel void
bench_copy_image(__read_only image2d_t src, __write_only image2d_t dst)
{
  uint4 color = 0;
  int2 coord;
  int x = (int)get_global_id(0);
  int y = (int)get_global_id(1);

  const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE| CLK_ADDRESS_CLAMP| CLK_FILTER_NEAREST;

  coord.x = x;
  coord.y = y;
  color=read_imageui(src, sampler, coord);
  write_imageui(dst, coord, color);
}