summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/library/SConscript
blob: ef131146be56ba17d7896987d6448817c48b8b76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#######################################################################
# SConscript for GLSL builtin library

Import('*')

env = env.Clone()

# See also http://www.scons.org/wiki/UsingCodeGenerators

def glsl_compile_emitter(target, source, env):
	env.Depends(target, glsl_compile)
	return (target, source)
 
bld_frag = Builder(
	action = glsl_compile[0].abspath + ' fragment $SOURCE $TARGET',
	emitter = glsl_compile_emitter,
	suffix = '.gc',
	src_suffix = '_gc.h')
	
bld_vert = Builder(
	action = glsl_compile[0].abspath + ' vertex $SOURCE $TARGET',
	emitter = glsl_compile_emitter,
	suffix = '.gc',
	src_suffix = '_gc.h')

env['BUILDERS']['bld_frag'] = bld_frag
env['BUILDERS']['bld_vert'] = bld_vert

# Generate GLSL builtin library binaries
env.bld_frag(
	'#src/mesa/shader/slang/library/slang_core_gc.h',
	'#src/mesa/shader/slang/library/slang_core.gc')
env.bld_frag(
	'#src/mesa/shader/slang/library/slang_common_builtin_gc.h',
	'#src/mesa/shader/slang/library/slang_common_builtin.gc')
env.bld_frag(
	'#src/mesa/shader/slang/library/slang_fragment_builtin_gc.h',
	'#src/mesa/shader/slang/library/slang_fragment_builtin.gc')
env.bld_vert(
	'#src/mesa/shader/slang/library/slang_vertex_builtin_gc.h',
	'#src/mesa/shader/slang/library/slang_vertex_builtin.gc')

# Generate GLSL 1.20 builtin library binaries
env.bld_frag(
	'#src/mesa/shader/slang/library/slang_120_core_gc.h',
	'#src/mesa/shader/slang/library/slang_120_core.gc')
env.bld_frag(
	'#src/mesa/shader/slang/library/slang_builtin_120_common_gc.h',
	'#src/mesa/shader/slang/library/slang_builtin_120_common.gc')
env.bld_frag(
	'#src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h',
	'#src/mesa/shader/slang/library/slang_builtin_120_fragment.gc')