diff options
author | Keith Whitwell <[email protected]> | 2003-12-09 16:21:31 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2003-12-09 16:21:31 +0000 |
commit | 8069ada29bc7484df48e081289284b6df569c799 (patch) | |
tree | cd356654c9752fa96400f8d86c6c15a7c39f4149 /src/mesa/drivers/dri/mga/mgatris.c | |
parent | 9556a5286730aa6839b9aa7cbbb2fe815a318e28 (diff) |
MGA only has one vertex format.
Diffstat (limited to 'src/mesa/drivers/dri/mga/mgatris.c')
-rw-r--r-- | src/mesa/drivers/dri/mga/mgatris.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/mga/mgatris.c b/src/mesa/drivers/dri/mga/mgatris.c index ca5f5a23cee..739619edf0f 100644 --- a/src/mesa/drivers/dri/mga/mgatris.c +++ b/src/mesa/drivers/dri/mga/mgatris.c @@ -364,36 +364,33 @@ static struct { #define VERT_SET_RGBA( v, c ) \ do { \ - mga_color_t *color = (mga_color_t *)&((v)->ui[coloroffset]); \ + mga_color_t *color = (mga_color_t *)&((v)->ui[4]); \ UNCLAMPED_FLOAT_TO_UBYTE(color->red, (c)[0]); \ UNCLAMPED_FLOAT_TO_UBYTE(color->green, (c)[1]); \ UNCLAMPED_FLOAT_TO_UBYTE(color->blue, (c)[2]); \ UNCLAMPED_FLOAT_TO_UBYTE(color->alpha, (c)[3]); \ } while (0) -#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[4] = v1->ui[4] #define VERT_SET_SPEC( v0, c ) \ do { \ - if (havespec) { \ - UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.red, (c)[0]); \ - UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.green, (c)[1]); \ - UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.blue, (c)[2]); \ - } \ + UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.red, (c)[0]); \ + UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.green, (c)[1]); \ + UNCLAMPED_FLOAT_TO_UBYTE(v0->v.specular.blue, (c)[2]); \ } while (0) -#define VERT_COPY_SPEC( v0, v1 ) \ -do { \ - if (havespec) { \ - v0->v.specular.red = v1->v.specular.red; \ - v0->v.specular.green = v1->v.specular.green; \ - v0->v.specular.blue = v1->v.specular.blue; \ - } \ + +#define VERT_COPY_SPEC( v0, v1 ) \ +do { \ + v0->v.specular.red = v1->v.specular.red; \ + v0->v.specular.green = v1->v.specular.green; \ + v0->v.specular.blue = v1->v.specular.blue; \ } while (0) -#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] -#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] -#define VERT_SAVE_SPEC( idx ) if (havespec) spec[idx] = v[idx]->ui[5] -#define VERT_RESTORE_SPEC( idx ) if (havespec) v[idx]->ui[5] = spec[idx] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[4] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[4] = color[idx] +#define VERT_SAVE_SPEC( idx ) spec[idx] = v[idx]->ui[5] +#define VERT_RESTORE_SPEC( idx ) v[idx]->ui[5] = spec[idx] #define LOCAL_VARS(n) \ mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ |