If you check the GUI version of the Ray Tracer and print the current thread id in the places where a TaskSchedule is created/executed, you will see that different threads create and execute the TaskSchedule.
I think this is a bug since I don't think sharing TaskSchedules between threads is safe.
I am not sure, but this could be the cause we sometimes see clBuildError with OpenCL devices.
If you check the GUI version of the Ray Tracer and print the current thread id in the places where a TaskSchedule is created/executed, you will see that different threads create and execute the TaskSchedule.
I think this is a bug since I don't think sharing TaskSchedules between threads is safe.
I am not sure, but this could be the cause we sometimes see
clBuildError
with OpenCL devices.