summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorChristian König <[email protected]>2015-03-26 14:49:18 +0100
committerChristian König <[email protected]>2015-03-27 11:30:32 +0100
commit787aa26cb7b48504f7770cacfc321324ecafa29a (patch)
tree667943ecba3a98de43f36c3387acc51c00439a51 /src/gallium
parent626434893a048f3ba89a751998fcb3789a3dbb96 (diff)
gallium/vl: partially revert "Use util_cpu_to_le{16,32} in many more places."
The data in memory is in big endian format and needs to be converted into CPU byte order. So the patch actually reversed what needs to be done. Signed-off-by: Christian König <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/vl/vl_vlc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/vl/vl_vlc.h b/src/gallium/auxiliary/vl/vl_vlc.h
index cad998911b6..2f905956dbf 100644
--- a/src/gallium/auxiliary/vl/vl_vlc.h
+++ b/src/gallium/auxiliary/vl/vl_vlc.h
@@ -149,7 +149,11 @@ vl_vlc_fillbits(struct vl_vlc *vlc)
} else if (bytes_left >= 4) {
/* enough bytes in buffer, read in a whole dword */
- uint64_t value = util_cpu_to_le32(*(const uint32_t*)vlc->data);
+ uint64_t value = *(const uint32_t*)vlc->data;
+
+#ifndef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
vlc->buffer |= value << vlc->invalid_bits;
vlc->data += 4;