On Mon, 26 Jan 2004, Thomas Winischhofer wrote:

> Can anyone explain the meaning of a8r8g8b8 "pure" alpha textures?

   It's probably a bug that XAA is letting those through.
a8r8g8b8 alpha masks mean one of two things:

1) If componentAlpha is set, it's 4 alpha masks which act separately
   on the different components of the source.

2) If componentAlpha is not set, you're supposed to just use the
   alpha portion.

 XAA's render support was written in the early days of render,
back when render didn't support as much stuff as it does now.
It probably makes sense for XAA to only pass them through when
componentAlpha is not set, then it would be up to the driver
to decide whether or not it can just extract the alpha portion,
and punt if it doesn't.

 We should probably be adding

  if(pMask->componentAlpha)
        return FALSE;

 right after the if(pMask) test to reject the 4-component alpha
condition.


                        Mark.


> 
> The two hooks for render acceleration are
> 
> a) CPUToScreenAlphaTexture (should be PICT_a8)
> b) CPUToScreenTexture (like eg PICT_a8r8g8b8)
> 
> a) is used for aa text; however, sometimes (haven't yet found out why) 
> the alphaType argument to this is not PICT_a8 as one would expect, but 
> PICT_a8r8g8b8.
> 
> I don't quite get the logic behind this. What's the CPUToScreenTexture 
> hook for if CPUToScreenAlphaTexture should be able to deal with ARGB 
> textures? And how should the "red", "green" and "blue" arguments 
> correlate with the RGB contents of this odd texture?
> 
> I extended RENDER acceleration in the SiS driver now to seemingly 
> correctly handle such "ARGB alpha textures" textures as well; I simply 
> ignore the RGB part of an ARGB alpha texture fed to 
> CPUToScreenAlphaTexture; but my curiousity WRT if this is the idea 
> behind it remains.
> 
> Thomas
> 
> -- 
> Thomas Winischhofer
> Vienna/Austria
> thomas AT winischhofer DOT net          *** http://www.winischhofer.net/
> twini AT xfree86 DOT org
> 
> 
> 
> 
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
> 

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to