nir: Move nir_lower_uniforms_to_ubo to compiler/nir.
[mesa.git] / src / compiler / Makefile.nir.am
index 08713a82beaa374fa4e26139650e1bf55ea5c7be..aa0a92856f108eb6f26544defb9f546a09f33e94 100644 (file)
@@ -29,11 +29,10 @@ nir_libnir_la_LIBADD = \
 nir_libnir_la_SOURCES =                                        \
        $(NIR_FILES)                                    \
        $(SPIRV_FILES)                                  \
+       $(SPIRV_GENERATED_FILES)                        \
        $(NIR_GENERATED_FILES)
 
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
-
-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)
 
@@ -41,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)
@@ -53,37 +60,59 @@ nir/nir_opt_algebraic.c: nir/nir_opt_algebraic.py nir/nir_algebraic.py
        $(MKDIR_GEN)
        $(PYTHON_GEN) $(srcdir)/nir/nir_opt_algebraic.py > $@ || ($(RM) $@; false)
 
+check_PROGRAMS += \
+       nir/tests/control_flow_tests \
+       nir/tests/vars_tests
 
-check_PROGRAMS += nir/tests/control_flow_tests
-
-nir_tests_control_flow_tests_CPPFLAGS = \
+NIR_TESTS_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -I$(top_builddir)/src/compiler/nir \
        -I$(top_srcdir)/src/compiler/nir
-
-nir_tests_control_flow_tests_SOURCES =                 \
-       nir/tests/control_flow_tests.cpp
-nir_tests_control_flow_tests_CFLAGS =                  \
+NIR_TESTS_CFLAGS = \
        $(PTHREAD_CFLAGS)
-nir_tests_control_flow_tests_LDADD =                   \
-       $(top_builddir)/src/gtest/libgtest.la           \
-       nir/libnir.la   \
-       $(top_builddir)/src/util/libmesautil.la         \
+NIR_TESTS_LDADD = \
+       $(top_builddir)/src/gtest/libgtest.la \
+       nir/libnir.la \
+       $(top_builddir)/src/util/libmesautil.la \
        $(PTHREAD_LIBS)
 
 
-TESTS += nir/tests/control_flow_tests
+nir_tests_control_flow_tests_CPPFLAGS = $(NIR_TESTS_CPPFLAGS)
+nir_tests_control_flow_tests_SOURCES = nir/tests/control_flow_tests.cpp
+nir_tests_control_flow_tests_CFLAGS = $(NIR_TESTS_CFLAGS)
+nir_tests_control_flow_tests_LDADD = $(NIR_TESTS_LDADD)
 
+nir_tests_vars_tests_CPPFLAGS = $(NIR_TESTS_CPPFLAGS)
+nir_tests_vars_tests_SOURCES = nir/tests/vars_tests.cpp
+nir_tests_vars_tests_CFLAGS = $(NIR_TESTS_CFLAGS)
+nir_tests_vars_tests_LDADD = $(NIR_TESTS_LDADD)
 
-BUILT_SOURCES += $(NIR_GENERATED_FILES)
-CLEANFILES += $(NIR_GENERATED_FILES)
+check_SCRIPTS = nir/tests/algebraic_parser_test.sh
+
+TESTS += \
+        nir/tests/control_flow_tests \
+        nir/tests/vars_tests \
+       nir/tests/algebraic_parser_test.sh
+
+
+BUILT_SOURCES += \
+       $(NIR_GENERATED_FILES)
+
+CLEANFILES += \
+       $(NIR_GENERATED_FILES)
 
 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                            \
        nir/nir_opt_algebraic.py                        \
-       nir/tests
+       nir/tests \
+       nir/README \
+       SConscript.nir \
+       SConscript.spirv