spirv: Handle instruction aliases in vtn_gather_types
Same solution as done in spirv_info generation. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4682>
This commit is contained in:
parent
8cba1a13fa
commit
5620c3efd8
|
@ -29,7 +29,13 @@ from sys import stdout
|
||||||
from mako.template import Template
|
from mako.template import Template
|
||||||
|
|
||||||
def find_result_types(spirv):
|
def find_result_types(spirv):
|
||||||
|
seen = set()
|
||||||
for inst in spirv['instructions']:
|
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']
|
name = inst['opname']
|
||||||
|
|
||||||
if 'operands' not in inst:
|
if 'operands' not in inst:
|
||||||
|
|
Loading…
Reference in New Issue