i965/miptree: Allocate mcs_buf for an image's CCS
authorBen Widawsky <ben@bwidawsk.net>
Tue, 30 May 2017 11:53:50 +0000 (17:23 +0530)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 14 Aug 2017 17:43:30 +0000 (10:43 -0700)
commita068fdc8613db7c4409d5dbc6fbd815cf4256d9a
treee8c7a81f0279f4b4310de53f19369a8aa74dbf30
parentf6fbeaf1c46ce1d7fd73664022cfff43e40e46b7
i965/miptree: Allocate mcs_buf for an image's CCS

This code will disable actually creating these buffers for the scanout,
but it puts the allocation in place.

Primarily this patch is split out for review, it can be squashed in
later if preferred.

v2:
assert(mt->offset == 0) in ccs creation (as requested by Topi)
Remove bogus is_scanout check in miptree_release

v3:
Remove is_scanout assert in intel_miptree_create. It doesn't work with
latest codebase - not sure it ever should have worked.

v4:
assert(mt->last_level == 0) and assert(mt->first_level == 0) in ccs setup
(Topi)

v5 (Jason Ekstrand):
 - Base the decision to allocate a CCS on the image modifier

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c