I'm trying to use clEnqueueCopyImage to copy from one region of an image to another part of the same image. The specification says the error CL_MEM_COPY_OVERLAP is returned if "src_image and dst_image are the same image object and the source and destination regions overlap." I'm getting this error even though I'm using non-overlapping regions. There is a test case in the attachment, which fails on the 64-bit Linux build of APP SDK 2.8.
Does anyone have recommendations for a workaround? I'm considering writing a kernel that does the copy, but I'm not sure if it's well-defined to read and write from a single image within a single kernel. Otherwise I could copy via a temporary buffer, but that seems pretty wasteful.
Thanks. Kernel-based copy reading and writing the same image seems to be working for me, at least on the CPU, which is all I need it for at the moment.