We need this split for the same reason that we need the split for CCS:
intel_miptree_supports_hiz is called *before* we choose the actual
tiling. Adding a tiling_supports_hiz helper lets choose_aux_usage
more accurately decide whether or not to enable hiz. In particular,
this prevents us from enabling HiZ on linear depth buffers.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
return true;
}
+static bool
+intel_tiling_supports_hiz(const struct brw_context *brw, unsigned tiling)
+{
+ if (brw->gen < 6)
+ return false;
+
+ return tiling == I915_TILING_Y;
+}
+
static bool
intel_miptree_supports_hiz(struct brw_context *brw,
struct intel_mipmap_tree *mt)
} else {
mt->aux_usage = ISL_AUX_USAGE_CCS_D;
}
- } else if (intel_miptree_supports_hiz(brw, mt)) {
+ } else if (intel_tiling_supports_hiz(brw, mt->tiling) &&
+ intel_miptree_supports_hiz(brw, mt)) {
mt->aux_usage = ISL_AUX_USAGE_HIZ;
}