return (struct setup_stage *)stage;
}
-static inline unsigned pack_ub4( unsigned char b0,
+static INLINE unsigned pack_ub4( unsigned char b0,
unsigned char b1,
unsigned char b2,
unsigned char b3 )
(((unsigned int)b3) << 24));
}
-static inline unsigned fui( float f )
+static INLINE unsigned fui( float f )
{
union {
float f;
return fi.ui;
}
-static inline unsigned char float_to_ubyte( float f )
+static INLINE unsigned char float_to_ubyte( float f )
{
unsigned char ub;
UNCLAMPED_FLOAT_TO_UBYTE(ub, f);
/* Hardcoded vertex format: xyz/rgba
*/
-static inline void
+static INLINE void
emit_hw_vertex( struct i915_context *i915,
struct vertex_header *vertex )
{
OUT_BATCH( fui(vertex->data[0][1]) );
OUT_BATCH( fui(vertex->data[0][2]) );
- OUT_BATCH( pack_ub4(float_to_ubyte( vertex->data[1][0] ),
+ /* colors are ARGB (MSB to LSB) */
+ OUT_BATCH( pack_ub4(float_to_ubyte( vertex->data[1][2] ),
float_to_ubyte( vertex->data[1][1] ),
- float_to_ubyte( vertex->data[1][2] ),
+ float_to_ubyte( vertex->data[1][0] ),
float_to_ubyte( vertex->data[1][3] )) );
}
-static inline void
+static INLINE void
emit_prim( struct draw_stage *stage,
struct prim_header *prim,
unsigned hwprim,