/* Hash table stats:
* size ${len(strmap.sorted_strings)} entries
* collisions entries:
-% for i in xrange(10):
+% for i in range(10):
* ${i}${'+' if i == 9 else ' '} ${strmap.collisions[i]}
% endfor
*/
first_byte = field.start // 8
last_byte = field.end // 8
- for b in xrange(first_byte, last_byte + 1):
+ for b in range(first_byte, last_byte + 1):
if not b in bytes:
bytes[b] = self.Byte()
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} ||
""")
-for i in xrange(1, 5):
- for j in xrange(1, 5):
+for i in range(1, 5):
+ for j in range(1, 5):
unop_horiz("fnoise{0}_{1}".format(i, j), i, tfloat, j, tfloat, "0.0f")
/* Hash table stats:
* size ${len(strmap.sorted_strings)} entries
* collisions entries:
-% for i in xrange(10):
+% for i in range(10):
* ${i}${'+' if i == 9 else ' '} ${strmap.collisions[i]}
% endfor
*/
_glapi_proc proc;
} proc_pairs[%d] = {""" % len(procs))
names = sorted(procs.keys())
- for i in xrange(len(names)):
+ for i in range(len(names)):
comma = ',' if i < len(names) - 1 else ''
print(' { "%s", (_glapi_proc) gl%s }%s' % (names[i], procs[names[i]], comma))
print("""};
# Check that the table has no gaps. We expect a function at every offset,
# and the code which generates the table relies on this.
- for i in xrange(0, func_count):
+ for i in range(0, func_count):
if funcnames[i] is None:
raise Exception("Function table has no function at offset %d" % (i))
print("#define GLAPI_TABLE_COUNT %d" % func_count)
print("static const char * const _glapi_table_func_names[GLAPI_TABLE_COUNT] = {")
- for i in xrange(0, func_count):
+ for i in range(0, func_count):
print(" /* %5d */ \"%s\"," % (i, funcnames[i]))
print("};")
all_names = []
last_slot = entries[-1].slot
i = 0
- for slot in xrange(last_slot + 1):
+ for slot in range(last_slot + 1):
if entries[i].slot != slot:
raise Exception('entries are not ordered by slots')
if entries[i].alias:
component, exactly as you would expect.
"""
rev = [Swizzle.SWIZZLE_NONE] * 4
- for i in xrange(4):
- for j in xrange(4):
+ for i in range(4):
+ for j in range(4):
if self.__list[j] == i and rev[i] == Swizzle.SWIZZLE_NONE:
rev[i] = j
return Swizzle(rev)