From 6a659315cdc754e02d701353a08bd28c02e78dbd Mon Sep 17 00:00:00 2001 From: Miklos Fazekas Date: Tue, 5 Oct 1999 19:00:11 +0000 Subject: Packed RGB support. --- src/mesa/drivers/glide/fxdrv.h | 71 ++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 24 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h index a533cfd0307..92d867b0a7a 100644 --- a/src/mesa/drivers/glide/fxdrv.h +++ b/src/mesa/drivers/glide/fxdrv.h @@ -79,6 +79,20 @@ extern void fx_sanity_triangle( GrVertex *, GrVertex *, GrVertex * ); #define S1COORD GR_VERTEX_SOW_TMU1_OFFSET #define T1COORD GR_VERTEX_TOW_TMU1_OFFSET + +#if FX_USE_PARGB + +#define CLIP_XCOORD 0 /* normal place */ +#define CLIP_YCOROD 1 /* normal place */ +#define CLIP_ZCOORD 2 /* normal place */ +#define CLIP_WCOORD 3 /* normal place */ +#define CLIP_GCOORD 4 /* GR_VERTEX_PARGB_OFFSET */ +#define CLIP_BCOORD 5 /* GR_VERTEX_SOW_TMU0_OFFSET */ +#define CLIP_RCOORD 6 /* GR_VERTEX_TOW_TMU0_OFFSET */ +#define CLIP_ACOORD 7 /* GR_VERTEX_OOW_TMU0_OFFSET */ + +#else + #define CLIP_XCOORD 0 /* normal place */ #define CLIP_YCOROD 1 /* normal place */ #define CLIP_ZCOORD 2 /* GR_VERTEX_Z_OFFSET */ @@ -89,7 +103,7 @@ extern void fx_sanity_triangle( GrVertex *, GrVertex *, GrVertex * ); #define CLIP_ACOORD 7 /* normal place */ - +#endif /* Should have size == 16 * sizeof(float). */ @@ -141,6 +155,12 @@ do { \ gWin[(x)].v.a=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[3]); \ } +#if FX_USE_PARGB +#define GOURAUD2(v, c) { \ + GLubyte *col = c; \ + v->argb=MESACOLOR2PARGB(col); \ +} +#else #define GOURAUD2(v, c) { \ GLubyte *col = c; \ v->r=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[0]); \ @@ -148,6 +168,7 @@ do { \ v->b=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[2]); \ v->a=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[3]); \ } +#endif /* Mergable items first @@ -178,29 +199,31 @@ do { \ #define FX_UM_E0_MODULATE 0x00000002 #define FX_UM_E0_DECAL 0x00000004 #define FX_UM_E0_BLEND 0x00000008 - -#define FX_UM_E1_REPLACE 0x00000010 -#define FX_UM_E1_MODULATE 0x00000020 -#define FX_UM_E1_DECAL 0x00000040 -#define FX_UM_E1_BLEND 0x00000080 - -#define FX_UM_E_ENVMODE 0x000000ff - -#define FX_UM_E0_ALPHA 0x00000100 -#define FX_UM_E0_LUMINANCE 0x00000200 -#define FX_UM_E0_LUMINANCE_ALPHA 0x00000400 -#define FX_UM_E0_INTENSITY 0x00000800 -#define FX_UM_E0_RGB 0x00001000 -#define FX_UM_E0_RGBA 0x00002000 - -#define FX_UM_E1_ALPHA 0x00004000 -#define FX_UM_E1_LUMINANCE 0x00008000 -#define FX_UM_E1_LUMINANCE_ALPHA 0x00010000 -#define FX_UM_E1_INTENSITY 0x00020000 -#define FX_UM_E1_RGB 0x00040000 -#define FX_UM_E1_RGBA 0x00080000 - -#define FX_UM_E_IFMT 0x000fff00 +#define FX_UM_E0_ADD 0x00000010 + +#define FX_UM_E1_REPLACE 0x00000020 +#define FX_UM_E1_MODULATE 0x00000040 +#define FX_UM_E1_DECAL 0x00000080 +#define FX_UM_E1_BLEND 0x00000100 +#define FX_UM_E1_ADD 0x00000200 + +#define FX_UM_E_ENVMODE 0x000003ff + +#define FX_UM_E0_ALPHA 0x00001000 +#define FX_UM_E0_LUMINANCE 0x00002000 +#define FX_UM_E0_LUMINANCE_ALPHA 0x00004000 +#define FX_UM_E0_INTENSITY 0x00008000 +#define FX_UM_E0_RGB 0x00010000 +#define FX_UM_E0_RGBA 0x00020000 + +#define FX_UM_E1_ALPHA 0x00040000 +#define FX_UM_E1_LUMINANCE 0x00080000 +#define FX_UM_E1_LUMINANCE_ALPHA 0x00100000 +#define FX_UM_E1_INTENSITY 0x00200000 +#define FX_UM_E1_RGB 0x00400000 +#define FX_UM_E1_RGBA 0x00800000 + +#define FX_UM_E_IFMT 0x00fff000 #define FX_UM_COLOR_ITERATED 0x00100000 #define FX_UM_COLOR_CONSTANT 0x00200000 -- cgit v1.2.3