X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fcompiler%2Fspirv%2Fvtn_gather_types_c.py;h=d30a91d2b7a41271ddcd02ea80f8582e2d03021b;hb=5620c3efd85f42a1301d63d55195704ee8365e5e;hp=7b42e95cc35d4a44e0ba07538a36f64a9f46b3bf;hpb=bb1e6ff161c9a438243392ca2cbebac781293658;p=mesa.git 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: