[Mesa-dev] [PATCH 13/13] gallivm: Fix lp_build_rgba8_to_fi32_soa for big endian

Adam Jackson ajax at redhat.com
Thu May 16 06:06:16 PDT 2013


From: Richard Sandiford <r.sandiford at uk.ibm.com>

Reviewed-by: Adam Jackson <ajax at redhat.com>
---
 src/gallium/auxiliary/gallivm/lp_bld_format_soa.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
index 2c62291..cf51b34 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
@@ -279,7 +279,11 @@ lp_build_rgba8_to_fi32_soa(struct gallivm_state *gallivm,
 
    /* Decode the input vector components */
    for (chan = 0; chan < 4; ++chan) {
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
       unsigned start = chan*8;
+#else
+      unsigned start = (3-chan)*8;
+#endif
       unsigned stop = start + 8;
       LLVMValueRef input;
 
-- 
1.8.2.1



More information about the mesa-dev mailing list