GEGL is getting GPU-based image rendering and processing

GEGL is getting GPU-based image rendering and processing

Speed of image processing in GIMP has been a bit of a bottleneck for a long time. Now that GIMP is being gradually ported to a new hi-end core called GEGL it was about time the team started investigated GPU-side rendering and processing. And in fact this is what is happening now thanks to Google Summer of Code (GSoC) program.

The story started in 2009 with a GSoC project by Jerson Michael Perpetua who did initial work on GPU based rendering. Due to a number of reasons the code wasn't used in the main development branch and thus never made its way to any official GEGL release. But things are changing.

This year another GSoC student, Victor Oliveira, started a new project to implement OpenCL based rendering and processing on GPU in GEGL. His work is based on work by Jerson Michael, but introduces even more dramatic changes.

Unlike CUDA, a rather popular API for GPU based processing by NVidia, OpenCL is an open standard which is getting a lot of attention lately among free graphics projects. Darktable partially uses it for speeding up photo processing, Blender is getting it as part of new tile-based compositing, and LuxRender has a GPU based version that employs OpenCL. So it was an obvious choice.

Yesterday Victor published a rather verbose and technical review of his work so far. I encourage you to read it to get all the details. The bottom line: things already work, optimizations are required and more operations need to be ported to OpenCL.

GEGL on GPU

This is a fairly complex project, and I don't think anybody expected a working, fine-tuned OpenCL support in GEGL withing mere few months. Still, it's a huge step forward.

Given existing plans, full use of OpenCL by GIMP shouldn't be expected until at least v3.0 which will be the first version of GIMP making a real use of GEGL. As usual, the joint GIMP/GEGL team is interested in getting more people involved to ensure that future comes sooner.

Was it useful? There's more:

4 Responses. Comments closed for this entry.

  1. I really like where things are going to :) Future will be very exciting.

    Thx for news!

  2. Cool =D

    (slightly off-topic, is there a graphics card that is well supported under Linux and also supports OpenCL? Also, from what I can tell, the noveau and radeon drivers do not support OpenCL, which means running the proprietary drivers for NVidia/ATI cards for now …)

  3. Both NVidia and ATi support OpenCL via proprietary drivers. Gallium also supports OpenCL (it’s where at least darktable has OpenCL headers from), but I’m not sure about its status.

    In general, the only thing that worries me about binary NVidia drivers is that they don’t support up to date XRandR.

  4. prokoudine: ‘Gallium also supports OpenCL (it’s where at least darktable has OpenCL haders from), but I’m not sure about its status.’

    It still doesn’t look very optimistic, below link to an article posted on phoronix.com on March 27, 2011:
    http://www.phoronix.com/scan.php?page=news_item&px=OTI1OA

    some quotes from the article:

    In the second half of 2009 we saw the emergence of Mesa Clover, which was the initial work by Zack Rusion to bring OpenCL support over Mesa and Gallium3D. To this date, the Clover state tracker and other code has not been merged into the mainline Mesa Git tree but is living in a separate repository

    Mesa/Clover hasn’t been officially touched since last November and is not yet in a state that’s useful for end-users or even enthusiasts. This is while Khronos released OpenCL 1.1 last year and we imagine OpenCL 1.2 isn’t too far off either. Like the OpenGL situation has become, chances the OpenCL 1.2 specification will be published even before the Mesa / Gallium3D support for OpenCL 1.0 is in place.

    here is the tree, still no progress in it:
    http://cgit.freedesktop.org/mesa/clover/

    There is a little bit of hope though:
    Though sparking some new hope for Clover is Denis Steckelmacher. This is the same student developer living in Belgium that a few weeks back proposed writing an OpenGL 4.1 Core state tracker this summer without any OpenGL dependence on legacy Mesa code [...]
    Denis had then submitted a new proposal to replace Mesa IR with GLSL IR as that is a less ambitious but still sought after improvement by Mesa developers. There wasn’t too much excitement there and LunarG is already working on LunarGLASS, which is to use LLVM IR for Mesa. Intel developers are also supposedly already working on gutting out Mesa IR for GLSL IR too.