Skip to content
Snippets Groups Projects
Commit 11c0215b authored by Keith Whitwell's avatar Keith Whitwell
Browse files

Switch between memcpy implementations according to src/dest alignment.

parent 6a13b6c3
No related branches found
No related tags found
Loading
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment