[Mesa-dev] [PATCH] i965: Avoid blending with destination alpha when RB format has no alpha bits

Carl Worth cworth at cworth.org
Fri Jan 11 12:32:58 PST 2013

Ian Romanick <idr at freedesktop.org> writes:
> Curses!  I already fixed this for pre-GEN6... over 3 years ago! :(

Yes, that's a pain. On the up-side, I'll be adding testing to piglit for
this so hopefully we can avoid having more, similar breakage in the

> See commit eadd9b8e from December 2009.  At the very least, I think your 
> patch should use my fix_xRGB_alpha function since you're missing 
> GL_SRC_ALPHA_SATURATE.  There may be other refactoring that could 
> happen.  I see some duplication of the GL_MIN / GL_MAX checking, etc.

Thanks so much!

I did miss GL_SRC_ALPHA_SATURATE since I scanned the table in the
specification looking for instances of A_d, (and missed the fact that
"i" in the table was defined in a footnote to be min(A_s, 1 - A_d)).

So that will be a nice improvement to my patch.

Plus, your function avoids the code duplication in my patch for handling
both srcRGB and dstRGB.

I'll also look for any additional code sharing that can be performed.

Thanks for the review!


carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130111/ac843e9b/attachment.pgp>

More information about the mesa-dev mailing list