[Mesa-dev] [PATCH 08/11] i965/miptree: Call alloc_aux in create_for_bo

Jordan Justen jordan.l.justen at intel.com
Fri Aug 4 20:08:31 UTC 2017


On 2017-08-02 13:35:33, Jason Ekstrand wrote:
> Originally, I had moved it to the caller to make some things easier when
> adding the CCS modifier.  However, this broke DRI2 because
> intel_process_dri2_buffer calls intel_miptree_create_for_bo but never
> calls intel_miptree_alloc_aux.  Also, in hindsight, it should be pretty
> easy to make the CCS modifier stuff work even if create_for_bo allocates
> the CCS when DISABLE_AUX is not set.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101925

I guess you want to drop this based on Tapani's feedback.

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

> Cc: Tapani Palli <tapani.palli at intel.com>
> Cc: "17.2" <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 910bb46..305912c 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -839,9 +839,15 @@ intel_miptree_create_for_bo(struct brw_context *brw,
>     mt->bo = bo;
>     mt->offset = offset;
>  
> -   if (!(layout_flags & MIPTREE_LAYOUT_DISABLE_AUX))
> +   if (!(layout_flags & MIPTREE_LAYOUT_DISABLE_AUX)) {
>        intel_miptree_choose_aux_usage(brw, mt);
>  
> +      if (!intel_miptree_alloc_aux(brw, mt)) {
> +         intel_miptree_release(&mt);
> +         return NULL;
> +      }
> +   }
> +
>     return mt;
>  }
>  
> @@ -978,11 +984,6 @@ intel_miptree_create_for_dri_image(struct brw_context *brw,
>     if (is_winsys_image)
>        image->bo->cache_coherent = false;
>  
> -   if (!intel_miptree_alloc_aux(brw, mt)) {
> -      intel_miptree_release(&mt);
> -      return NULL;
> -   }
> -
>     return mt;
>  }
>  
> -- 
> 2.5.0.400.gff86faf
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list