[Mesa-dev] [PATCH 3/4] i965: Remove the intel_miptree_prepare_fb_fetch wrapper.

Pohjolainen, Topi topi.pohjolainen at gmail.com
Thu Oct 19 06:00:24 UTC 2017


On Wed, Oct 18, 2017 at 10:42:59PM -0700, Kenneth Graunke wrote:
> Now that intel_miptree_prepare_texture takes levels and layers, there's
> not much use in this anymore.
> ---
>  src/mesa/drivers/dri/i965/brw_draw.c          |  6 ++++--
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 14 --------------
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.h |  5 +----
>  3 files changed, 5 insertions(+), 20 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
> index 53d973f3761..51e2a26ca2f 100644
> --- a/src/mesa/drivers/dri/i965/brw_draw.c
> +++ b/src/mesa/drivers/dri/i965/brw_draw.c
> @@ -478,8 +478,10 @@ brw_predraw_resolve_framebuffer(struct brw_context *brw)
>              intel_renderbuffer(fb->_ColorDrawBuffers[i]);
>  
>           if (irb) {
> -            intel_miptree_prepare_fb_fetch(brw, irb->mt, irb->mt_level,
> -                                           irb->mt_layer, irb->layer_count);
> +            intel_miptree_prepare_texture(brw, irb->mt, irb->mt->surf.format,
> +                                          irb->mt_level, 1,
> +                                          irb->mt_layer, irb->layer_count,
> +                                          false);
>           }
>        }
>     }
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 61b0a2dd49c..56105ef8af3 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -2651,20 +2651,6 @@ intel_miptree_prepare_image(struct brw_context *brw,
>                                  ISL_AUX_USAGE_NONE, false);
>  }
>  
> -void
> -intel_miptree_prepare_fb_fetch(struct brw_context *brw,
> -                               struct intel_mipmap_tree *mt, uint32_t level,
> -                               uint32_t start_layer, uint32_t num_layers)
> -{
> -   /* This is only used for non-coherent framebuffer fetch, so we don't
> -    * need to worry about CCS_E and can simply pass 'false' below.
> -    */
> -   assert(brw->screen->devinfo.gen < 9);

Should we move this into the block in brw_predraw_resolve_framebuffer() where
intel_miptree_prepare_texture() gets called?

Otherwise the series:

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

> -
> -   intel_miptree_prepare_texture(brw, mt, mt->surf.format, level, 1,
> -                                 start_layer, num_layers, false);
> -}
> -
>  enum isl_aux_usage
>  intel_miptree_render_aux_usage(struct brw_context *brw,
>                                 struct intel_mipmap_tree *mt,
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> index 6dd097ac6d0..c24b5a35f85 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> @@ -646,10 +646,7 @@ intel_miptree_prepare_texture(struct brw_context *brw,
>  void
>  intel_miptree_prepare_image(struct brw_context *brw,
>                              struct intel_mipmap_tree *mt);
> -void
> -intel_miptree_prepare_fb_fetch(struct brw_context *brw,
> -                               struct intel_mipmap_tree *mt, uint32_t level,
> -                               uint32_t start_layer, uint32_t num_layers);
> +
>  enum isl_aux_usage
>  intel_miptree_render_aux_usage(struct brw_context *brw,
>                                 struct intel_mipmap_tree *mt,
> -- 
> 2.14.2
> 
> _______________________________________________
> 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