summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_tile.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-01-22 17:45:57 -0700
committerBrian Paul <[email protected]>2013-01-25 15:41:39 -0700
commit539541f2e25e8b34da7513f1e920e5eddfa314a0 (patch)
tree79952b490f05f6d9a7cdbd04ccc53a19cbe3bb16 /src/gallium/auxiliary/util/u_tile.c
parent869071dfb7d527a6f576d98775e5abeb67c81cc9 (diff)
util: silence MSVC double->float conversion warnings
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_tile.c')
-rw-r--r--src/gallium/auxiliary/util/u_tile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
index 6c618a67445..62298cdab09 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -806,7 +806,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
for (j = 0; j < w; j++) {
/* convert 32-bit integer Z to float Z */
const double scale = 1.0 / 0xffffffffU;
- pDest[j] = ptrc[j] * scale;
+ pDest[j] = (float) (ptrc[j] * scale);
}
pDest += pt->stride/4;
ptrc += srcStride;
@@ -820,7 +820,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
for (j = 0; j < w; j++) {
/* convert 32-bit integer Z to float Z */
const double scale = 1.0 / 0xffffffffU;
- pDest[j*2] = ptrc[j] * scale;
+ pDest[j*2] = (float) (ptrc[j] * scale);
}
pDest += pt->stride/4;
ptrc += srcStride;