summaryrefslogtreecommitdiffstats
path: root/src/compiler/Makefile.nir.am
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-03-15 18:42:44 -0400
committerRob Clark <[email protected]>2018-03-27 08:36:37 -0400
commit76dfed8ae2d5c6c509eb2661389be3c6a25077df (patch)
treee811d58f7f277c7844c3421eab1203e7d55607a2 /src/compiler/Makefile.nir.am
parentcc3a88e81dbceb12b79eb4ebe7a4ce5ba97fc291 (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/Makefile.nir.am')
-rw-r--r--src/compiler/Makefile.nir.am13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/compiler/Makefile.nir.am b/src/compiler/Makefile.nir.am
index 28033256762..d805f573d51 100644
--- a/src/compiler/Makefile.nir.am
+++ b/src/compiler/Makefile.nir.am
@@ -32,7 +32,7 @@ nir_libnir_la_SOURCES = \
$(SPIRV_GENERATED_FILES) \
$(NIR_GENERATED_FILES)
-nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py
+nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py nir/nir_intrinsics.py
$(MKDIR_GEN)
$(PYTHON_GEN) $(srcdir)/nir/nir_builder_opcodes_h.py > $@ || ($(RM) $@; false)
@@ -40,6 +40,14 @@ nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.
$(MKDIR_GEN)
$(PYTHON_GEN) $(srcdir)/nir/nir_constant_expressions.py > $@ || ($(RM) $@; false)
+nir/nir_intrinsics.h: nir/nir_intrinsics.py nir/nir_intrinsics_h.py
+ $(MKDIR_GEN)
+ $(PYTHON_GEN) $(srcdir)/nir/nir_intrinsics_h.py --outdir nir || ($(RM) $@; false)
+
+nir/nir_intrinsics.c: nir/nir_intrinsics.py nir/nir_intrinsics_c.py
+ $(MKDIR_GEN)
+ $(PYTHON_GEN) $(srcdir)/nir/nir_intrinsics_c.py --outdir nir || ($(RM) $@; false)
+
nir/nir_opcodes.h: nir/nir_opcodes.py nir/nir_opcodes_h.py
$(MKDIR_GEN)
$(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_h.py > $@ || ($(RM) $@; false)
@@ -112,6 +120,9 @@ EXTRA_DIST += \
nir/nir_algebraic.py \
nir/nir_builder_opcodes_h.py \
nir/nir_constant_expressions.py \
+ nir/nir_intrinsics.py \
+ nir/nir_intrinsics_c.py \
+ nir/nir_intrinsics_h.py \
nir/nir_opcodes.py \
nir/nir_opcodes_c.py \
nir/nir_opcodes_h.py \