i965: Add and use a getter for the clear color
authorNanley Chery <nanley.g.chery@intel.com>
Mon, 26 Mar 2018 21:32:18 +0000 (14:32 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Tue, 24 Apr 2018 20:41:14 +0000 (13:41 -0700)
commit7ea013c6d3b515701df8a4d2a50578ee9b691272
tree04d89b4c93d17c7d6ef9a8a5a625518188fb08e4
parentb55077a8bc1e85400b43141f9ed4a1f4a322b420
i965: Add and use a getter for the clear color

It returns both the inline clear color and a clear address which points
to the indirect clear color buffer (or NULL if unused/non-existent).
This getter allows CNL to sample from fast-cleared sRGB textures
correctly by doing the needed sRGB-decode on the clear color (inline)
and making the indirect clear color buffer unused.

v2 (Rafael):
* Have a more detailed commit message.
* Add a comment on the sRGB conversion process.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_blorp.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h