From 9556a5286730aa6839b9aa7cbbb2fe815a318e28 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 9 Dec 2003 16:14:24 +0000 Subject: Fix VERT_SET_RGBA, VERT_SET_SPEC macros to account for change to floating point colors throughout mesa. --- src/mesa/drivers/dri/gamma/gamma_tris.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/gamma/gamma_tris.c') 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<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] -- cgit v1.2.3