summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r--src/mesa/drivers/glide/fxtris.c8
-rw-r--r--src/mesa/drivers/glide/fxvbtmp.h28
2 files changed, 18 insertions, 18 deletions
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index ca3848df9da..5adb11e1f3f 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -116,10 +116,10 @@ fx_draw_tri(GLcontext * ctx, const fxVertex * v0, const fxVertex * v1,
#define FX_COLOR(vert, c) { \
GLubyte *col = c; \
- vert->v.r=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[0]); \
- vert->v.g=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[1]); \
- vert->v.b=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[2]); \
- vert->v.a=UBYTE_COLOR_TO_FLOAT_255_COLOR(col[3]); \
+ vert->v.r = col[0] * 255; \
+ vert->v.g = col[1] * 255; \
+ vert->v.b = col[2] * 255; \
+ vert->v.a = col[3] * 255; \
}
#define FX_COPY_COLOR( dst, src ) { \
diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h
index 8d7649c6bb0..39c69adf2d9 100644
--- a/src/mesa/drivers/glide/fxvbtmp.h
+++ b/src/mesa/drivers/glide/fxvbtmp.h
@@ -35,10 +35,10 @@ NAME(GLcontext * ctx, GLuint start, GLuint end)
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLuint tmu0_source = fxMesa->tmu_source[0];
GLuint tmu1_source = fxMesa->tmu_source[1];
- GLfloat(*tmu0_data)[4];
- GLfloat(*tmu1_data)[4];
- GLubyte(*color)[4];
- GLfloat(*proj)[4] = VB->ProjectedClipPtr->data;
+ GLfloat (*tmu0_data)[4];
+ GLfloat (*tmu1_data)[4];
+ GLfloat (*color)[4];
+ GLfloat (*proj)[4] = VB->ProjectedClipPtr->data;
fxVertex *v = &verts[start];
GLfloat sscale0 = fxMesa->s0scale;
GLfloat tscale0 = fxMesa->t0scale;
@@ -54,8 +54,8 @@ NAME(GLcontext * ctx, GLuint start, GLuint end)
if (IND & SETUP_TMU1)
tmu1_data = VB->TexCoordPtr[tmu1_source]->data;
- if (IND & SETUP_RGBA)
- color = VB->ColorPtr[0]->data;
+ if (IND & SETUP_RGBA)
+ color = VB->ColorPtr[0]->Ptr;
if (VB->ClipOrMask) {
for (i = start; i < end; i++, v++) {
@@ -80,10 +80,10 @@ NAME(GLcontext * ctx, GLuint start, GLuint end)
}
}
if (IND & SETUP_RGBA) {
- UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.r, color[i][0]);
- UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.g, color[i][1]);
- UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.b, color[i][2]);
- UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.a, color[i][3]);
+ v->v.r = color[i][0] * 255.0;
+ v->v.g = color[i][1] * 255.0;
+ v->v.b = color[i][2] * 255.0;
+ v->v.a = color[i][3] * 255.0;
}
if (IND & SETUP_TMU0) {
v->v.tmuvtx[0].sow = sscale0 * tmu0_data[i][0] * v->v.oow;
@@ -118,10 +118,10 @@ NAME(GLcontext * ctx, GLuint start, GLuint end)
}
}
if (IND & SETUP_RGBA) {
- UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.r, color[i][0]);
- UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.g, color[i][1]);
- UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.b, color[i][2]);
- UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.a, color[i][3]);
+ v->v.r = color[i][0] * 255.0;
+ v->v.g = color[i][1] * 255.0;
+ v->v.b = color[i][2] * 255.0;
+ v->v.a = color[i][3] * 255.0;
}
if (IND & SETUP_TMU0) {
v->v.tmuvtx[0].sow = sscale0 * tmu0_data[i][0] * v->v.oow;