diff --git a/src/compiler/spirv/vtn_gather_types_c.py b/src/compiler/spirv/vtn_gather_types_c.py index 7b42e95cc35..d30a91d2b7a 100644 --- a/src/compiler/spirv/vtn_gather_types_c.py +++ b/src/compiler/spirv/vtn_gather_types_c.py @@ -29,7 +29,13 @@ from sys import stdout from mako.template import Template def find_result_types(spirv): + seen = set() for inst in spirv['instructions']: + # Handle aliases by choosing the first one in the grammar. + if inst['opcode'] in seen: + continue + seen.add(inst['opcode']) + name = inst['opname'] if 'operands' not in inst: