I have a kernel that runs on four open cl images.
If I build the kernel and then run, it runs fine.
But, if I generate a binary, and then load this from disk, I get an
CL_INVALID_KERNEL_ARG when trying to set the fourth image kernel argument.
So, it turns out that the problem was in my kernel.
I was passing four different opencl images, and choosing one of them at runtime based on global work item id.
The chosen image was stored in a local image variable. But, it looks like the AMD compiler didn't like that.
Solution was to work with original variables instead of the local variable.
Actually, it looks like the build fails for these kernels.
Retrieving data ...