mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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:
parent
eb91c93c2e
commit
d8f509e749
1 changed files with 14 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue