svga: silence MSVC float/int assignment warnings
authorBrian Paul <brianp@vmware.com>
Tue, 16 Oct 2012 23:54:37 +0000 (17:54 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 16 Oct 2012 23:55:39 +0000 (17:55 -0600)
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/svga/svga_tgsi_insn.c

index ef285a9b7ff1ae17a2704f90a16ae6d9b4427856..4f7970df45cddb143443ccc4ce6aa264f049c1ce 100644 (file)
@@ -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))
 
    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;
 
    case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS:
       return 15.0;
index 2288a534b08aba244ce69ad9d13609d8de948328..36ed0089fbac216e587f154a6a070131dde9da79 100644 (file)
@@ -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) {
       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:
          emit->arl_consts[i + j].idx = idx;
          switch (j) {
          case 0: