[Mesa-dev] [PATCH] i965/blorp: Fix sRGB MSAA resolves.
Paul Berry
stereotype441 at gmail.com
Mon Sep 24 13:23:36 PDT 2012
On 24 September 2012 12:12, Eric Anholt <eric at anholt.net> wrote:
> Paul Berry <stereotype441 at gmail.com> writes:
> > + /* If we are blitting from sRGB to linear or vice versa, we still
> want the
> > + * blit to be a direct copy, so we need source and destination to
> use the
> > + * same format. However, we want the destination sRGB/linear state
> to be
> > + * correct (so that sRGB blending is used when doing an MSAA resolve
> to an
> > + * sRGB surface, and linear blending is used when doing an MSAA
> resolve to
> > + * a linear surface). Since blorp blits don't support any format
> > + * conversion (except between sRGB and linear), we can accomplish
> this by
> > + * simply setting up the source to use the same format as the
> destination.
> > + */
> > + src.brw_surfaceformat = dst.brw_surfaceformat;
>
> We'd get in trouble here if we ever have to relax formats_match to allow
> things like RGBA <-> BGRA blits (other drivers have apparently had to do
> this). You may consider an assert that the linear versions of the two
> formats match or something, though actually this is close enough to
> formats_match() in the file that I'm not too worried.
>
Yeah, that's a good point. I'll go ahead and add the assertion. Thanks.
>
> Reviewed-by: Eric Anholt <eric at anholt.net>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120924/39b052dd/attachment-0001.html>
More information about the mesa-dev
mailing list