i965/gen7+: Implement fast color clear operation in BLORP.
authorPaul Berry <stereotype441@gmail.com>
Wed, 1 May 2013 15:04:12 +0000 (08:04 -0700)
committerPaul Berry <stereotype441@gmail.com>
Wed, 12 Jun 2013 18:10:06 +0000 (11:10 -0700)
commit5e5d4e021f7dde12fb0f4dfaf40fbbd4d119f4ab
treee57a14e96f071bdefc593d1402b0c18ad4c25807
parentdd3f950115218c69c9118436a5110a1ee6a2dda5
i965/gen7+: Implement fast color clear operation in BLORP.

Since we defer allocation of the MCS miptree until the time of the
fast clear operation, this patch also implements creation of the MCS
miptree.

In addition, this patch adds the field
intel_mipmap_tree::fast_clear_color_value, which holds the most recent
fast color clear value, if any. We use it to set the SURFACE_STATE's
clear color for render targets.

v2: Flag BRW_NEW_SURFACES when allocating the MCS miptree.  Generate a
perf_debug message if clearing to a color that isn't compatible with
fast color clear.  Fix "control reaches end of non-void function"
build warning.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_blorp.cpp
src/mesa/drivers/dri/i965/brw_blorp.h
src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
src/mesa/drivers/dri/i965/brw_clear.c
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/gen7_blorp.cpp
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.h