i965/blorp: Make BlitFramebuffer() do sRGB encoding in ES 3.x.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 17 Mar 2016 03:19:50 +0000 (20:19 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 21 Mar 2016 20:55:32 +0000 (13:55 -0700)
commit4b0a5b21ae39756919d739015fcc835f2901337f
treeb05520f86d068e375a4cd81bdde35dc0a56828f8
parent8679bb7c9e8bcf25639664fa2bd02cd2a3de9e52
i965/blorp: Make BlitFramebuffer() do sRGB encoding in ES 3.x.

According to the ES 3.0 and GL 4.4 specifications, glBlitFramebuffer
is supposed to perform sRGB decoding and encoding whenever sRGB formats
are in use.  The ES 3.0 specification is completely clear, and has
always stated this.

However, the GL specification has changed behavior in 4.1, 4.2, and
4.4.  The original behavior stated that no sRGB encoding should occur.
The 4.4 behavior matches ES 3.0's wording.  However, implementing the
new behavior appears to break applications such as Left 4 Dead 2.

This patch changes Meta to apply the ES 3.x rules in ES 3.x, but
leaves OpenGL alone for now, to avoid breaking applications.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp