constant_template_vector_scalar = mako.template.Template("""\
case ${op.get_enum_name()}:
% if "mixed" in op.flags:
- % for i in xrange(op.num_operands):
+ % for i in range(op.num_operands):
assert(op[${i}]->type->base_type == ${op.source_types[0].glsl_type} ||
% for src_type in op.source_types[1:-1]:
op[${i}]->type->base_type == ${src_type.glsl_type} ||
# Bit operations, part of ARB_gpu_shader5.
operation("bitfield_reverse", 1, source_types=(uint_type, int_type), c_expression="bitfield_reverse({src0})"),
- operation("bit_count", 1, source_types=(uint_type, int_type), dest_type=int_type, c_expression="_mesa_bitcount({src0})"),
+ operation("bit_count", 1, source_types=(uint_type, int_type), dest_type=int_type, c_expression="util_bitcount({src0})"),
operation("find_msb", 1, source_types=(uint_type, int_type), dest_type=int_type, c_expression={'u': "find_msb_uint({src0})", 'i': "find_msb_int({src0})"}),
operation("find_lsb", 1, source_types=(uint_type, int_type), dest_type=int_type, c_expression="find_msb_uint({src0} & -{src0})"),