util: silence MSVC double->float conversion warnings
authorBrian Paul <brianp@vmware.com>
Wed, 23 Jan 2013 00:45:57 +0000 (17:45 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 25 Jan 2013 22:41:39 +0000 (15:41 -0700)
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/util/u_tile.c

index 6c618a674459a0b681a8d837012edb719958c2cd..62298cdab09140ded83727e15f0fbb92b40654ca 100644 (file)
@@ -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;