diff options
author | Karl Schultz <[email protected]> | 2010-02-13 17:31:58 -0700 |
---|---|---|
committer | Karl Schultz <[email protected]> | 2010-02-13 17:34:04 -0700 |
commit | b30898f4ab533085d97a33638ad0a1cf9ddb1d67 (patch) | |
tree | 7c27558e2905da625b75060628967d3d52fe6728 /src/mesa/shader/prog_execute.c | |
parent | 5fd2b46a20321d8600d6256bff17ec3ebc9cb510 (diff) |
mesa: Fix compiler warnings
Add explicit casts, fix constant types, fix variable types.
Fixes about 340 warnings in MSFT Visual Studio.
Diffstat (limited to 'src/mesa/shader/prog_execute.c')
-rw-r--r-- | src/mesa/shader/prog_execute.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 7781cb3f7f1..aea4b074b39 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -599,13 +599,13 @@ store_vector4ui(const struct prog_instruction *inst, if (inst->CondUpdate) { if (writeMask & WRITEMASK_X) - machine->CondCodes[0] = generate_cc(value[0]); + machine->CondCodes[0] = generate_cc((float)value[0]); if (writeMask & WRITEMASK_Y) - machine->CondCodes[1] = generate_cc(value[1]); + machine->CondCodes[1] = generate_cc((float)value[1]); if (writeMask & WRITEMASK_Z) - machine->CondCodes[2] = generate_cc(value[2]); + machine->CondCodes[2] = generate_cc((float)value[2]); if (writeMask & WRITEMASK_W) - machine->CondCodes[3] = generate_cc(value[3]); + machine->CondCodes[3] = generate_cc((float)value[3]); #if DEBUG_PROG printf("CondCodes=(%s,%s,%s,%s) for:\n", _mesa_condcode_string(machine->CondCodes[0]), @@ -1000,7 +1000,7 @@ _mesa_execute_program(GLcontext * ctx, val = -FLT_MAX; } else { - val = log(a[0]) * 1.442695F; + val = (float)(log(a[0]) * 1.442695F); } result[0] = result[1] = result[2] = result[3] = val; store_vector4(inst, machine, result); @@ -1065,7 +1065,7 @@ _mesa_execute_program(GLcontext * ctx, /* The fast LOG2 macro doesn't meet the precision * requirements. */ - q[2] = (log(t[0]) * 1.442695F); + q[2] = (float)(log(t[0]) * 1.442695F); } } else { |