summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-07-08 11:27:26 -0700
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-07-08 11:27:26 -0700
commite46d12d39498199e18be70826a2d36028c7b93f3 (patch)
tree82995234709341eb98b37ed1d8db0d98a587ed70 /src
parentce0f7954f883c94c793bf1b93699351defae34c5 (diff)
r300g: Add endian fix to vertex fetcher setup.
As reported and initially tested by MrCooper.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_state.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 163b14ef8e..68da0aa4cb 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -24,6 +24,8 @@
#include "util/u_pack_color.h"
#include "util/u_debug.h"
+
+#include "pipe/p_config.h"
#include "pipe/internal/p_winsys_screen.h"
#include "r300_context.h"
@@ -350,14 +352,19 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
rs->enable_vte = !state->bypass_vs_clip_and_viewport;
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
+ rs->vap_control_status = R300_VC_NO_SWAP;
+#else
+ rs->vap_control_status = R300_VC_32BIT_SWAP;
+#endif
+
/* If bypassing TCL, or if no TCL engine is present, turn off the HW TCL.
* Else, enable HW TCL and force Draw's TCL off. */
if (state->bypass_vs_clip_and_viewport ||
!r300_screen(pipe->screen)->caps->has_tcl) {
- rs->vap_control_status = R300_VAP_TCL_BYPASS;
+ rs->vap_control_status |= R300_VAP_TCL_BYPASS;
} else {
rs->rs.bypass_vs_clip_and_viewport = TRUE;
- rs->vap_control_status = 0;
}
rs->point_size = pack_float_16_6x(state->point_size) |