summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i915/intel_tex.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tex.c b/src/mesa/drivers/dri/i915/intel_tex.c
index fb542ed7b5c..7d52bfc27de 100644
--- a/src/mesa/drivers/dri/i915/intel_tex.c
+++ b/src/mesa/drivers/dri/i915/intel_tex.c
@@ -57,6 +57,15 @@ static void intelFreeTextureImageData( GLcontext *ctx,
}
}
+static void *do_memcpy( void *dest, const void *src, size_t n )
+{
+ if ( (((unsigned)src) & 63) ||
+ (((unsigned)dest) & 63))
+ return __memcpy(dest, src, n);
+ else
+ return memcpy(dest, src, n);
+}
+
void intelInitTextureFuncs(struct dd_function_table * functions)
{
@@ -88,5 +97,5 @@ void intelInitTextureFuncs(struct dd_function_table * functions)
*
* TODO: switch dynamically.
*/
- functions->TextureMemCpy = __memcpy;
+ functions->TextureMemCpy = do_memcpy;
}