On 24 September 2012 12:12, Eric Anholt <e...@anholt.net> wrote:

> Paul Berry <stereotype...@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 <e...@anholt.net>
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to