r300: Use compile-time endian detection in r300_state.c as well as r300_texstate.c.
authorOliver McFadden <z3ro.geek@gmail.com>
Mon, 28 May 2007 01:34:26 +0000 (01:34 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Wed, 30 May 2007 03:19:26 +0000 (03:19 +0000)
Probably best to not mix-and-match compile-time and run-time detection...

src/mesa/drivers/dri/r300/r300_state.c

index 38cf9d29a73eb377b2c42985dfba65a842562ef9..475eed1e9518c42da523bc90708e507b0822f05b 100644 (file)
@@ -1869,10 +1869,12 @@ static void r300ResetHwState(r300ContextPtr r300)
 
        r300->hw.unk2134.cmd[1] = 0x00FFFFFF;
        r300->hw.unk2134.cmd[2] = 0x00000000;
-       if (_mesa_little_endian())
-               r300->hw.vap_cntl_status.cmd[1] = R300_VC_NO_SWAP;
-       else
-               r300->hw.vap_cntl_status.cmd[1] = R300_VC_32BIT_SWAP;
+
+#ifdef MESA_LITTLE_ENDIAN
+       r300->hw.vap_cntl_status.cmd[1] = R300_VC_NO_SWAP;
+#else
+       r300->hw.vap_cntl_status.cmd[1] = R300_VC_32BIT_SWAP;
+#endif
 
        /* disable VAP/TCL on non-TCL capable chips */
        if (!has_tcl)