[Mesa-dev] [PATCH 07/18] i965: Make intel_mipmap_tree_map_raw() static

Martin Peres martin.peres at linux.intel.com
Mon Jul 6 07:38:59 PDT 2015


On 06/07/15 13:33, Chris Wilson wrote:
> No external users, so no need to export the symbol outside of our
> compilation unit.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Martin Peres <martin.peres at linux.intel.com>

> ---
>   src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 36 +++++++++++++--------------
>   src/mesa/drivers/dri/i965/intel_mipmap_tree.h |  7 ------
>   2 files changed, 18 insertions(+), 25 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index fcad043..f9dc74f 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -1342,6 +1342,24 @@ intel_miptree_copy_teximage(struct brw_context *brw,
>      intel_obj->needs_validate = true;
>   }
>   
> +static void *
> +intel_miptree_map_raw(struct brw_context *brw,
> +		      struct intel_mipmap_tree *mt,
> +		      GLbitfield mode)
> +{
> +   /* CPU accesses to color buffers don't understand fast color clears, so
> +    * resolve any pending fast color clears before we map.
> +    */
> +   intel_miptree_resolve_color(brw, mt);
> +   return brw_bo_map(mt->bo, mode & GL_MAP_WRITE_BIT ? MAP_WRITE : MAP_READ);
> +}
> +
> +static void
> +intel_miptree_unmap_raw(struct brw_context *brw,
> +                        struct intel_mipmap_tree *mt)
> +{
> +}
> +
>   static bool
>   intel_miptree_alloc_mcs(struct brw_context *brw,
>                           struct intel_mipmap_tree *mt,
> @@ -2052,24 +2070,6 @@ intel_miptree_updownsample(struct brw_context *brw,
>      }
>   }
>   
> -void *
> -intel_miptree_map_raw(struct brw_context *brw,
> -		      struct intel_mipmap_tree *mt,
> -		      GLbitfield mode)
> -{
> -   /* CPU accesses to color buffers don't understand fast color clears, so
> -    * resolve any pending fast color clears before we map.
> -    */
> -   intel_miptree_resolve_color(brw, mt);
> -   return brw_bo_map(mt->bo, mode & GL_MAP_WRITE_BIT ? MAP_WRITE : MAP_READ);
> -}
> -
> -void
> -intel_miptree_unmap_raw(struct brw_context *brw,
> -                        struct intel_mipmap_tree *mt)
> -{
> -}
> -
>   static void
>   intel_miptree_map_gtt(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 6c69572..0c25f1f 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> @@ -773,13 +773,6 @@ brw_miptree_layout(struct brw_context *brw,
>                      enum intel_miptree_tiling_mode requested,
>                      uint32_t layout_flags);
>   
> -void *intel_miptree_map_raw(struct brw_context *brw,
> -			    struct intel_mipmap_tree *mt,
> -			    GLbitfield mode);
> -
> -void intel_miptree_unmap_raw(struct brw_context *brw,
> -                             struct intel_mipmap_tree *mt);
> -
>   void
>   intel_miptree_map(struct brw_context *brw,
>   		  struct intel_mipmap_tree *mt,



More information about the mesa-dev mailing list