| 1 |
/* |
| 2 |
* Copyright (C) 2018-2021 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
R"===( |
| 9 |
__kernel void CopyImageToImage2d( |
| 10 |
__read_only image2d_t input, |
| 11 |
__write_only image2d_t output, |
| 12 |
int4 srcOffset, |
| 13 |
int4 dstOffset) { |
| 14 |
const int x = get_global_id(0); |
| 15 |
const int y = get_global_id(1); |
| 16 |
|
| 17 |
const int2 srcCoord = (int2)(x, y) + (int2)(srcOffset.x, srcOffset.y); |
| 18 |
const int2 dstCoord = (int2)(x, y) + (int2)(dstOffset.x, dstOffset.y); |
| 19 |
const uint4 c = read_imageui(input, srcCoord); |
| 20 |
write_imageui(output, dstCoord, c); |
| 21 |
} |
| 22 |
)===" |