aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/lower_vec_index_to_swizzle.cpp')
-rw-r--r--mesalib/src/glsl/lower_vec_index_to_swizzle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp b/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
index 46fd6ace1..264d6dc07 100644
--- a/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
+++ b/mesalib/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);
}