Patrice Mandin wrote:
> Le Tue, 02 Jun 2009 15:32:07 +0200
> Roland Scheidegger <[email protected]> a écrit:
> 
>>>> If there are other chipsets that cannot do true separate alpha blend, we 
>>>> can always use PIPE_CAP to let Mesa know, and Mesa can do the fragment 
>>>> program alteration itself. (r3xx and r4xx also have this, so it might be 
>>>> useful later on.)
>>> I did more tests. I think I was wrong, in fact, when using
>>> BlendEquationSeparate functions, no triangle rendering command is sent
>>> to the gpu, so I suppose it's all software rendering. The shader
>>> program is a single instruction to set current color, plus it resend
>>> all tcl engine state.
>>>
>>> But it's good news if a fragment program can do this instead, so adding
>>> the PIPE_CAP should be useful, if other cards need it also.
>> How do you do this with a fragment shader?
>> I think if you wanted to do this, you'd need to redirect all normal
>> rendering as opaque to a temporary surface. Then, you could use a
>> fragment shader for doing the blend (using the temporary surface and the
>> destination surface as textures), outputting to another temporary
>> surface. Then copy back the 2nd temporary to the original destination.
>> Maybe...
> 
> Well, my last question is still valid though. If no fragment program
> work can do it easily, is it a good idea to have a PIPE_CAP for it? so
> Mesa knows how to deal with it, even falling back to software rendering?

I don't think there's any practical way to emulate separate alpha 
blending with fragment shaders.

The simplest thing to do would be to have a 
PIPE_CAP_SEPARATE_ALPHA_BLEND query so that Mesa would not advertise 
GL_EXT_blend_func_separate.

-Brian

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to