[Mesa-dev] [PATCH 4/4] intel: Fix software copying of miptree faces for weird formats.

Chad Versace chad.versace at linux.intel.com
Wed Feb 27 11:33:51 PST 2013


On 02/26/2013 11:15 PM, Eric Anholt wrote:
> Now that we have W-tiled S8, we can't just region_map and poke at bits --
> there has to be some swizzling.  Rely on intel_miptree_map to get that job
> done.  This should also get the highest performance path we know of for the
> mapping (interesting if I get around to finishing movntdqa some day).
> 
> Fixes around 32 piglit tests if brw_workaround_depthstencil_alignment() is
> tweaked to always do a rebase.
> ---
>  src/mesa/drivers/dri/intel/intel_mipmap_tree.c |   95 +++++++++++++++++++-----
>  src/mesa/drivers/dri/intel/intel_regions.c     |   33 --------
>  src/mesa/drivers/dri/intel/intel_regions.h     |   10 ---
>  3 files changed, 77 insertions(+), 61 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> index 217f13d..29dfd20 100644
> --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> @@ -703,6 +703,68 @@ intel_miptree_get_tile_offsets(struct intel_mipmap_tree *mt,



> +   /* Don't forget to copy the stencil data over, too.  We could have skipped
> +    * passing BRW_MAP_NO_TRANSCODE_BIT, but that would have meant
                 ^^^^^^^^^^^^^^^^^^^^^^^^^

The name needs an update. Other than that, patches 3 and 4 are
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>


> @@ -752,25 +827,9 @@ intel_miptree_copy_slice(struct intel_context *intel,
>  
>        fallback_debug("miptree validate blit for %s failed\n",
>  		     _mesa_get_format_name(format));
> -      void *dst = intel_region_map(intel, dst_mt->region, GL_MAP_WRITE_BIT);
> -      void *src = intel_region_map(intel, src_mt->region, GL_MAP_READ_BIT);
> -
> -      _mesa_copy_rect(dst,
> -		      dst_mt->cpp,
> -		      dst_mt->region->pitch,
> -		      dst_x, dst_y,
> -		      width, height,
> -		      src, src_mt->region->pitch,
> -		      src_x, src_y);
> -
> -      intel_region_unmap(intel, dst_mt->region);
> -      intel_region_unmap(intel, src_mt->region);


Ugh.... we really did this for S8 :(


More information about the mesa-dev mailing list