summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-02-19 14:58:23 -0700
committerBrian <[email protected]>2008-02-19 14:58:23 -0700
commit4ec46e4869b60b60c7ddf43168604713b5c4c359 (patch)
tree35fc1a4ebfeace0371d8c3cd5d95efb2a0f52f7d /src/gallium/drivers/softpipe
parenta2c06c5b5c8b3fb9f6d65bcd288d62e112e6a603 (diff)
gallium: add some casts to prevent likely msvc warnings
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index ff872f360e9..43d5085895f 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -347,7 +347,7 @@ nearest_texcoord_unnorm(unsigned wrapMode, float s, unsigned size)
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
/* fall-through */
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
- return ifloor( CLAMP(s, 0.5F, size - 0.5F) );
+ return ifloor( CLAMP(s, 0.5F, (float) size - 0.5F) );
default:
assert(0);
return 0;
@@ -366,14 +366,14 @@ linear_texcoord_unnorm(unsigned wrapMode, float s, unsigned size,
switch (wrapMode) {
case PIPE_TEX_WRAP_CLAMP:
/* Not exactly what the spec says, but it matches NVIDIA output */
- s = CLAMP(s - 0.5F, 0.0, size - 1.0);
+ s = CLAMP(s - 0.5F, 0.0, (float) size - 1.0);
*i0 = ifloor(s);
*i1 = *i0 + 1;
break;
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
/* fall-through */
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
- s = CLAMP(s, 0.5F, size - 0.5F);
+ s = CLAMP(s, 0.5F, (float) size - 0.5F);
s -= 0.5F;
*i0 = ifloor(s);
*i1 = *i0 + 1;