diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/Makefile.nir.am | 3 | ||||
-rw-r--r-- | src/compiler/SConscript | 1 | ||||
-rw-r--r-- | src/compiler/SConscript.spirv | 54 |
3 files changed, 57 insertions, 1 deletions
diff --git a/src/compiler/Makefile.nir.am b/src/compiler/Makefile.nir.am index 32e4145b70f..27dc129e57b 100644 --- a/src/compiler/Makefile.nir.am +++ b/src/compiler/Makefile.nir.am @@ -100,4 +100,5 @@ EXTRA_DIST += \ nir/nir_opt_algebraic.py \ nir/tests \ nir/README \ - SConscript.nir + SConscript.nir \ + SConstript.spirv diff --git a/src/compiler/SConscript b/src/compiler/SConscript index 44509a9a95b..0a0c0737422 100644 --- a/src/compiler/SConscript +++ b/src/compiler/SConscript @@ -27,3 +27,4 @@ Export('compiler') SConscript('SConscript.glsl') SConscript('SConscript.nir') +SConscript('SConscript.spirv') diff --git a/src/compiler/SConscript.spirv b/src/compiler/SConscript.spirv new file mode 100644 index 00000000000..49410881d0b --- /dev/null +++ b/src/compiler/SConscript.spirv @@ -0,0 +1,54 @@ +import common + +Import('*') + +from sys import executable as python_cmd + +env = env.Clone() + +env.MSVC2013Compat() + +env.Prepend(CPPPATH = [ + '#include', + '#src', + '#src/mapi', + '#src/mesa', + '#src/gallium/include', + '#src/gallium/auxiliary', + '#src/compiler/nir', + '#src/compiler/spirv', +]) + +# Make generated headers reachable from the include path. +env.Prepend(CPPPATH = [Dir('.').abspath, Dir('nir').abspath]) +env.Prepend(CPPPATH = [Dir('.').abspath, Dir('spirv').abspath]) + +# spirv generated sources + +env.CodeGenerate( + target = 'spirv/spirv_info.c', + script = 'spirv/spirv_info_c.py', + source = ['spirv/spirv.core.grammar.json'], + command = python_cmd + ' $SCRIPT $SOURCE $TARGET' +) + +env.CodeGenerate( + target = 'spirv/vtn_gather_types.c', + script = 'spirv/vtn_gather_types_c.py', + source = ['spirv/spirv.core.grammar.json'], + command = python_cmd + ' $SCRIPT $SOURCE $TARGET' +) + +# parse Makefile.sources +source_lists = env.ParseSourceList('Makefile.sources') + +spirv_sources = source_lists['SPIRV_FILES'] +spirv_sources += source_lists['SPIRV_GENERATED_FILES'] + +spirv = env.ConvenienceLibrary( + target = 'spirv', + source = spirv_sources, +) + +env.Alias('spirv', spirv) +Export('spirv') |