diff options
author | Chad Versace <[email protected]> | 2011-11-15 18:21:09 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-11-22 10:50:51 -0800 |
commit | 3d760664e6349c72624aa6d54d40df0233995c8e (patch) | |
tree | 8981d6b808caa24d29c31ad8ffed08776e10fac6 /src | |
parent | 1b2baf3b08d545c772e9636fb0a0614c489c3916 (diff) |
intel: Mark needed resolves when first enabling HiZ on a miptree
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index b4f6bb31897..ffceda27029 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -594,7 +594,26 @@ intel_miptree_alloc_hiz(struct intel_context *intel, mt->height0, mt->depth0, true); - return mt->hiz_mt != NULL; + + if (!mt->hiz_mt) + return false; + + /* Mark that all slices need a HiZ resolve. */ + struct intel_resolve_map *head = &mt->hiz_map; + for (int level = mt->first_level; level <= mt->last_level; ++level) { + for (int layer = 0; layer < mt->level[level].depth; ++layer) { + head->next = malloc(sizeof(*head->next)); + head->next->prev = head; + head->next->next = NULL; + head = head->next; + + head->level = level; + head->layer = layer; + head->need = INTEL_NEED_HIZ_RESOLVE; + } + } + + return true; } void |