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