nir: make various getters take const pointers
[mesa.git] / src / compiler / Makefile.glsl.am
index daf98f612448def730bd003ed9b52484aed8e6d2..179f415fe6fc03f394cfd8d5c52f997be0e6efbd 100644 (file)
@@ -25,19 +25,23 @@ EXTRA_DIST += glsl/tests glsl/glcpp/tests glsl/README       \
        glsl/TODO glsl/glcpp/README                     \
        glsl/glsl_lexer.ll                              \
        glsl/glsl_parser.yy                             \
+       glsl/ir_expression_operation.py                 \
        glsl/glcpp/glcpp-lex.l                          \
        glsl/glcpp/glcpp-parse.y                        \
        SConscript.glsl
 
-TESTS += glsl/glcpp/tests/glcpp-test                   \
-       glsl/glcpp/tests/glcpp-test-cr-lf               \
+TESTS += glsl/glcpp/tests/glcpp-test.sh                        \
+       glsl/glcpp/tests/glcpp-test-cr-lf.sh            \
        glsl/tests/blob-test                            \
+       glsl/tests/cache-test                           \
        glsl/tests/general-ir-test                      \
-       glsl/tests/optimization-test                    \
+       glsl/tests/optimization-test.sh                 \
        glsl/tests/sampler-types-test                   \
-       glsl/tests/uniform-initializer-test
+       glsl/tests/uniform-initializer-test             \
+       glsl/tests/warnings-test.sh
 
 TESTS_ENVIRONMENT= \
+       export abs_builddir=$(abs_builddir); \
        export PYTHON2=$(PYTHON2); \
        export PYTHON_FLAGS=$(PYTHON_FLAGS);
 
@@ -45,6 +49,7 @@ check_PROGRAMS +=                                     \
        glsl/glcpp/glcpp                                \
        glsl/glsl_test                                  \
        glsl/tests/blob-test                            \
+       glsl/tests/cache-test                           \
        glsl/tests/general-ir-test                      \
        glsl/tests/sampler-types-test                   \
        glsl/tests/uniform-initializer-test
@@ -56,19 +61,32 @@ glsl_tests_blob_test_SOURCES =                              \
 glsl_tests_blob_test_LDADD =                           \
        glsl/libglsl.la
 
+glsl_tests_cache_test_SOURCES =                                \
+       glsl/tests/cache_test.c
+glsl_tests_cache_test_CFLAGS =                         \
+       $(PTHREAD_CFLAGS)
+glsl_tests_cache_test_LDADD =                          \
+       glsl/libglsl.la                                 \
+       $(PTHREAD_LIBS)                                 \
+       $(CLOCK_LIB)
+
 glsl_tests_general_ir_test_SOURCES =                   \
-       glsl/standalone_scaffolding.cpp                 \
+       glsl/tests/array_refcount_test.cpp              \
        glsl/tests/builtin_variable_test.cpp            \
        glsl/tests/invalidate_locations_test.cpp        \
        glsl/tests/general_ir_test.cpp                  \
+       glsl/tests/lower_int64_test.cpp                 \
+       glsl/tests/opt_add_neg_to_sub_test.cpp          \
        glsl/tests/varyings_test.cpp
 glsl_tests_general_ir_test_CFLAGS =                    \
        $(PTHREAD_CFLAGS)
 glsl_tests_general_ir_test_LDADD =                     \
        $(top_builddir)/src/gtest/libgtest.la           \
        glsl/libglsl.la         \
+       glsl/libstandalone.la                           \
        $(top_builddir)/src/libglsl_util.la             \
-       $(PTHREAD_LIBS)
+       $(PTHREAD_LIBS)                                 \
+       $(CLOCK_LIB)
 
 glsl_tests_uniform_initializer_test_SOURCES =          \
        glsl/tests/copy_constant_to_storage_tests.cpp   \
@@ -93,7 +111,7 @@ glsl_tests_sampler_types_test_LDADD =                        \
        $(top_builddir)/src/libglsl_util.la             \
        $(PTHREAD_LIBS)
 
-noinst_LTLIBRARIES += glsl/libglsl.la glsl/libglcpp.la
+noinst_LTLIBRARIES += glsl/libglsl.la glsl/libglcpp.la glsl/libstandalone.la
 
 glsl_libglcpp_la_LIBADD =                              \
        $(top_builddir)/src/util/libmesautil.la
@@ -115,31 +133,37 @@ glsl_libglsl_la_LIBADD = \
        glsl/libglcpp.la
 
 glsl_libglsl_la_SOURCES =                              \
