Use the x86 __memcpy to avoid performance clif for uploads where the

source data is worse than 64-byte aligned.
This commit is contained in:
Keith Whitwell 2006-01-28 17:50:59 +00:00
parent eb91c93c2e
commit d8f509e749

View file

@ -69,7 +69,20 @@ void intelInitTextureFuncs(struct dd_function_table * functions)
functions->NewTextureImage = intelNewTextureImage;
functions->DeleteTexture = _mesa_delete_texture_object;
functions->FreeTexImageData = intelFreeTextureImageData;
functions->TextureMemCpy = _mesa_memcpy;
functions->UpdateTexturePalette = 0;
functions->IsTextureResident = intelIsTextureResident;
/* The system memcpy (at least on ubuntu 5.10) has problems copying
* to agp (writecombined) memory from a source which isn't 64-byte
* aligned - there is a 4x performance falloff.
*
* The x86 __memcpy is immune to this but is slightly slower
* (10%-ish) than the system memcpy.
*
* The sse_memcpy seems to have a slight cliff at 64/32 bytes, but
* isn't much faster than x86_memcpy for agp copies.
*
* TODO: switch dynamically.
*/
functions->TextureMemCpy = __memcpy;
}