[cairo] glitz and shader programs

David Reveman c99drn at cs.umu.se
Mon Apr 26 11:04:58 PDT 2004


On Mon, 2004-04-26 at 09:53 -0700, Jon Smirl wrote:
> Is it possible to implement the Cairo API without resorting to OpenGL shader
> programs while still keeping thing accelerated? I know glitz currently uses
> these, but can their use be eliminated without impacting performance? There's a
> lot of 3D hardware out there that doesn't support them.

I've managed to get the most imporatant compositing operations with mask
surfaces working only with multi-texturing. I'll clean up the code, do
some more testing and commit it later this week. With this working, only
gradients will require shaders for acceleration (I'm not counting
cairo's Gaussian filter type as no other backends than the OpenGL
backend currently supports it).

I'm sure that also the gradients can be rendered without shaders. It's
actually possible with the current version of glitz by using
non-rectangular clipping and color triangles but I don't like that
solution as it will be very complex, especially with multiple color
stops. I'm currently looking at other solutions...

I doubt that we can eliminate all shaders without impacting performance.
Filling a path using a radial gradient with the current version of glitz
is almost as fast as filling it with a solid color.

I don't think that we should spend to much time trying to eliminate the
use of shaders. Shaders are extremely flexible and efficient. Hardware
vendors also tend to support them better and better. So, if we like to
compete with microsoft and apple, I think that instead of trying to
eliminate shaders, we should try build a system that is designed for
efficient use of them. This is what's going to be important in the
future.

- David

-- 
David Reveman <c99drn at cs.umu.se>





More information about the cairo mailing list