Quite often the change will not be recognized when I rebuild the program. Trying to access member wood in the kernel function will return an error. However if I instead add something entirely new, like
The new struct will be recognized with all the members (however wood is typically still unacessible).
Now I haven’t found much info about how OpenCL caches the source in the documentations. I’m guessing it is platform dependent. I’m having trouble figuring out what is wrong since the problem does not occur consistently.
Quite often the change will not be recognized when I rebuild the program. Trying to access member wood in the kernel function will return an error. However if I instead add something entirely new, like
The new struct will be recognized with all the members (however wood is typically still unacessible).
Now I haven’t found much info about how OpenCL caches the source in the documentations. I’m guessing it is platform dependent. I’m having trouble figuring out what is wrong since the problem does not occur consistently.
Seems like a bug with your OpenCL implementation’s source code / kernel caching. You may try calling clUnloadCompiler before your call to clBuildProgram. But note that clUnloadCompiler is only a hint to the OpenCL implementation, so based on the implementation it may work or not.
Seems like a bug with your OpenCL implementation’s source code / kernel caching. You may try calling clUnloadCompiler before your call to clBuildProgram. But note that clUnloadCompiler is only a hint to the OpenCL implementation, so based on the implementation it may work or not.