AnsweredAssumed Answered

clEnqueueCopyImage returning CL_MEM_COPY_OVERLAP

Question asked by bmerry on Dec 5, 2012
Latest reply on Dec 10, 2012 by bmerry



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.