On Fri, Mar 21, 2014 at 07:06:46PM +0530, Sagar Arun Kamble wrote: > Hi Damien, > > On Thu, 2014-03-20 at 14:45 +0000, Damien Lespiau wrote: > > On Thu, Mar 20, 2014 at 02:11:40PM +0000, Damien Lespiau wrote: > > > (source is premultiplied) > > > > > > RGBA = ADD(SRC_COLOR*SRC_ALPHA, DST_COLOR*ONE_MINUS_SRC_ALPHA) > > > > Grr, copy/paste error. If the source is already premultiplied: > > > > RGBA = ADD(SRC_COLOR, DST_COLOR*ONE_MINUS_SRC_ALPHA) > > > > 1. Currently there is no interface to advertise the DRM_FORMATS plane > supportes to user mode? Should we add new IOCTL for that and include > pre-multiplied alpha formats while advertising? Or am I missing any such > API already available? There's a 'formats' array in drmModePlane. > 2. About constant alpha property - when we program constant alpha > register will hardware be able to take care of the blending as per > equations you have specified for non-premultiplied-alpha and > premultiplied-alpha cases or we have to do any additional setting? > Confusion is because of two combinations: > a. pre-multiplied alpha+constant alpha > b. non-pre-multiplied alpha+constant alpha The first part of the question should be in the spec. I really do expect the hw to work correctly with any combination of (premul, non-premult) x (plane alpha, no plane alpha) To be more clear: I don't think the glBlendFunc constants can represent everything we want: - It'd need to differentiate what we want do to between RGB and A (the same reason glBlendFuncSeparate was introduced). - We can't represent blending of an unpremultied fb with a plane-global alpha with just the GL blending equation as it needs two multiplications (so in GL, you would do one of them in the fragment shader). I would just proceed with a premultipled FB format and the alpha plane property. Let's wait until Ville returns, I may be totally not getting what he meant. -- Damien _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx