i965/gen9: Add XY_FAST_COPY_BLT support to intelEmitCopyBlit()
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 15 Apr 2015 05:06:49 +0000 (22:06 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Mon, 29 Jun 2015 20:17:44 +0000 (13:17 -0700)
commit412c8c8e7eaeec2763bb21a30626544b5a711cb2
tree7c693a66b39b9485dcb1333cb3fd7264d31766bd
parentca21c9ab28df24ef015ead28df1dcccd90387df6
i965/gen9: Add XY_FAST_COPY_BLT support to intelEmitCopyBlit()

This patch enables using XY_FAST_COPY_BLT only for Yf/Ys tiled buffers.
It can be later turned on for other tiling patterns (X,Y) too.

V3: Flush in between sequential fast copy blits.
    Fix src/dst alignment requirements.
    Make can_fast_copy_blit() helper.
    Use ffs(), is_power_of_two()
    Move overlap computation inside intel_miptree_blit().

V4: Use _mesa_regions_overlap() function.
    Add check for src_buffer == dst_buffer.
    Simplify horizontal and vertical alignment computations.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
src/mesa/drivers/dri/i965/intel_blit.c
src/mesa/drivers/dri/i965/intel_blit.h
src/mesa/drivers/dri/i965/intel_copy_image.c
src/mesa/drivers/dri/i965/intel_reg.h