summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 ae9ed0a84ba..d4ccdf9fa06 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 e4229807ef1..79ef8813ca6 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,