summaryrefslogtreecommitdiff
path: root/src/kernels/cl_internal_copy_buffer_to_image_2d_align4.cl
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernels/cl_internal_copy_buffer_to_image_2d_align4.cl')
-rw-r--r--src/kernels/cl_internal_copy_buffer_to_image_2d_align4.cl18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/kernels/cl_internal_copy_buffer_to_image_2d_align4.cl b/src/kernels/cl_internal_copy_buffer_to_image_2d_align4.cl
new file mode 100644
index 00000000..79a3d8cd
--- /dev/null
+++ b/src/kernels/cl_internal_copy_buffer_to_image_2d_align4.cl
@@ -0,0 +1,18 @@
+kernel void __cl_copy_buffer_to_image_2d_align4(__write_only image2d_t image, global uint* buffer,
+ unsigned int region0, unsigned int region1, unsigned int region2,
+ unsigned int dst_origin0, unsigned int dst_origin1, unsigned int dst_origin2,
+ unsigned int src_offset)
+{
+ int i = get_global_id(0);
+ int j = get_global_id(1);
+ uint4 color = (uint4)(0);
+ int2 dst_coord;
+ if((i >= region0) || (j>= region1))
+ return;
+ dst_coord.x = dst_origin0 + i;
+ dst_coord.y = dst_origin1 + j;
+ src_offset += j * region0 + i;
+ color.x = buffer[src_offset];
+ write_imageui(image, dst_coord, color.x);
+}
+