diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-12-09 16:14:24 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-12-09 16:14:24 +0000 |
commit | 9556a5286730aa6839b9aa7cbbb2fe815a318e28 (patch) | |
tree | e01d9effd7da7e8940d5ab2135477c0223e91660 /src/mesa/drivers/dri/gamma | |
parent | 425deefdd04fbc58aa1c357697ce602ff3013516 (diff) |
Fix VERT_SET_RGBA, VERT_SET_SPEC macros to account for change to floating
point colors throughout mesa.
Diffstat (limited to 'src/mesa/drivers/dri/gamma')
-rw-r--r-- | src/mesa/drivers/dri/gamma/gamma_tris.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/gamma/gamma_tris.c b/src/mesa/drivers/dri/gamma/gamma_tris.c index f039103026..4d3578d15e 100644 --- a/src/mesa/drivers/dri/gamma/gamma_tris.c +++ b/src/mesa/drivers/dri/gamma/gamma_tris.c @@ -309,7 +309,13 @@ static struct { #define AREA_IS_CCW( a ) (a > 0) #define GET_VERTEX(e) (gmesa->verts + (e<<gmesa->vertex_stride_shift)) -#define VERT_SET_RGBA( v, c ) COPY_4V( v->ub4[4], c) +#define VERT_SET_RGBA( v, c ) \ +do { \ + UNCLAMPED_FLOAT_TO_UBYTE(v->ub4[4][0], (c)[0]); \ + UNCLAMPED_FLOAT_TO_UBYTE(v->ub4[4][1], (c)[1]); \ + UNCLAMPED_FLOAT_TO_UBYTE(v->ub4[4][2], (c)[2]); \ + UNCLAMPED_FLOAT_TO_UBYTE(v->uv4[4][3], (c)[3]); \ +} while (0) #define VERT_COPY_RGBA( v0, v1 ) v0->ui[4] = v1->ui[4] #define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[4] #define VERT_RESTORE_RGBA( idx ) v[idx]->ui[4] = color[idx] |