Module: Mesa Branch: master Commit: 5620c3efd85f42a1301d63d55195704ee8365e5e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5620c3efd85f42a1301d63d55195704ee8365e5e
Author: Caio Marcelo de Oliveira Filho <[email protected]> Date: Tue Apr 21 21:54:56 2020 -0700 spirv: Handle instruction aliases in vtn_gather_types Same solution as done in spirv_info generation. Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4682> --- src/compiler/spirv/vtn_gather_types_c.py | 6 ++++++ 1 file changed, 6 insertions(+) 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: _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
