{
GLuint *d = ((GLuint *) dst);
const GLdouble scale = 1.0 / (GLdouble) 0xffffffff;
- *d = *src * scale;
+ *d = (GLuint) (*src * scale);
assert(*d >= 0.0f);
assert(*d <= 1.0f);
}
{
GLfloat *d = ((GLfloat *) dst);
const GLdouble scale = 1.0 / (GLdouble) 0xffffffff;
- *d = *src * scale;
+ *d = (GLfloat) (*src * scale);
assert(*d >= 0.0f);
assert(*d <= 1.0f);
}
const GLdouble scale = 1.0 / (GLdouble) 0xffffffff;
GLuint i;
for (i = 0; i < n; i++) {
- d[i] = src[i] * scale;
+ d[i] = (GLuint) (src[i] * scale);
assert(d[i] >= 0.0f);
assert(d[i] <= 1.0f);
}
const GLdouble scale = 1.0 / (GLdouble) 0xffffffff;
GLuint i;
for (i = 0; i < n; i++) {
- d[i].z = src[i] * scale;
+ d[i].z = (GLfloat) (src[i] * scale);
assert(d[i].z >= 0.0f);
assert(d[i].z <= 1.0f);
}
{
const GLdouble scale = 1.0 / (GLdouble) 0xffffff;
struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst;
- GLint i;
+ GLuint i;
for (i = 0; i < n; i++) {
- GLfloat z = (src[i] >> 8) * scale;
+ GLfloat z = (GLfloat) ((src[i] >> 8) * scale);
d[i].z = z;
d[i].x24s8 = src[i];
}
switch (_mesa_get_format_datatype(format)) {
case GL_UNSIGNED_NORMALIZED:
/* simple: 1.0 will convert to ~0 in the right bit positions */
- maskColor[0] = colorMask[0] ? 1.0 : 0.0;
- maskColor[1] = colorMask[1] ? 1.0 : 0.0;
- maskColor[2] = colorMask[2] ? 1.0 : 0.0;
- maskColor[3] = colorMask[3] ? 1.0 : 0.0;
+ maskColor[0] = colorMask[0] ? 1.0f : 0.0f;
+ maskColor[1] = colorMask[1] ? 1.0f : 0.0f;
+ maskColor[2] = colorMask[2] ? 1.0f : 0.0f;
+ maskColor[3] = colorMask[3] ? 1.0f : 0.0f;
_mesa_pack_float_rgba_row(format, 1,
(const GLfloat (*)[4]) maskColor, dst);
break;