mesa: Silence compiler warnings on Windows.
authorMichal Krol <michal@tungstengraphics.com>
Thu, 7 Aug 2008 14:23:15 +0000 (16:23 +0200)
committerMichal Krol <michal@tungstengraphics.com>
Thu, 7 Aug 2008 14:23:15 +0000 (16:23 +0200)
src/mesa/shader/shader_api.c
src/mesa/shader/slang/slang_link.c

index c2c58fffde3527f859f4452812099e1b6640c61e..2b5d5ec58532fb04e8188e9f65adb5e5abad2af3 100644 (file)
@@ -1493,7 +1493,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
       return;
    }
 
-   if (index + offset > program->Parameters->Size) {
+   if (index + offset > (GLint) program->Parameters->Size) {
       /* out of bounds! */
       return;
    }
@@ -1557,7 +1557,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
          /* if the uniform is bool-valued, convert to 1.0 or 0.0 */
          if (is_boolean_type(program->Parameters->Parameters[index].DataType)) {
             for (i = 0; i < elems; i++) {
-               uniformVal[i] = uniformVal[i] ? 1.0 : 0.0;
+               uniformVal[i] = uniformVal[i] ? 1.0f : 0.0f;
             }
          }
       }
index 8f07406ee49822b97ee97ccbf6cef630a009cf5c..d96380e03f80384c1ce57cd3a03ad1ed11937dcf 100644 (file)
@@ -296,7 +296,7 @@ _slang_count_temporaries(struct gl_program *prog)
                maxIndex = inst->SrcReg[j].Index;
          }
          if (inst->DstReg.File == PROGRAM_TEMPORARY) {
-            if (maxIndex < inst->DstReg.Index)
+            if (maxIndex < (GLint) inst->DstReg.Index)
                maxIndex = inst->DstReg.Index;
          }
       }