summaryrefslogtreecommitdiff
path: root/generated_tests
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2015-02-19 16:23:22 -0800
committerDylan Baker <baker.dylan.c@gmail.com>2015-02-23 15:47:10 -0800
commit39ee0a04d4fd548e4966db386cf6e0a9df183679 (patch)
tree84804f46ade0828df0785237c94ae3669f4cb459 /generated_tests
parent881074e301e9ae1ae3827226497ddc9f1c37c355 (diff)
gen_builtin_uniform_tests_fp64: hybridize python2/3
This requires removing some tabs. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'generated_tests')
-rw-r--r--generated_tests/gen_builtin_uniform_tests_fp64.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/generated_tests/gen_builtin_uniform_tests_fp64.py b/generated_tests/gen_builtin_uniform_tests_fp64.py
index 5f6082af5..6730eec45 100644
--- a/generated_tests/gen_builtin_uniform_tests_fp64.py
+++ b/generated_tests/gen_builtin_uniform_tests_fp64.py
@@ -51,7 +51,8 @@ import numpy
import optparse
import os
import os.path
-import sys
+
+from six.moves import range
from modules import utils
@@ -282,12 +283,12 @@ class FloatComparator(Comparator):
col_indexers = ['']
else:
col_indexers = ['[{0}]'.format(i)
- for i in xrange(self.__signature.rettype.num_cols)]
+ for i in range(self.__signature.rettype.num_cols)]
if self.__signature.rettype.num_rows == 1:
row_indexers = ['']
else:
row_indexers = ['[{0}]'.format(i)
- for i in xrange(self.__signature.rettype.num_rows)]
+ for i in range(self.__signature.rettype.num_rows)]
return [col_indexer + row_indexer
for col_indexer in col_indexers
for row_indexer in row_indexers]
@@ -368,9 +369,9 @@ class ShaderTest(object):
"""Return a string that should be included in the test's
[require] section.
"""
- if self._signature.extension:
- return 'GL_{0}\n'.format(self._signature.extension)
- return ""
+ if self._signature.extension:
+ return 'GL_{0}\n'.format(self._signature.extension)
+ return ""
@abc.abstractmethod
def test_prefix(self):
@@ -421,7 +422,7 @@ class ShaderTest(object):
if self._signature.extension:
shader += '#extension GL_{0} : require\n'.format(self._signature.extension)
shader += additional_declarations
- for i in xrange(len(self._signature.argtypes)):
+ for i in range(len(self._signature.argtypes)):
shader += 'uniform {0} arg{1};\n'.format(
self._signature.argtypes[i], i)
shader += self._comparator.make_additional_declarations()
@@ -431,7 +432,7 @@ class ShaderTest(object):
shader += prefix_statements
invocation = self._signature.template.format(
*['arg{0}'.format(i)
- for i in xrange(len(self._signature.argtypes))])
+ for i in range(len(self._signature.argtypes))])
shader += self._comparator.make_result_handler(invocation, output_var)
shader += suffix_statements
shader += '}\n'
@@ -443,7 +444,7 @@ class ShaderTest(object):
"""
test = ''
for test_num, test_vector in enumerate(self._test_vectors):
- for i in xrange(len(test_vector.arguments)):
+ for i in range(len(test_vector.arguments)):
test += 'uniform {0} arg{1} {2}\n'.format(
shader_runner_type(self._signature.argtypes[i]),
i, shader_runner_format(