From: Ben Skeggs Date: Thu, 16 Dec 2010 01:12:52 +0000 (+1000) Subject: nvfx: fix fragprog word swapping on big-endian machines X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57dcd800cad857ce03fd0714924f9aaa5373eec7;p=mesa.git nvfx: fix fragprog word swapping on big-endian machines Signed-off-by: Ben Skeggs --- diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c index 13e8beed479..1740d72a8ae 100644 --- a/src/gallium/drivers/nvfx/nvfx_fragprog.c +++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c @@ -1189,12 +1189,12 @@ out_err: static inline void nvfx_fp_memcpy(void* dst, const void* src, size_t len) { -#ifndef WORDS_BIGENDIAN +#ifndef PIPE_ARCH_BIG_ENDIAN memcpy(dst, src, len); #else size_t i; for(i = 0; i < len; i += 4) { - uint32_t v = (uint32_t*)((char*)src + i); + uint32_t v = *(uint32_t*)((char*)src + i); *(uint32_t*)((char*)dst + i) = (v >> 16) | (v << 16); } #endif