i965/blorp: Do not skip fast color clear with new color
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 12 May 2016 04:47:59 +0000 (07:47 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 12 May 2016 16:48:47 +0000 (19:48 +0300)
commit58e7392e12726c2590ae677efe1b10743f938edd
tree0970c63f5c47849e3d2243061b5cd2f06057a3d0
parent12dcad1b42925533561cca8a56975e38b6bfa669
i965/blorp: Do not skip fast color clear with new color

This hasn't been visible before. It showed up with lossless
compression with:

dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.rgb8

Current fast clear logic kicks color resolves even for gpu sampling.
In the test case this results into trashing of the fast color clear
state between two subsequent clears, and therefore each clear is
performed correctly.
With lossless compression the resolves are unnecessary and therefore
the clear state indicates that the buffer is already cleared. Without
considering if the previous color value was the same as the new,
clears that need to be performed are skipped and the buffer ends up
holding old pixel values.

v2 (Ken): Fix the comparison for gen < 9

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
src/mesa/drivers/dri/i965/brw_meta_util.h