i965: Add plumbing for fast clear layer/level details
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 9 Jun 2016 07:59:06 +0000 (10:59 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 25 Nov 2016 14:57:07 +0000 (16:57 +0200)
commitea2c4196004980a513aee10b606bc1aa74d003c5
treee0c2d1cbe4096a20282d122a6c7066e3905be456
parentd07cf68a97b4ef382295c27a3053f2a899dd3122
i965: Add plumbing for fast clear layer/level details

Until now fast clear has been supported only for non-layered and
non-mipmapped buffers. However, from gen8 onwards there is hardware
support also for layered/mipmapped. Once this is enabled, fast clear
operations target specific layer/level and call for the state to be
tracked in the same granularity. This is the first step providing
the details from callers to the state tracking.

Patch introduces new interface for reading and writing the state
hiding the upcoming bookkeeping changes in the call sites. There is
bunch of sanity checks added that will be relaxed per hardware
generation later on when the actual functionality is enabled.

v2: Rebased on top current master setting the state in
    blorp_surf_for_miptree().
v3: Replace open-coded resolved check in surface state emission
    with intel_miptree_has_color_unresolved().

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@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