From: Brian Paul Date: Tue, 16 Oct 2012 23:54:37 +0000 (-0600) Subject: svga: silence MSVC float/int assignment warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d21e6c87c026015e395ee0f2b18ba4041c6773d6;p=mesa.git svga: silence MSVC float/int assignment warnings --- diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index ef285a9b7ff..4f7970df45c 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -113,8 +113,8 @@ svga_get_paramf(struct pipe_screen *screen, enum pipe_capf param) case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY: if(!sws->get_cap(sws, SVGA3D_DEVCAP_MAX_TEXTURE_ANISOTROPY, &result)) - return 4.0; - return result.u; + return 4.0f; + return (float) result.u; case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS: return 15.0; diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index 2288a534b08..36ed0089fba 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -666,7 +666,7 @@ create_arl_consts( struct svga_shader_emitter *emit ) unsigned idx = emit->nr_hw_float_const++; float vals[4]; for (j = 0; j < 4 && (j + i) < emit->num_arl_consts; ++j) { - vals[j] = emit->arl_consts[i + j].number; + vals[j] = (float) emit->arl_consts[i + j].number; emit->arl_consts[i + j].idx = idx; switch (j) { case 0: