[Webkit-unassigned] [Bug 70099] OpenCL implementation of W3C Filter Effects Master Bug

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 14 22:29:37 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=70099





--- Comment #5 from Dirk Schulze <krit at webkit.org>  2011-10-14 22:29:37 PST ---
(In reply to comment #4)
> (In reply to comment #2)
> > (In reply to comment #1)
> > 
> > I think the purpose of this work is not proving that something is possible. Rather that something can be done efficiently.
> > 
> > OpenCL has those nice kernel functions which allows an efficient implemetation of light or turbulence magic. If your GraphichsContext3D allows a similar drawing performance and capabilities, it might be a better choice. So how would you implement http://www.w3.org/TR/SVG/filters.html#feTurbulenceElement with G3D?
> 
> I would find a shader on the web to do it :-)
> 
> GLSL, OpenCL and Apple's CoreImage shading language are all just high level language interfaces to the GPU. So I believe what you can do with one you can do with the other. OpenCL may end up having a nicer syntax for some effects, but I think you can ultimately do the same thing with any of them. And since we're not talking about exposing the shader syntax to the author(yet!), I'm not sure it matters.

At first. Why do you suggest WebGL? I assume you mean OpenGL ES. I don't want to give web authors a possibility to apply kernels or shaders at this point.

I'm pretty sure that it is possible with OpenGL ES as well. The advantage of OpenCL is that it can run on different devices at the same time. You can use a CPU, GPU and a DSP all together to calculate the filters. I don't believe that OpenCL device support is a big problem. There is support for OpenCL on all platforms (linux, windows, macOS) and by all bigger graphic chip manufactures and even on embedded SoC solutions (HW and driver).

OpenCL can work together with OpenGL contexts, so we can still use GraphicsContext3D but do the calculations with OpenCL. So I don't see a performance lost. As a secondary effect OpenCL kernels are easy to program and therefore more easy to maintain in my opinion.

Another benefit on using OpenCL at this point is, that we can start implementing without modifying filters to use GraphicsContext3D. Also I'm not sure if it is a good idea to always us GraphicsContext3D for every filter (see https://bugs.webkit.org/show_bug.cgi?id=68479#c8).

Because OpenCL runs on CPU as well, it could still work on devices where the GPU is not OpenCL capable.

However, the first step is a benefit and necessary for all HW accelerated solutions. And we can try to go different ways and choose the most effective implementation that also runs on most devices. Implementations that are not used can be removed later like we do it for unused ports.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list