[Mesa-dev] [PATCH] i965/blorp: Fix sRGB MSAA resolves.
Eric Anholt
eric at anholt.net
Mon Sep 24 12:12:20 PDT 2012
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.
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- 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/20120924/65a2d45f/attachment.pgp>
More information about the mesa-dev
mailing list