diff options
author | Matt Turner <[email protected]> | 2016-04-11 11:59:59 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2016-04-12 14:37:05 -0700 |
commit | eafeb8db66dae7619ff3cb039706b990d718cba7 (patch) | |
tree | b02a63f9f6b69ff841188d23b6f7bf5844a2f447 | |
parent | 0e605d9b3af68b67dceb8eeaeabebe91bc9cf31c (diff) |
i965/tiled_memcpy: Unroll bytes==64 case.
Reviewed-by: Roland Scheidegger <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tiled_memcpy.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c b/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c index 04a348ace18..b61a842b9cc 100644 --- a/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c +++ b/src/mesa/drivers/dri/i965/intel_tiled_memcpy.c @@ -149,6 +149,14 @@ rgba8_copy_aligned_dst(void *dst, const void *src, size_t bytes) assert(bytes == 0 || !(((uintptr_t)dst) & 0xf)); #if defined(__SSSE3__) || defined(__SSE2__) + if (bytes == 64) { + rgba8_copy_16_aligned_dst(dst + 0, src + 0); + rgba8_copy_16_aligned_dst(dst + 16, src + 16); + rgba8_copy_16_aligned_dst(dst + 32, src + 32); + rgba8_copy_16_aligned_dst(dst + 48, src + 48); + return dst; + } + while (bytes >= 16) { rgba8_copy_16_aligned_dst(dst, src); src += 16; @@ -171,6 +179,14 @@ rgba8_copy_aligned_src(void *dst, const void *src, size_t bytes) assert(bytes == 0 || !(((uintptr_t)src) & 0xf)); #if defined(__SSSE3__) || defined(__SSE2__) + if (bytes == 64) { + rgba8_copy_16_aligned_dst(dst + 0, src + 0); + rgba8_copy_16_aligned_dst(dst + 16, src + 16); + rgba8_copy_16_aligned_dst(dst + 32, src + 32); + rgba8_copy_16_aligned_dst(dst + 48, src + 48); + return dst; + } + while (bytes >= 16) { rgba8_copy_16_aligned_src(dst, src); src += 16; |