Reputation: 139
First of all... I am no expert in OpenCL.
I am using 2 kernels. The output of the first kernel is image2d_t but the input of the second kernel is " __global const uchar* source".
__kernel void firstKernel(__read_only image2d_t input, __write_only image2d_t output)
{...}
__kernel void secondKernel( __global const uchar* source,...)
{...}
How to use the second kernel with that input?
Upvotes: 2
Views: 246
Reputation: 23446
I think you should be able to do it using the cl_khr_image2d_from_buffer
extension assuming your implementation supports it.
My understanding is you first create the buffer (bearing in mind alignment etc requirements of images), then create the image from the buffer using the extension's functionality. Usual rules about read and write access and synchronisation will apply.
Upvotes: 0