[Mesa-dev] [PATCH 3/8] intel: Mark needed initial hiz ambiguates only if hiz is enabled
Kenneth Graunke
kenneth at whitecape.org
Tue Apr 9 15:51:56 PDT 2013
From: Chad Versace <chad.versace at linux.intel.com>
When allocating the hiz miptree, we mark each slice as needing a hiz
ambiguate. This patch updates the initial marking to mark only slices for
which hiz is enabled.
No behavioral change is introduced, because currently hiz is always
enabled for all slices. However, that will change in Haswell.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index fdb6504..7ffe042 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -1010,6 +1010,9 @@ intel_miptree_alloc_hiz(struct intel_context *intel,
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) {
+ if (!intel_miptree_slice_has_hiz(mt, level, layer))
+ continue;
+
head->next = malloc(sizeof(*head->next));
head->next->prev = head;
head->next->next = NULL;
--
1.8.2.1
More information about the mesa-dev
mailing list