-       glsl/glsl_lexer.cpp                             \
-       glsl/glsl_parser.cpp                            \
-       glsl/glsl_parser.h                              \
-       $(LIBGLSL_FILES)
-
+       $(LIBGLSL_GENERATED_FILES)                      \
+       $(LIBGLSL_FILES)                                \
+       $(LIBGLSL_SHADER_CACHE_FILES)
 
-glsl_compiler_SOURCES = \
+glsl_libstandalone_la_SOURCES = \
        $(GLSL_COMPILER_CXX_FILES)
 
-glsl_compiler_LDADD =                                  \
+glsl_libstandalone_la_LIBADD =                         \
        glsl/libglsl.la                                 \
        $(top_builddir)/src/libglsl_util.la             \
        $(top_builddir)/src/util/libmesautil.la         \
        $(PTHREAD_LIBS)
 
+glsl_compiler_SOURCES = \
+       glsl/main.cpp
+
+glsl_compiler_LDADD = \
+       glsl/libstandalone.la \
+       $(CLOCK_LIB)
+
 glsl_glsl_test_SOURCES = \
-       glsl/standalone_scaffolding.cpp \
        glsl/test.cpp \
        glsl/test_optpass.cpp \
        glsl/test_optpass.h
 
 glsl_glsl_test_LDADD =                                 \
        glsl/libglsl.la                                 \
+       glsl/libstandalone.la                           \
        $(top_builddir)/src/libglsl_util.la             \
-       $(PTHREAD_LIBS)
+       $(PTHREAD_LIBS)                                 \
+       $(CLOCK_LIB)
 
 # We write our own rules for yacc and lex below. We'd rather use automake,
 # but automake makes it especially difficult for a number of reasons:
@@ -190,6 +214,18 @@ glsl/glcpp/glcpp-lex.c: glsl/glcpp/glcpp-lex.l
        $(MKDIR_GEN)
        $(LEX_GEN) -o $@ $(srcdir)/glsl/glcpp/glcpp-lex.l
 
+glsl/ir_expression_operation.h: glsl/ir_expression_operation.py
+       $(MKDIR_GEN)
+       $(PYTHON_GEN) $(srcdir)/glsl/ir_expression_operation.py enum > $@ || ($(RM) $@; false)
+
+glsl/ir_expression_operation_constant.h: glsl/ir_expression_operation.py
+       $(MKDIR_GEN)
+       $(PYTHON_GEN) $(srcdir)/glsl/ir_expression_operation.py constant > $@ || ($(RM) $@; false)
+
+glsl/ir_expression_operation_strings.h: glsl/ir_expression_operation.py
+       $(MKDIR_GEN)
+       $(PYTHON_GEN) $(srcdir)/glsl/ir_expression_operation.py strings > $@ || ($(RM) $@; false)
+
 # Only the parsers (specifically the header files generated at the same time)
 # need to be in BUILT_SOURCES. Though if we list the parser headers YACC is
 # called for the .c/.cpp file and the .h files. By listing the .c/.cpp files
@@ -199,6 +235,9 @@ glsl/glcpp/glcpp-lex.c: glsl/glcpp/glcpp-lex.l
 BUILT_SOURCES +=                                       \
        glsl/glsl_parser.cpp                            \
        glsl/glsl_lexer.cpp                             \
+       glsl/ir_expression_operation.h                  \
+       glsl/ir_expression_operation_constant.h         \
+       glsl/ir_expression_operation_strings.h          \
        glsl/glcpp/glcpp-parse.c                        \
        glsl/glcpp/glcpp-lex.c
 CLEANFILES +=                                          \
@@ -206,10 +245,19 @@ CLEANFILES +=                                             \
        glsl/glsl_parser.h                              \
        glsl/glsl_parser.cpp                            \
        glsl/glsl_lexer.cpp                             \
+       glsl/ir_expression_operation.h                  \
+       glsl/ir_expression_operation_constant.h         \
+       glsl/ir_expression_operation_strings.h          \
        glsl/glcpp/glcpp-parse.c                        \
        glsl/glcpp/glcpp-lex.c
 
 clean-local:
+       $(RM) glsl/tests/lower_jumps/*.opt_test
+       $(RM) glsl/tests/lower_jumps/*.expected
+       $(RM) glsl/tests/lower_jumps/*.out
+       $(RM) glsl/tests/warnings/*.out
+       $(RM) glsl/glcpp/tests/*.out
+       $(RM) -r glsl/glcpp/tests/subtest*/
        $(RM) -r subtest-cr subtest-cr-lf subtest-lf subtest-lf-cr
 
 dist-hook: