summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2020-04-21 21:54:56 -0700
committerMarge Bot <[email protected]>2020-04-24 05:56:05 +0000
commit5620c3efd85f42a1301d63d55195704ee8365e5e (patch)
tree47f74a847441494ad0589fa4fbf034de58618023 /src/compiler
parent8cba1a13fa6baa6fd55a80b5bd1fce6cbb4b12f8 (diff)
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>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/spirv/vtn_gather_types_c.py6
1 files changed, 6 insertions, 0 deletions
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: