Reputation: 233
Does anyone know how to convert a given image2d object into buffer, and from buffer to image2d object?
I know that in opencl 1.2 there was an extension called cl_khr_image2d_from_buffer, and that in opencl 2 it became core functionality.
Upvotes: 3
Views: 924
Reputation: 6343
Use cl_khr_image2d_from_buffer when you can, otherwise write a kernel that copies the data from image to buffer or buffer to image. The memory layout of an image is private to the implementation and should be considered unknown.
Upvotes: 1