I have a kernel that gets some lightsource arrays as input parameters (directional, point and spot). The number of each light source array could also be 0. If the size is zero, I get an error when allocating mem on the gpu for that array. Since that doesn’t work, I tried to pass the kernel NULL as the light source array if the ammount is 0. But then I also get an error from the clSetKernelArg-function. How to avoid that and make the programm run properly?