diff options
author | Ian Romanick <[email protected]> | 2004-10-17 21:54:41 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-10-17 21:54:41 +0000 |
commit | 48da4a4a86fb17d972c4aa536a18988a3cdc51c1 (patch) | |
tree | 4cd96cd31760c6a0e0fb323f7ee2a4a58e59e3bb | |
parent | 40e852271b1a2f6a41e335c2089e683b24afe57c (diff) |
Fix t_vertex byte-ordering issues for PowerPC. This was tested with gears
and tunnel (for fog).
-rw-r--r-- | src/mesa/drivers/dri/r128/r128_tris.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_tris.c b/src/mesa/drivers/dri/r128/r128_tris.c index 9bc9d3f4a63..dfa86414ae3 100644 --- a/src/mesa/drivers/dri/r128/r128_tris.c +++ b/src/mesa/drivers/dri/r128/r128_tris.c @@ -585,10 +585,16 @@ static void r128RenderStart( GLcontext *ctx ) EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_3F_VIEWPORT, 0, 12 ); rmesa->coloroffset = offset; +#if MESA_LITTLE_ENDIAN EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_BGRA, R128_CCE_VC_FRMT_DIFFUSE_ARGB, 4 ); +#else + EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_ARGB, + R128_CCE_VC_FRMT_DIFFUSE_ARGB, 4 ); +#endif if ( index & (_TNL_BIT_COLOR1|_TNL_BIT_FOG) ) { +#if MESA_LITTLE_ENDIAN if ( index & _TNL_BIT_COLOR1) { rmesa->specoffset = offset; EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_RGB, @@ -601,6 +607,20 @@ static void r128RenderStart( GLcontext *ctx ) 1 ); else EMIT_PAD( 1 ); +#else + if (index & _TNL_BIT_FOG) + EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1UB_1F, R128_CCE_VC_FRMT_SPEC_FRGB, + 1 ); + else + EMIT_PAD( 1 ); + + if ( index & _TNL_BIT_COLOR1) { + rmesa->specoffset = offset; + EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_RGB, + R128_CCE_VC_FRMT_SPEC_FRGB, 3 ); + } else + EMIT_PAD( 3 ); +#endif } if ( index & _TNL_BIT_TEX(rmesa->tmu_source[0]) ) { |