ilo: add the driver to the build system
[mesa.git] / src / glsl / lower_vec_index_to_swizzle.cpp
index 46fd6ace1b64db916d5c4e8824c6d40ce07f06a2..264d6dc07cc265ee557a7bd6723d56a2c87cbf08 100644 (file)
@@ -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);
 }