I am trying to apply filters in sequence base image -> filter1 -> filter2 -> read image. I used to use CL1.1 (C) in which I had events so filter2 would need to wait for filter1 event to finish and read would need to wait for filter2 event to finish.
In CL 1.2 (C++) this is no longer the case as it asks for a vector of events now. But my code below still works and produces the correct result and I don't understand why as with CL1.1 (C) this wouldn't have worked.
cl::CommandQueue queue(context, device, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
...
err = queue.enqueueNDRangeKernel(filter1Kernel, cl::NullRange, globalWorkSize, cl::NullRange, nullptr, nullptr);
err = queue.enqueueNDRangeKernel(filter2Kernel, cl::NullRange, globalWorkSize, cl::NullRange, nullptr, nullptr);
err = queue.enqueueReadImage(filter2Image, CL_FALSE, origin, region, 0, 0, ResultImage, nullptr, nullptr);
I can access the image even with a non blocking call and getting the correct output. Is synchronisation no longer needed?