diff options
author | Jason Ekstrand <[email protected]> | 2016-10-10 11:18:06 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-06-14 18:15:05 -0700 |
commit | 83ab6327c14618a95625907af488b711a4f30d90 (patch) | |
tree | 1e4096241dd8d4fe94ce5c5d8c49b1d0b3dbc806 /src/mesa | |
parent | e4d06e4c531157f1f3e4683487ee9c81fa0cff9b (diff) |
i965/blorp: Set aux_usage to NONE for miplevels without HiZ
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index 4146f2986d2..a7b24147746 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -175,6 +175,10 @@ blorp_surf_for_miptree(struct brw_context *brw, } } + 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. @@ -1036,6 +1040,8 @@ intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt, blorp_surf_for_miptree(brw, &surf, mt, true, false, 0, &level, start_layer, num_layers, isl_tmp); + assert(surf.aux_usage == ISL_AUX_USAGE_HIZ); + struct blorp_batch batch; blorp_batch_init(&brw->blorp, &batch, brw, 0); blorp_hiz_op(&batch, &surf, level, start_layer, num_layers, op); |