This patch will preserve the BO & offset, and not the miptree for the aux_mcs buffer. Eventually it might make sense to pull put the sizing function in miptree creation, but for now this should be sufficient and not too hideous.
v2: Save BO's offset too (Lionel)
v3: Squash previous patch storing the size of the allocated aux buffer (Lionel) Fix memory leak with mcs_buf->bo (Lionel)
36d1c55 i965: Drop the aux mt when not used
src/mesa/drivers/dri/i965/brw_blorp.c | 4 +--
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 6 ++---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 31 ++++++++++++++--------
src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 21 +++++++++++++++
4 files changed, 46 insertions(+), 16 deletions(-)
Upstream: cgit.freedesktop.org