[PATCH 4/4] EXA/evergreen/ni: accelerate PictOpOver with component alpha

Grigori Goronzy greg at chown.ath.cx
Mon Jul 22 15:42:11 PDT 2013


On 23.07.2013 00:30, Dave Airlie wrote:
> On Mon, Jul 22, 2013 at 2:06 PM, Grigori Goronzy <greg at chown.ath.cx> wrote:
>> Subpixel text rendering is typically done with a solid src and a
>> pixmap mask. Traditionally, this cannot be accelerated in a single
>> pass and requires two passes [1]. However, we can cheat a little
>> with a constant blend color.
>
> The hw should be able to do things in one pass with dual source blending afaik.
>

Yes it can do that, and this was actually my first idea. However, dual 
source blending requires additional render target state setup, 
modifications to the shaders, and so on. It's likely also a bit slower 
than single source blending, after all the shader needs to export twice 
as much data.

It might be worthwhile to get back to this to accelerate some of the 
other PictOps with component alpha, but using the constant blend color 
was the easier and faster solution for the common PictOpOver case. I 
think it's a nice trick, I wonder if any other driver implements it?

Grigori


More information about the xorg-driver-ati mailing list