Re: Question with regards to componentAlpha

Keith Packard <[email protected]> Sat, 14 Sep 2002 14:14:33 -0700
Newsgroups gmane.comp.xfree86.render
Message-ID <E17qKFN-0000Nq-00@localhost>
Around 14 o'clock on Sep 14, Thomas Roell wrote:

> Would you mind send this one over our way early, as we implemented
> the whole extension independantly, and hence might have more
> clarifications.

As with all of the XFree86 distribution, the Render spec is available via 
anonymous CVS; I'll post a note when I'm done making edits.

> Why doesn't render support planemasks (or channel-masks) anyway ?
> OpenGL/DX7 do, and hence HW does.

Because Render supports all X visuals, including StaticColor and 
PseudoColor which can't always be split into separate channels.

Besides, I haven't heard anyone ask for it.  Certainly unnecessary 
complexity is something we're trying to avoid.  Of course, were it to 
become necessary for some applications, it could be easily added.

> Sorry to say, but my experiance with render is exactly the opposite way
> around. The wording in the spec is very often extremely unclear, and only
> by looking at the fbcomposite.c/fbpict.c code it becomes clear what could
> have been meant.

I'm not surprised; the Render spec needs some more concentrated effort at 
clarity, but that work isn't at the top of my agenda.  I'd appreciate 
concrete proposals for wording changes.

> Here now a quick analysis of the problem that we have found with regards to
> implementability.  With a normal 3D pipeline blender you cannot do this

You need lower level access to the hardware; the usual 3D abstractions 
provided are certainly not sufficient for this operation.  As this is used 
primarily for text, performance of the software version is acceptable.

> So esstentially you either have to use 4 passes with planemasking, you
> you cannot do this in HW.If you have to use 4 passes anyway, the
> question becomes then, why not to let the application explicitely use
> 4 passes instead.

Because the logical operation is unified and consistent, and some hardware 
(and software) can perform this in a single pass.  Feel free to implement 
it however you like.

Note that I'm currently experimenting with rendering trapezoids with this
mode as well, the difference in quality on an LCD screen is pretty 
compelling.  I think the changes to the spec will be relatively minor.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab