To copy a texture to the device there are two steps necessary
Allocate the memory on the device
Copy the image to the device
_mem = clCreateImage2D($context, $mem_flags, $image_format, $width, $height, $stride, $source, &err);
The $mem_flags define how the memory is allocated. It can...