[Mesa-dev] [PATCH 01/11] i965/blorp: Set aux_usage to NONE for miplevels without HiZ
Jason Ekstrand
jason at jlekstrand.net
Wed Jun 7 04:59:56 UTC 2017
---
src/mesa/drivers/dri/i965/brw_blorp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 28be620..763ce05 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -189,6 +189,10 @@ blorp_surf_for_miptree(struct brw_context *brw,
intel_miptree_used_for_rendering(brw, mt, *level,
start_layer, num_layers);
+ if (surf->aux_usage == ISL_AUX_USAGE_HIZ &&
+ !intel_miptree_level_has_hiz(mt, *level))
+ surf->aux_usage = ISL_AUX_USAGE_NONE;
+
if (surf->aux_usage != ISL_AUX_USAGE_NONE) {
/* We only really need a clear color if we also have an auxiliary
* surface. Without one, it does nothing.
@@ -994,6 +998,8 @@ gen6_blorp_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
blorp_surf_for_miptree(brw, &surf, mt, true, (1 << ISL_AUX_USAGE_HIZ),
&level, layer, 1, isl_tmp);
+ assert(surf.aux_usage == ISL_AUX_USAGE_HIZ);
+
struct blorp_batch batch;
blorp_batch_init(&brw->blorp, &batch, brw, 0);
blorp_gen6_hiz_op(&batch, &surf, level, layer, op);
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list