diff options
-rw-r--r-- | src/amd/common/sid_tables.py | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_algebraic.py | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 3 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_proto_size.py | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 3 |
5 files changed, 8 insertions, 5 deletions
diff --git a/src/amd/common/sid_tables.py b/src/amd/common/sid_tables.py index 4e53acefa44..ca90f82535d 100644 --- a/src/amd/common/sid_tables.py +++ b/src/amd/common/sid_tables.py @@ -65,7 +65,7 @@ class StringTable: fragments = [ '"%s\\0" /* %s */' % ( te[0].encode('string_escape'), - ', '.join(str(idx) for idx in te[2]) + ', '.join(str(idx) for idx in sorted(te[2])) ) for te in self.table ] diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py index d6784df004e..847c59dbd89 100644 --- a/src/compiler/nir/nir_algebraic.py +++ b/src/compiler/nir/nir_algebraic.py @@ -25,6 +25,7 @@ from __future__ import print_function import ast +from collections import OrderedDict import itertools import struct import sys @@ -601,7 +602,7 @@ ${pass_name}(nir_shader *shader) class AlgebraicPass(object): def __init__(self, pass_name, transforms): - self.xform_dict = {} + self.xform_dict = OrderedDict() self.pass_name = pass_name error = False diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index db907df8545..2f1cba398f0 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -23,6 +23,7 @@ # Authors: # Jason Ekstrand ([email protected]) +from collections import OrderedDict import nir_algebraic import itertools @@ -628,7 +629,7 @@ optimizations = [ 'options->lower_unpack_snorm_4x8'), ] -invert = {'feq': 'fne', 'fne': 'feq', 'fge': 'flt', 'flt': 'fge' } +invert = OrderedDict([('feq', 'fne'), ('fne', 'feq'), ('fge', 'flt'), ('flt', 'fge')]) for left, right in list(itertools.combinations(invert.keys(), 2)) + zip(invert.keys(), invert.keys()): optimizations.append((('inot', ('ior(is_used_once)', (left, a, b), (right, c, d))), diff --git a/src/mapi/glapi/gen/glX_proto_size.py b/src/mapi/glapi/gen/glX_proto_size.py index e16dbab3e09..8dbb0af86d7 100644 --- a/src/mapi/glapi/gen/glX_proto_size.py +++ b/src/mapi/glapi/gen/glX_proto_size.py @@ -191,7 +191,7 @@ class glx_enum_function(object): print ' switch( e ) {' - for c in self.count: + for c in sorted(self.count): for e in self.count[c]: first = 1 diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index a5320e90a1d..1bab5fee51f 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -24,6 +24,7 @@ # Authors: # Ian Romanick <[email protected]> +from collections import OrderedDict from decimal import Decimal import xml.etree.ElementTree as ET import re, sys, string @@ -861,7 +862,7 @@ class gl_item_factory(object): class gl_api(object): def __init__(self, factory): - self.functions_by_name = {} + self.functions_by_name = OrderedDict() self.enums_by_name = {} self.types_by_name = {} |