Revert "glsl: relax input->output validation for SSO programs"
[mesa.git] / src / compiler / Makefile.glsl.am
index 3eac677de0d0b800dd3373d8549b646357053fb9..007af4769af338470486ab09bee0ae744187d431 100644 (file)
@@ -28,20 +28,22 @@ EXTRA_DIST += glsl/tests glsl/glcpp/tests glsl/README       \
        glsl/ir_expression_operation.py                 \
        glsl/glcpp/glcpp-lex.l                          \
        glsl/glcpp/glcpp-parse.y                        \
+       glsl/xxd.py                                     \
+       glsl/float64.glsl                               \
        SConscript.glsl
 
-TESTS += glsl/glcpp/tests/glcpp-test                   \
-       glsl/glcpp/tests/glcpp-test-cr-lf               \
+TESTS += glsl/glcpp/tests/glcpp-test.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/warnings-test
+       glsl/tests/warnings-test.sh
 
 TESTS_ENVIRONMENT= \
-       export PYTHON2=$(PYTHON2); \
+       export abs_builddir=$(abs_builddir); \
+       export PYTHON=$(PYTHON); \
        export PYTHON_FLAGS=$(PYTHON_FLAGS);
 
 check_PROGRAMS +=                                      \
@@ -53,7 +55,7 @@ check_PROGRAMS +=                                     \
        glsl/tests/sampler-types-test                   \
        glsl/tests/uniform-initializer-test
 
-noinst_PROGRAMS = glsl_compiler
+noinst_PROGRAMS += glsl_compiler
 
 glsl_tests_blob_test_SOURCES =                         \
        glsl/tests/blob_test.c
@@ -66,12 +68,15 @@ glsl_tests_cache_test_CFLAGS =                              \
        $(PTHREAD_CFLAGS)
 glsl_tests_cache_test_LDADD =                          \
        glsl/libglsl.la                                 \
-       $(PTHREAD_LIBS)
+       $(PTHREAD_LIBS)                                 \
+       $(CLOCK_LIB)
 
 glsl_tests_general_ir_test_SOURCES =                   \
+       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 =                    \
@@ -81,7 +86,8 @@ glsl_tests_general_ir_test_LDADD =                    \
        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   \
@@ -129,11 +135,8 @@ glsl_libglsl_la_LIBADD = \
 
 glsl_libglsl_la_SOURCES =                              \
        $(LIBGLSL_GENERATED_FILES)                      \
-       $(LIBGLSL_FILES)
-
-if ENABLE_SHADER_CACHE
-glsl_libglsl_la_SOURCES += $(LIBGLSL_SHADER_CACHE_FILES)
-endif
+       $(LIBGLSL_FILES)                                \
+       $(LIBGLSL_SHADER_CACHE_FILES)
 
 glsl_libstandalone_la_SOURCES = \
        $(GLSL_COMPILER_CXX_FILES)
@@ -148,7 +151,8 @@ glsl_compiler_SOURCES = \
        glsl/main.cpp
 
 glsl_compiler_LDADD = \
-       glsl/libstandalone.la
+       glsl/libstandalone.la \
+       $(CLOCK_LIB)
 
 glsl_glsl_test_SOURCES = \
        glsl/test.cpp \
@@ -159,7 +163,8 @@ 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:
@@ -222,6 +227,10 @@ glsl/ir_expression_operation_strings.h: glsl/ir_expression_operation.py
        $(MKDIR_GEN)
        $(PYTHON_GEN) $(srcdir)/glsl/ir_expression_operation.py strings > $@ || ($(RM) $@; false)
 
+glsl/float64_glsl.h: glsl/xxd.py glsl/float64.glsl
+       $(MKDIR_GEN)
+       $(PYTHON_GEN) $(srcdir)/glsl/xxd.py $(srcdir)/glsl/float64.glsl $@ -n float64_source || ($(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
@@ -229,6 +238,7 @@ glsl/ir_expression_operation_strings.h: glsl/ir_expression_operation.py
 # will be created at the appropriate times according to standard automake
 # dependency rules.
 BUILT_SOURCES +=                                       \
+       glsl/float64_glsl.h                             \
        glsl/glsl_parser.cpp                            \
        glsl/glsl_lexer.cpp                             \
        glsl/ir_expression_operation.h                  \
@@ -237,6 +247,7 @@ BUILT_SOURCES +=                                    \
        glsl/glcpp/glcpp-parse.c                        \
        glsl/glcpp/glcpp-lex.c
 CLEANFILES +=                                          \
+       glsl/float64_glsl.h                             \
        glsl/glcpp/glcpp-parse.h                        \
        glsl/glsl_parser.h                              \
        glsl/glsl_parser.cpp                            \
@@ -248,6 +259,12 @@ CLEANFILES +=                                              \
        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: