1# Copyright © 2017 Intel Corporation 2 3# Permission is hereby granted, free of charge, to any person obtaining a copy 4# of this software and associated documentation files (the "Software"), to deal 5# in the Software without restriction, including without limitation the rights 6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7# copies of the Software, and to permit persons to whom the Software is 8# furnished to do so, subject to the following conditions: 9 10# The above copyright notice and this permission notice shall be included in 11# all copies or substantial portions of the Software. 12 13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19# SOFTWARE. 20 21test( 22 'blob_test', 23 executable( 24 'blob_test', 25 'blob_test.c', 26 c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], 27 include_directories : [inc_common, inc_compiler], 28 link_with : [libglsl], 29 ), 30 suite : ['compiler', 'glsl'], 31) 32 33if with_shader_cache 34 test( 35 'cache_test', 36 executable( 37 'cache_test', 38 'cache_test.c', 39 c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], 40 include_directories : [inc_common, inc_glsl], 41 link_with : [libglsl], 42 dependencies : [dep_clock, dep_thread], 43 ), 44 suite : ['compiler', 'glsl'], 45 ) 46endif 47 48test( 49 'general_ir_test', 50 executable( 51 'general_ir_test', 52 ['array_refcount_test.cpp', 'builtin_variable_test.cpp', 53 'invalidate_locations_test.cpp', 'general_ir_test.cpp', 54 'lower_int64_test.cpp', 'opt_add_neg_to_sub_test.cpp', 55 'varyings_test.cpp', ir_expression_operation_h], 56 cpp_args : [cpp_vis_args, cpp_msvc_compat_args], 57 include_directories : [inc_common, inc_glsl], 58 link_with : [libglsl, libglsl_standalone, libglsl_util], 59 dependencies : [dep_clock, dep_thread, idep_gtest], 60 ), 61 suite : ['compiler', 'glsl'], 62) 63 64test( 65 'uniform_initializer_test', 66 executable( 67 'uniform_initializer_test', 68 ['copy_constant_to_storage_tests.cpp', 'set_uniform_initializer_tests.cpp', 69 'uniform_initializer_utils.cpp', 'uniform_initializer_utils.h', 70 ir_expression_operation_h], 71 cpp_args : [cpp_vis_args, cpp_msvc_compat_args], 72 include_directories : [inc_common, inc_glsl], 73 link_with : [libglsl, libglsl_util], 74 dependencies : [dep_thread, idep_gtest], 75 ), 76 suite : ['compiler', 'glsl'], 77) 78 79test( 80 'sampler_types_test', 81 executable( 82 'sampler_types_test', 83 ['sampler_types_test.cpp', ir_expression_operation_h], 84 cpp_args : [cpp_vis_args, cpp_msvc_compat_args], 85 include_directories : [inc_common, inc_glsl], 86 link_with : [libglsl, libglsl_util], 87 dependencies : [dep_thread, idep_gtest], 88 ), 89 suite : ['compiler', 'glsl'], 90) 91 92test( 93 'glsl compiler warnings', 94 prog_python, 95 args : [ 96 join_paths(meson.current_source_dir(), 'warnings_test.py'), 97 '--glsl-compiler', glsl_compiler, 98 '--test-directory', join_paths( 99 meson.source_root(), 'src', 'compiler', 'glsl', 'tests', 'warnings' 100 ), 101 ], 102 suite : ['compiler', 'glsl'], 103) 104 105test( 106 'glsl optimization', 107 prog_python, 108 args : [ 109 join_paths(meson.current_source_dir(), 'optimization_test.py'), 110 '--test-runner', glsl_test 111 ], 112 suite : ['compiler', 'glsl'], 113) 114