summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-12-05 22:31:02 -0800
committerJason Ekstrand <[email protected]>2017-12-11 22:28:34 -0800
commitbb1e6ff161c9a438243392ca2cbebac781293658 (patch)
tree550b04c7a8ff34e4fc4eaa2304422829d23cb512 /src/compiler/nir
parent2c84b49ddff2c03a9a1f2d1e132d4002fd7c070b (diff)
spirv: Add a prepass to set types on vtn_values
This autogenerated pass will automatically find and set the type field on all vtn_values. This way we always have the type and can use it for validation and other checks. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/meson.build11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build
index b61a07773d3..5dd21e6652f 100644
--- a/src/compiler/nir/meson.build
+++ b/src/compiler/nir/meson.build
@@ -72,6 +72,14 @@ spirv_info_c = custom_target(
command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
)
+vtn_gather_types_c = custom_target(
+ 'vtn_gather_types.c',
+ input : files('../spirv/vtn_gather_types_c.py',
+ '../spirv/spirv.core.grammar.json'),
+ output : 'vtn_gather_types.c',
+ command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
+)
+
files_libnir = files(
'nir.c',
'nir.h',
@@ -189,7 +197,8 @@ files_libnir = files(
libnir = static_library(
'nir',
[files_libnir, spirv_info_c, nir_opt_algebraic_c, nir_opcodes_c,
- nir_opcodes_h, nir_constant_expressions_c, nir_builder_opcodes_h],
+ nir_opcodes_h, nir_constant_expressions_c, nir_builder_opcodes_h,
+ vtn_gather_types_c],
include_directories : [inc_common, inc_compiler, include_directories('../spirv')],
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
link_with : libcompiler,