On Fri, Mar 21, 2003 at 04:41:57PM +0100, Denis Oliver Kropp wrote:
> But I don't like the fact that the surface of the crtc2
> layer contains the data of the sub picture layer, too.

Well it's just how the hw works. It's just that anyone who uses the
sub-picture layer should be aware of these things. I should probably
convert the table from the G400 specs to DirectFB terminology.

> > Now that I think of it the rgb only palette stuff doesn't really matter
> > since it should only affect lookups. We can still set the alpha for the
> > entries and sub-picture layer's SetPalette can do it's stuff with them. 
> 
> You mean that the pixel alpha is written using the palette entry alpha?

No. What I mean is that we simply take the alpha of the first two entries
and stick them in c2bpp15halpha and c2bpp15lalpha registers. What these do
is define 8 bit alpha values to correspond to the 1 bit alpha of ARGB1555.
So when a pixel has alpha 0 the blender actually uses the value in
c2bpp15lalpha and same for alpha 1 and c2bpp15halpha. I think there's no
point in trying to maintain a relationship between crtc2->SetColor()'s 8
bit alpha value and what's written in these registers. Too much work and
since there are only two values it really can't work.

If a user wants to use only the CRTC2 layer they shouldn't even touch the
sub-picture settings in which case the defaults should be fine. Defaults
being color = black and c2bpp15lalpha = 0x00 and c2bpp15halpha = 0xff.

So I think I should only add the 15bpp alpha setup to SetPalette() and
make sure Disable() reprograms the registers with the default values. Of
course Disable() isn't really used for now so sub-picture users should
take care to set sensible defaults if they stop using the sub-picture but
continue to use the CRTC2 layer.

-- 
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/


--
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-dev" as subject.

Reply via email to