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',
'nir_instr_set.h',
'nir_intrinsics.c',
'nir_intrinsics.h',
+ 'nir_linking_helpers.c',
'nir_liveness.c',
'nir_loop_analyze.c',
'nir_loop_analyze.h',
'nir_lower_64bit_packing.c',
'nir_lower_alu_to_scalar.c',
+ 'nir_lower_alpha_test.c',
'nir_lower_atomics.c',
'nir_lower_atomics_to_ssbo.c',
'nir_lower_bitmap.c',
'nir_lower_indirect_derefs.c',
'nir_lower_int64.c',
'nir_lower_io.c',
+ 'nir_lower_io_arrays_to_elements.c',
'nir_lower_io_to_temporaries.c',
'nir_lower_io_to_scalar.c',
'nir_lower_io_types.c',
'nir_lower_passthrough_edgeflags.c',
'nir_lower_patch_vertices.c',
'nir_lower_phis_to_scalar.c',
- 'nir_lower_read_invocation_to_scalar.c',
'nir_lower_regs_to_ssa.c',
'nir_lower_returns.c',
'nir_lower_samplers.c',
'nir_lower_samplers_as_deref.c',
+ 'nir_lower_subgroups.c',
'nir_lower_system_values.c',
'nir_lower_tex.c',
'nir_lower_to_source_mods.c',
'nir_opt_move_comparisons.c',
'nir_opt_peephole_select.c',
'nir_opt_remove_phis.c',
+ 'nir_opt_shrink_load.c',
'nir_opt_trivial_continues.c',
'nir_opt_undef.c',
'nir_phi_builder.c',
'nir_search.c',
'nir_search.h',
'nir_search_helpers.h',
+ 'nir_serialize.c',
+ 'nir_serialize.h',
'nir_split_var_copies.c',
'nir_sweep.c',
'nir_to_lcssa.c',
'../spirv/vtn_cfg.c',
'../spirv/vtn_glsl450.c',
'../spirv/vtn_private.h',
+ '../spirv/vtn_subgroup.c',
'../spirv/vtn_variables.c',
)
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,
build_by_default : false,
)
+# Headers-only dependency
+idep_nir_headers = declare_dependency(
+ sources : [nir_opcodes_h, nir_builder_opcodes_h],
+ include_directories : include_directories('.'),
+)
+
+# Also link with nir
+idep_nir = declare_dependency(
+ dependencies : idep_nir_headers,
+ link_with : libnir,
+)
+
+nir_algebraic_py = files('nir_algebraic.py')
+
if with_tests
- nir_control_flow_test = executable(
- 'nir_control_flow_test',
- [files('tests/control_flow_tests.cpp'), nir_opcodes_h],
- c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
- include_directories : [inc_common],
- dependencies : [dep_thread, idep_gtest],
- link_with : [libmesa_util, libnir],
+ test(
+ 'nir_control_flow',
+ executable(
+ 'nir_control_flow_test',
+ files('tests/control_flow_tests.cpp'),
+ c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
+ include_directories : [inc_common],
+ dependencies : [dep_thread, idep_gtest, idep_nir],
+ link_with : libmesa_util,
+ )
)
-
- test('nir_control_flow', nir_control_flow_test)
endif