i965/meta-fast-clear: Disable GL_FRAMEBUFFER_SRGB during clear
authorNeil Roberts <neil@linux.intel.com>
Tue, 24 Nov 2015 16:01:03 +0000 (17:01 +0100)
committerNeil Roberts <neil@linux.intel.com>
Fri, 11 Dec 2015 18:05:56 +0000 (18:05 +0000)
commit44902ed1fa84525fbb959dc22357cb42214c185b
tree30a46fd886c81f9b02e9ee6b572f2cfa556b4a4f
parent369afdb7b61b3fdc8fa2851c751d8349f15bc822
i965/meta-fast-clear: Disable GL_FRAMEBUFFER_SRGB during clear

Adds MESA_META_FRAMEBUFFER_SRGB to the meta save state so that
GL_FRAMEBUFFER_SRGB will be disabled when performing the fast clear.
That way the render surface state will be programmed with the linear
equivalent format during the clear. This is important for Gen9 because
the SRGB formats are not marked as losslessly compressible so in
theory they aren't support for fast clears. It shouldn't make any
difference whether GL_FRAMEBUFFER_SRGB is enabled for the fast clear
operation because the color is not actually written to the framebuffer
so there is no chance for the hardware to apply the SRGB conversion on
it anyway.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_meta_fast_clear.c