From: Brian Paul Date: Tue, 16 Oct 2012 23:54:37 +0000 (-0600) Subject: svga: silence MSVC double/float assignment warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ffbac58746a18591499aea212e62b32159cc0f58;p=mesa.git svga: silence MSVC double/float assignment warnings --- diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c index 134f384cc46..e9239bafef9 100644 --- a/src/gallium/drivers/svga/svga_swtnl_state.c +++ b/src/gallium/drivers/svga/svga_swtnl_state.c @@ -35,21 +35,21 @@ #include "svga_swtnl_private.h" -#define SVGA_POINT_ADJ_X -0.375 -#define SVGA_POINT_ADJ_Y -0.5 +#define SVGA_POINT_ADJ_X -0.375f +#define SVGA_POINT_ADJ_Y -0.5f -#define SVGA_LINE_ADJ_X -0.5 -#define SVGA_LINE_ADJ_Y -0.5 +#define SVGA_LINE_ADJ_X -0.5f +#define SVGA_LINE_ADJ_Y -0.5f -#define SVGA_TRIANGLE_ADJ_X -0.375 -#define SVGA_TRIANGLE_ADJ_Y -0.5 +#define SVGA_TRIANGLE_ADJ_X -0.375f +#define SVGA_TRIANGLE_ADJ_Y -0.5f static void set_draw_viewport( struct svga_context *svga ) { struct pipe_viewport_state vp = svga->curr.viewport; - float adjx = 0; - float adjy = 0; + float adjx = 0.0f; + float adjy = 0.0f; switch (svga->curr.reduced_prim) { case PIPE_PRIM_POINTS: @@ -63,8 +63,8 @@ static void set_draw_viewport( struct svga_context *svga ) */ if (svga->curr.rast->need_pipeline & SVGA_PIPELINE_FLAG_LINES) { - adjx = SVGA_LINE_ADJ_X + 0.175; - adjy = SVGA_LINE_ADJ_Y - 0.175; + adjx = SVGA_LINE_ADJ_X + 0.175f; + adjy = SVGA_LINE_ADJ_Y - 0.175f; } else { adjx = SVGA_LINE_ADJ_X;