summaryrefslogtreecommitdiff
path: root/src/glsl/lower_vec_index_to_swizzle.cpp
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-11-04 16:43:44 -0700
committerBrian Paul <brianp@vmware.com>2012-11-06 07:42:37 -0700
commitab8c5347f18309c62a850dcbd14e505c99fc58e8 (patch)
tree3007e3e172f1128634dc923bd6d2c446a1456ff6 /src/glsl/lower_vec_index_to_swizzle.cpp
parent78d3cfb5b4fe1dbe052f87458e62cc2be2ecf171 (diff)
glsl: fix signed/unsigned comparision warnings on MSVC
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/glsl/lower_vec_index_to_swizzle.cpp')
-rw-r--r--src/glsl/lower_vec_index_to_swizzle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/lower_vec_index_to_swizzle.cpp b/src/glsl/lower_vec_index_to_swizzle.cpp
index 46fd6ace1b..264d6dc07c 100644
--- a/src/glsl/lower_vec_index_to_swizzle.cpp
+++ b/src/glsl/lower_vec_index_to_swizzle.cpp
@@ -93,7 +93,7 @@ ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
* large. For simplicity sake, just clamp the index to [0, size-1].
*/
const int i = MIN2(MAX2(ir_constant->value.i[0], 0),
- (deref->array->type->vector_elements - 1));
+ ((int) deref->array->type->vector_elements - 1));
return new(ctx) ir_swizzle(deref->array, i, 0, 0, 0, 1);
}