postprocess: silence some MSVC float/int warnings
authorBrian Paul <brianp@vmware.com>
Wed, 20 Mar 2013 16:54:07 +0000 (10:54 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 21 Mar 2013 15:24:35 +0000 (09:24 -0600)
src/gallium/auxiliary/postprocess/pp_init.c
src/gallium/auxiliary/postprocess/pp_mlaa.c

index d9552736f00f8652dc17c8286416d0ed113ab93a..89aa501b21e37503f7350dd48e848fbfc6f5aacb 100644 (file)
@@ -260,8 +260,8 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w,
    p->framebuffer.width = w;
    p->framebuffer.height = h;
 
-   p->viewport.scale[0] = p->viewport.translate[0] = (float) w / 2.0;
-   p->viewport.scale[1] = p->viewport.translate[1] = (float) h / 2.0;
+   p->viewport.scale[0] = p->viewport.translate[0] = (float) w / 2.0f;
+   p->viewport.scale[1] = p->viewport.translate[1] = (float) h / 2.0f;
    p->viewport.scale[3] = 1.0f;
    p->viewport.translate[3] = 0.0f;
 
index 297f3e443c14c7a6f4b5b8646b0ac863674068fc..fcbc573c70a7d7b5bdb4239d9f66c1af3d0eb86e 100644 (file)
@@ -91,8 +91,8 @@ pp_jimenezmlaa_run(struct pp_queue_t *ppq, struct pipe_resource *in,
    /* Init the pixel size constant */
    if (dimensions[0] != p->framebuffer.width ||
        dimensions[1] != p->framebuffer.height) {
-      constants[0] = 1.0 / p->framebuffer.width;
-      constants[1] = 1.0 / p->framebuffer.height;
+      constants[0] = 1.0f / p->framebuffer.width;
+      constants[1] = 1.0f / p->framebuffer.height;
 
       up_consts(p->pipe);
       dimensions[0] = p->framebuffer.width;