diff options
author | Brian Paul <[email protected]> | 2011-12-03 10:04:18 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-08 08:56:29 -0700 |
commit | 5acb291f319a0b32d9701b3e6c8624175f1a80e7 (patch) | |
tree | 7a521f4e19d12f9741c72d15c44afcd6c62f82da /src/mesa/state_tracker | |
parent | d9582026631ae3cd667f6cd13040b93e42db3e44 (diff) |
mesa: remove TextureMemCpy driver hook
There's probably no reason to use a special version of memcpy() anymore.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 86d5935c114..52f654d7da8 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -214,56 +214,6 @@ st_UnmapTextureImage(struct gl_context *ctx, /** - * From linux kernel i386 header files, copes with odd sizes better - * than COPY_DWORDS would: - * XXX Put this in src/mesa/main/imports.h ??? - */ -#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86) -static INLINE void * -__memcpy(void *to, const void *from, size_t n) -{ - int d0, d1, d2; - __asm__ __volatile__("rep ; movsl\n\t" - "testb $2,%b4\n\t" - "je 1f\n\t" - "movsw\n" - "1:\ttestb $1,%b4\n\t" - "je 2f\n\t" - "movsb\n" "2:":"=&c"(d0), "=&D"(d1), "=&S"(d2) - :"0"(n / 4), "q"(n), "1"((long) to), "2"((long) from) - :"memory"); - return (to); -} -#else -#define __memcpy(a,b,c) memcpy(a,b,c) -#endif - - -/** - * 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. - */ -static void * -do_memcpy(void *dest, const void *src, size_t n) -{ - if ((((unsigned long) src) & 63) || (((unsigned long) dest) & 63)) { - return __memcpy(dest, src, n); - } - else - return memcpy(dest, src, n); -} - - -/** * Return default texture resource binding bitmask for the given format. */ static GLuint @@ -1945,8 +1895,6 @@ st_init_texture_functions(struct dd_function_table *functions) functions->MapTextureImage = st_MapTextureImage; functions->UnmapTextureImage = st_UnmapTextureImage; - functions->TextureMemCpy = do_memcpy; - /* XXX Temporary until we can query pipe's texture sizes */ functions->TestProxyTexImage = _mesa_test_proxy_teximage; |