summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_aatriangle.c6
-rw-r--r--src/mesa/swrast/s_alphabuf.c4
-rw-r--r--src/mesa/swrast/s_pointtemp.h4
-rw-r--r--src/mesa/swrast/s_texture.c16
4 files changed, 17 insertions, 13 deletions
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 66796dff35b..ddcef4cd57d 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_aatriangle.c,v 1.24 2002/06/15 03:03:11 brianp Exp $ */
+/* $Id: s_aatriangle.c,v 1.25 2002/10/18 17:02:01 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -361,8 +361,8 @@ compute_lambda(const GLfloat sPlane[4], const GLfloat tPlane[4],
{
const GLfloat s = solve_plane(cx, cy, sPlane);
const GLfloat t = solve_plane(cx, cy, tPlane);
- const GLfloat invQ_x1 = solve_plane_recip(cx+1.0, cy, qPlane);
- const GLfloat invQ_y1 = solve_plane_recip(cx, cy+1.0, qPlane);
+ const GLfloat invQ_x1 = solve_plane_recip(cx+1.0F, cy, qPlane);
+ const GLfloat invQ_y1 = solve_plane_recip(cx, cy+1.0F, qPlane);
const GLfloat s_x1 = s - sPlane[0] / sPlane[2];
const GLfloat s_y1 = s - sPlane[1] / sPlane[2];
const GLfloat t_x1 = t - tPlane[0] / tPlane[2];
diff --git a/src/mesa/swrast/s_alphabuf.c b/src/mesa/swrast/s_alphabuf.c
index 4bf3368cb28..d68e6bf82b2 100644
--- a/src/mesa/swrast/s_alphabuf.c
+++ b/src/mesa/swrast/s_alphabuf.c
@@ -1,4 +1,4 @@
-/* $Id: s_alphabuf.c,v 1.13 2002/10/11 17:41:06 brianp Exp $ */
+/* $Id: s_alphabuf.c,v 1.14 2002/10/18 17:02:01 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -103,7 +103,7 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer )
void
_mesa_clear_alpha_buffers( GLcontext *ctx )
{
- const GLchan aclear = ctx->Color.ClearColor[3];
+ const GLchan aclear = (GLchan) ctx->Color.ClearColor[3];
GLuint bufferBit;
ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffers);
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index cf45dcde825..405e1f49243 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_pointtemp.h,v 1.19 2002/10/04 17:37:47 brianp Exp $ */
+/* $Id: s_pointtemp.h,v 1.20 2002/10/18 17:02:01 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -117,7 +117,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
if (ctx->Texture.Unit[u]._ReallyEnabled) {
const GLfloat q = vert->texcoord[u][3];
- const GLfloat invQ = (q == 0.0 || q == 1.0) ? 1.0 : (1.0 / q);
+ const GLfloat invQ = (q == 0.0F || q == 1.0F) ? 1.0F : (1.0F / q);
texcoord[u][0] = vert->texcoord[u][0] * invQ;
texcoord[u][1] = vert->texcoord[u][1] * invQ;
texcoord[u][2] = vert->texcoord[u][2] * invQ;
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c
index b415bf92e2e..db2e9e0df92 100644
--- a/src/mesa/swrast/s_texture.c
+++ b/src/mesa/swrast/s_texture.c
@@ -1,4 +1,4 @@
-/* $Id: s_texture.c,v 1.70 2002/10/18 13:40:59 brianp Exp $ */
+/* $Id: s_texture.c,v 1.71 2002/10/18 17:02:01 kschultz Exp $ */
/*
* Mesa 3-D graphics library
@@ -97,7 +97,7 @@
U = 1.0F - (S - (GLfloat) flr); /* flr is odd */ \
else \
U = S - (GLfloat) flr; /* flr is even */ \
- U = (U * SIZE) - 0.5; \
+ U = (U * SIZE) - 0.5F; \
I0 = IFLOOR(U); \
I1 = I0 + 1; \
if (I0 < 0) \
@@ -2154,10 +2154,14 @@ sample_linear_rect(GLcontext *ctx, GLuint texUnit,
w11 = a * b ;
/* compute weighted average of samples */
- rgba[i][0] = w00 * t00[0] + w10 * t10[0] + w01 * t01[0] + w11 * t11[0];
- rgba[i][1] = w00 * t00[1] + w10 * t10[1] + w01 * t01[1] + w11 * t11[1];
- rgba[i][2] = w00 * t00[2] + w10 * t10[2] + w01 * t01[2] + w11 * t11[2];
- rgba[i][3] = w00 * t00[3] + w10 * t10[3] + w01 * t01[3] + w11 * t11[3];
+ rgba[i][0] =
+ (GLchan) (w00 * t00[0] + w10 * t10[0] + w01 * t01[0] + w11 * t11[0]);
+ rgba[i][1] =
+ (GLchan) (w00 * t00[1] + w10 * t10[1] + w01 * t01[1] + w11 * t11[1]);
+ rgba[i][2] =
+ (GLchan) (w00 * t00[2] + w10 * t10[2] + w01 * t01[2] + w11 * t11[2]);
+ rgba[i][3] =
+ (GLchan) (w00 * t00[3] + w10 * t10[3] + w01 * t01[3] + w11 * t11[3]);
}
}