diff options
author | Rob Clark <[email protected]> | 2018-03-15 18:42:44 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-03-27 08:36:37 -0400 |
commit | 76dfed8ae2d5c6c509eb2661389be3c6a25077df (patch) | |
tree | e811d58f7f277c7844c3421eab1203e7d55607a2 /src/compiler/SConscript.nir | |
parent | cc3a88e81dbceb12b79eb4ebe7a4ce5ba97fc291 (diff) |
nir: mako all the intrinsics
I threatened to do this a long time ago.. I probably *should* have done
it a long time ago when there where many fewer intrinsics. But the
system of macro/#include magic for dealing with intrinsics is a bit
annoying, and python has the nice property of optional fxn params,
making it possible to define new intrinsics while ignoring parameters
that are not applicable (and naming optional params). And not having to
specify various array lengths explicitly is nice too.
I think the end result makes it easier to add new intrinsics.
v2: couple small fixes found with a test program to compare the old and
new tables
v3: misc comments, don't rely on capture=true for meson.build, get rid
of system_values table to avoid return value of intrinsic() and
*mostly* remove side-effects, add autotools build support
v4: scons build
Signed-off-by: Rob Clark <[email protected]>
Acked-by: Dylan Baker <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/SConscript.nir')
-rw-r--r-- | src/compiler/SConscript.nir | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/compiler/SConscript.nir b/src/compiler/SConscript.nir index 3c685a2dc5f..41c67941f51 100644 --- a/src/compiler/SConscript.nir +++ b/src/compiler/SConscript.nir @@ -59,6 +59,22 @@ env.CodeGenerate( command = python_cmd + ' $SCRIPT > $TARGET' ) +bldroot = Dir('.').abspath + +env.CodeGenerate( + target = 'nir/nir_intrinsics.h', + script = 'nir/nir_intrinsics_h.py', + source = [], + command = python_cmd + ' $SCRIPT --outdir ' + bldroot + '/nir' +) + +env.CodeGenerate( + target = 'nir/nir_intrinsics.c', + script = 'nir/nir_intrinsics_c.py', + source = [], + command = python_cmd + ' $SCRIPT --outdir ' + bldroot + '/nir' +) + # parse Makefile.sources source_lists = env.ParseSourceList('Makefile.sources') |