Re: [PATCH 0/4] Adding support for plane alpha/color blending through drm property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 08, 2014 at 01:51:15PM +0530, sagar.a.kamble@xxxxxxxxx wrote:
> From: Sagar Kamble <sagar.a.kamble@xxxxxxxxx>
> 
> This patch series introduces drm property modelled after glBlendFuc function. For i915
> constant alpha is exposed through this property to start with. Additional new property
> value for controlling pre-multiplied alpha is added.
> i-g-t test case is to be added.
> 
> These patches are based on following patches which are already under review/reviewed:
> 
> 4ae74f3 Documentation: drm: describing drm properties exposed by various drivers
> 134bdfe Propagate the error from intel_update_plane() up through intel_plane_restore() to the caller.
> a6ad21c Make drm_property_create_bitmask() a bit more generic by allowing the caller to specify which bits are in fact supported.
> 
> Sagar Kamble (4):
>   drm: Added plane alpha and color blending property
>   drm/i915: Enabling constant alpha drm property
>   drm/i915: Enabling pre-multiplied alpha drm property
>   Documentation: drm: describing plane alpha and color blending property

I'm not sure I follow what's being done with the GL blending equation
here. If we want to support a global alpha on the source plane (ie the
plane that is going to be blended into the "render target", what's
already there), the blending equation looks like:

(source is non-premultiplied, note the use of glBlendFuncSeparate())

RGB = ADD(SRC_COLOR*SRC_ALPHA, DST_COLOR*ONE_MINUS_SRC_ALPHA)
A   = ADD(SRC_COLOR, DST_COLOR*ONE_MINUS_SRC_ALPHA)

(source is premultiplied)

RGBA = ADD(SRC_COLOR*SRC_ALPHA, DST_COLOR*ONE_MINUS_SRC_ALPHA)

The gl blending stuff doesn't know anything about the premultiplied
nature of the incoming source color, it has to be programmed
accordingly.

-- 
Damien
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux