Mesa (master): r300g: Add endian fix to vertex fetcher setup.
Corbin Simpson
csimpson at kemper.freedesktop.org
Wed Jul 8 18:41:54 UTC 2009
Module: Mesa
Branch: master
Commit: e46d12d39498199e18be70826a2d36028c7b93f3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e46d12d39498199e18be70826a2d36028c7b93f3
Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date: Wed Jul 8 11:27:26 2009 -0700
r300g: Add endian fix to vertex fetcher setup.
As reported and initially tested by MrCooper.
---
src/gallium/drivers/r300/r300_state.c | 11 +++++++++--
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 163b14e..68da0aa 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) |
More information about the mesa-commit
mailing list