Hi to all,
I’ve recently encountered a problem with the nvidia OpenCL implementation that I can’t solve.
If I try to use clCreateSubBuffer on a cl_mem object obtained with clCreateFromGLBuffer, I always obtain athe CL_INVALID_VALUE error.
Are there any known issues with these functions?
The thing that makes me think that it’s an issue of the driver (instead of my code) is that the same code runs fine on an AMD card.
Here is a code snippet:
cl_int error; cl_mem mId = clCreateFromGLBuffer(deviceContext, CL_MEM_READ_WRITE, glBufferID, &error); if(error) cout << "GL buffer -> CL buffer failed: " << error; cl_buffer_region region; region.origin = 0 region.size = glBufferCapacity; cl_mem mSubId = clCreateSubBuffer(mId, CL_MEM_READ_WRITE, CL_BUFFER_CREATE_TYPE_REGION, ®ion, &error); if(error) cout << "CL buffer -> CL sub buffer failed: " << error;