Draft: Enable OpenCL for layer modes and add first gpuified layer mode "Normal"

This MR requires !2414 and its GEGL counter-part gegl!226 (merged).

Similarly to !2414, this makes use of the newly introduced OpenCL writing framework to ease the addition of new OpenCL-accelerated operations. This one is a little more involved because it is coupled with a change in GEGL to enable OpenCL for GeglOperationPointComposer3.

The new acceleration should be complete in terms of functionality. All composite modes and masks (via aux layer) are supported.

Testing

Ideally, this would introduce new test cases that would compare the images generated by the new OpenCL implementation and the CPU-only implementation. There's no such thing now. GEGL has facilities for this and taking inspiration (or straight up copying) seems like a good avenue to explore. @ok, any pointers here?

Performance

This is not competitive with the CPU implementation, yet. I have yet to do more in-depth testing, benchmarking and profiling but the main bottleneck is not the implementation of the operation but of the OpenCL infrastructure in GEGL. But implementing more ops in OpenCL and also the critical ones like layer modes should provide the extra incentive to push this further.

Edited by Ondřej Míchal

Merge request reports

Loading