[Mesa-dev] [PATCH] i965/blorp: Fix sRGB MSAA resolves.

Kenneth Graunke kenneth at whitecape.org
Mon Sep 24 16:37:14 PDT 2012


On 09/24/2012 07:23 AM, Paul Berry wrote:
> Commit e2249e8c4d06a85d6389ba1689e15d7e29aa4dff (i965/blorp: Add
> support for blits between SRGB and linear formats) changed blorp to
> always configure surface states for in linear format (even if the
> underlying surface is sRGB).  This allowed sRGB-to-linear and
> linear-to-sRGB blits to occur without causing the image to be
> inappropriately brightened or darkened.
> 
> However, it broke sRGB MSAA resolves, since they rely on the
> destination buffer format being sRGB in order to ensure that samples
> are averaged together in sRGB-correct fashion.
> 
> This patch fixes the problem by instead configuring the source buffer
> to use the *same* format as the destination buffer.  This ensures that
> the image won't be brightened or darkened, but preserves proper sRGB
> averaging.
> 
> Fixes piglit tests "EXT_framebuffer_multisample/accuracy srgb".
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55265
> 
> NOTE: This is a candidate for the stable branches.

Wow :( I don't know how I missed that.  Thanks for fixing this.

I retested with the latest L4D2 and it still works fine with your patch.

Reviewed-and-tested-by: Kenneth Graunke <kenneth at whitecape.org>



More information about the mesa-dev mailing list