summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMichal Krol <michal@tungstengraphics.com>2008-07-15 11:15:27 +0200
committerKeith Whitwell <keith@tungstengraphics.com>2008-09-21 22:13:57 -0700
commit9614eac85df028bbb77a5073f2f1839bdaa308a0 (patch)
tree689a3bf32bebec1ab408213e3b8021bef2b9c3d8 /src/mesa/main
parentce1685ce947545fac8c254cafdc0f133b6202ca9 (diff)
mesa: Silence compiler warnings on Windows.
Diffstat (limited to 'src/mesa/main')
-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 ae9ed0a84b..d4ccdf9fa0 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 8d5468aff0..163bda4501 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 e4229807ef..79ef8813ca 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2439,7 +2439,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,