Hello,

I just tried created to cl::Buffer subbuffer-objects, where for the second creation I received an error:

cl_buffer_region bufReg;
bufReg.origin = 0;
bufReg.size = x;
cl::Buffer subBuf1 = someBuf.createSubBuffer(CL_MEM_READ_WRITE, CL_BUFFER_CREATE_TYPE_REGION, &bufReg, &error);
// ok

bufReg.origin = 100;
bufReg.size = x;
cl::Buffer subBuf2 = someBuf.createSubBuffer(CL_MEM_READ_WRITE, CL_BUFFER_CREATE_TYPE_REGION, &bufReg, &error);
// error: code -13, CL_MISALIGNED_SUB_BUFFER_OFFSET

some research revealed that on my platform (Intel SDK) the origin field has to be a multiple of 128 to avoid the alignment error. Iis that serious that I can create sub-buffer objects only if they fit to this really restrictive alignment boundary? Or is there some misunderstanding on my side?
I suppose the alignment is very much platform specific, but in general in my code I could not guarantee any specific alignment at all. So in short does it mean that I better stop trying to use sub-buffers at all, and just use ordinary buffers and appropriate offset / cb arguments? What are useful applications for sub-buffers given these tight restrictions?

thanks!