diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/ir_expression_operation.py | 4 | ||||
-rw-r--r-- | src/compiler/nir/nir_algebraic.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/glsl/ir_expression_operation.py b/src/compiler/glsl/ir_expression_operation.py index d8542925a0a..b3dac3da3f7 100644 --- a/src/compiler/glsl/ir_expression_operation.py +++ b/src/compiler/glsl/ir_expression_operation.py @@ -62,7 +62,7 @@ class type_signature_iter(object): def __iter__(self): return self - def next(self): + def __next__(self): if self.i < len(self.source_types): i = self.i self.i += 1 @@ -76,6 +76,8 @@ class type_signature_iter(object): else: raise StopIteration() + next = __next__ + uint_type = type("unsigned", "u", "GLSL_TYPE_UINT") int_type = type("int", "i", "GLSL_TYPE_INT") diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py index 8c0b530f698..fda72d3c69e 100644 --- a/src/compiler/nir/nir_algebraic.py +++ b/src/compiler/nir/nir_algebraic.py @@ -56,7 +56,7 @@ class VarSet(object): def __getitem__(self, name): if name not in self.names: assert not self.immutable, "Unknown replacement variable: " + name - self.names[name] = self.ids.next() + self.names[name] = next(self.ids) return self.names[name] @@ -468,7 +468,7 @@ condition_list = ['true'] class SearchAndReplace(object): def __init__(self, transform): - self.id = _optimization_ids.next() + self.id = next(_optimization_ids) search = transform[0] replace = transform[1] |