clover/nir/spirv: Use uniform rather than shader_in for kernel inputs
[mesa.git] / src / compiler / SConscript.spirv
1 import common
2
3 Import('*')
4
5 from sys import executable as python_cmd
6
7 env = env.Clone()
8
9 env.MSVC2013Compat()
10
11 env.Prepend(CPPPATH = [
12 '#include',
13 '#src',
14 '#src/mapi',
15 '#src/mesa',
16 '#src/gallium/include',
17 '#src/gallium/auxiliary',
18 '#src/compiler/nir',
19 '#src/compiler/spirv',
20 ])
21
22 # Make generated headers reachable from the include path.
23 env.Prepend(CPPPATH = [Dir('.').abspath, Dir('nir').abspath])
24 env.Prepend(CPPPATH = [Dir('.').abspath, Dir('spirv').abspath])
25
26 # spirv generated sources
27
28 env.CodeGenerate(
29 target = 'spirv/spirv_info.c',
30 script = 'spirv/spirv_info_c.py',
31 source = ['spirv/spirv.core.grammar.json'],
32 command = python_cmd + ' $SCRIPT $SOURCE $TARGET'
33 )
34
35 env.CodeGenerate(
36 target = 'spirv/vtn_gather_types.c',
37 script = 'spirv/vtn_gather_types_c.py',
38 source = ['spirv/spirv.core.grammar.json'],
39 command = python_cmd + ' $SCRIPT $SOURCE $TARGET'
40 )
41
42 # parse Makefile.sources
43 source_lists = env.ParseSourceList('Makefile.sources')
44
45 spirv_sources = source_lists['SPIRV_FILES']
46 spirv_sources += source_lists['SPIRV_GENERATED_FILES']
47
48 spirv = env.ConvenienceLibrary(
49 target = 'spirv',
50 source = spirv_sources,
51 )
52
53 env.Alias('spirv', spirv)
54 Export('spirv')