summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2008-07-15 11:15:27 +0200
committerMichal Krol <[email protected]>2008-07-15 11:48:55 +0200
commit090e212c0c5e54156c3c33f7eecdfe01398a7222 (patch)
treec22df6784c0952aaf9d1bf7cd02a99ca2bd03319
parent3392bcaaa823bd791e8d7e4c5a7ce013831899bb (diff)
mesa: Silence compiler warnings on Windows.
-rw-r--r--src/mesa/main/texformat.c4
-rw-r--r--src/mesa/main/texrender.c8
-rw-r--r--src/mesa/main/texstore.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 11e7755960a..60f36c4a87f 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -55,10 +55,10 @@ nonlinear_to_linear(GLubyte cs8)
for (i = 0; i < 256; i++) {
const GLfloat cs = UBYTE_TO_FLOAT(i);
if (cs <= 0.04045) {
- table[i] = cs / 12.92;
+ table[i] = cs / 12.92f;
}
else {
- table[i] = _mesa_pow((cs + 0.055) / 1.055, 2.4);
+ table[i] = (GLfloat) _mesa_pow((cs + 0.055) / 1.055, 2.4);
}
}
tableReady = GL_TRUE;
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index 8d5468aff0d..163bda45014 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -159,7 +159,7 @@ texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLuint *zValues = (const GLuint *) values;
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
- GLfloat flt = (zValues[i] >> 8) * (1.0 / 0xffffff);
+ GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
trb->Store(trb->TexImage, x + i, y, z, &flt);
}
}
@@ -199,7 +199,7 @@ texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
const GLuint zValue = *((const GLuint *) value);
- const GLfloat flt = (zValue >> 8) * (1.0 / 0xffffff);
+ const GLfloat flt = (GLfloat) ((zValue >> 8) * (1.0 / 0xffffff));
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
trb->Store(trb->TexImage, x + i, y, z, &flt);
@@ -244,7 +244,7 @@ texture_put_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLuint *zValues = (const GLuint *) values;
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
- GLfloat flt = (zValues[i] >> 8) * (1.0 / 0xffffff);
+ GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
}
}
@@ -283,7 +283,7 @@ texture_put_mono_values(GLcontext *ctx, struct gl_renderbuffer *rb,
}
else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
const GLuint zValue = *((const GLuint *) value);
- const GLfloat flt = (zValue >> 8) * (1.0 / 0xffffff);
+ const GLfloat flt = (GLfloat) ((zValue >> 8) * (1.0 / 0xffffff));
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 113eef69f4c..edb1ae965d0 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2377,7 +2377,7 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
_mesa_unpack_depth_span(ctx, srcWidth,
GL_UNSIGNED_INT_24_8_EXT, /* dst type */
dstRow, /* dst addr */
- depthScale,
+ (GLuint) depthScale,
srcType, src, srcPacking);
/* get the 8-bit stencil values */
_mesa_unpack_stencil_span(ctx, srcWidth,