> The dst blending parameter is just a factor the real dst value is multiplied
> by (except for min/max). There is no way to multiply an arbitrary value by a
> constant and get 1.0. But you can force 0, of course. I don't think there is
> hardware which supports such flexible swizzling in the blender. If x8 is
> just padding as you say, the value of it should be undefined and every
> operation using the padding bits should be undefined too except for texture
> sampling. It's not like I have any other choice.

As far as I can tell, the only problem you have with blending with an
X8 with random garbage, but with "read value" 1 is if any of the
blending factors is DST_ALPHA or INV_DST_ALPHA (or COLOR as an alpha
factor), in which case you can solve the issue by replacing the
offending factor with ONE or ZERO, as long as you have support for
RGB/A separate blend functions (which Gallium currenly assumes afaik).

You can also disable the alpha channel in the writemask to avoid
unnecessary work.

On nv30/nv40, there is an actual render target format that instructs
the card to read dst alpha as 1 (you can also choose whether to write
0 or 1).

Of course, one could argue that mesa/st should do the transformation
instead of Gallium drivers where hardware lacks such support.

I suppose just not advertising X8 formats as render target formats
could also work.

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to