From: Corbin Simpson Date: Wed, 8 Jul 2009 18:27:26 +0000 (-0700) Subject: r300g: Add endian fix to vertex fetcher setup. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e46d12d39498199e18be70826a2d36028c7b93f3;p=mesa.git r300g: Add endian fix to vertex fetcher setup. As reported and initially tested by MrCooper. --- diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 163b14ef8e6..68da0aa4cbb 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) |