mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
Switch between memcpy implementations according to src/dest alignment.
This commit is contained in:
parent
6a13b6c346
commit
11c0215bf8
1 changed files with 10 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue