Hi Denis,
According to the spec. you can pass the NULL pointer toas anargument if target parameter is a buffer.
From the spec:
"If the argument is a buffer object, the arg_value pointer can be
NULL or point to a NULL value in which case a NULL value will be used as the value for the
argument declared as a pointer to __global or __constant memory in the kernel"
We will try to reproduce the issue and update your accordingly.
Thanks,
Evgeny




clSetKernelArg arg_value as NULL object.
According OpenCL 1.1 specification clSetKernelArg arg_value could be NULL object.
http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetKernelArg...
So, the construction (below) is valid:
cl_mem null_buffer = NULL;
errid = clSetKernelArg(m_KernelContainer[kernelIdx], argIdx, sizeof(cl_mem), &null_buffer);
OclCheckError(errid);
However, on Intel OpenCL SDK 1.5, I am keep getting error:
OpenCL Error : CL_INVALID_MEM_OBJECT
I've tried same construction on Nvidia OpenCL 1.1, it works fine. no error at all.
Am I missing something or that could be a bug?
Thanks,
-Denis