i965/miptree: Use cpu tiling/detiling when mapping
authorScott D Phillips <scott.d.phillips@intel.com>
Mon, 24 Sep 2018 08:39:33 +0000 (11:39 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 23 Oct 2018 11:08:05 +0000 (14:08 +0300)
commit54c823ec790427acbea31212a6ed30a17bd25ff0
treefca5ad75a4bfeb9de37aec6c086b0b8e90af1c38
parent11b1afdc92db98e93f2ca50beeb7fc481a11e708
i965/miptree: Use cpu tiling/detiling when mapping

Rename the (un)map_gtt functions to (un)map_map (map by
returning a map) and add new functions (un)map_tiled_memcpy that
return a shadow buffer populated with the intel_tiled_memcpy
functions.

Tiling/detiling with the cpu will be the only way to handle Yf/Ys
tiling, when support is added for those formats.

v2: Compute extents properly in the x|y-rounded-down case (Chris Wilson)

v3: Add units to parameter names of tile_extents (Nanley Chery)
    Use _mesa_align_malloc for the shadow copy (Nanley)
    Continue using gtt maps on gen4 (Nanley)

v4: Use streaming_load_memcpy when detiling

v5: (edited by Ken) Move map_tiled_memcpy above map_movntdqa, so it
    takes precedence.  Add intel_miptree_access_raw, needed after
    rebasing on commit b499b85b0f2cc0c82b7c9af91502c2814fdc8e67.

v6: refactor to changes done for sse41 separation (Tapani)

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v5)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c