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