nvfx: fix fragprog word swapping on big-endian machines
authorBen Skeggs <bskeggs@redhat.com>
Thu, 16 Dec 2010 01:12:52 +0000 (11:12 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 16 Dec 2010 01:13:21 +0000 (11:13 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
src/gallium/drivers/nvfx/nvfx_fragprog.c

index 13e8beed4794a503c5fd4668893356c2d1d40b82..1740d72a8ae22ead27c684e28e90cdfbbf0bb3e6 100644 (file)
@@ -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