• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
21if with_shader_cache
22  test(
23    'cache_test',
24    executable(
25      'cache_test',
26      'cache_test.c',
27      c_args : [c_msvc_compat_args, no_override_init_args],
28      gnu_symbol_visibility : 'hidden',
29      include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl],
30      link_with : [libglsl],
31      dependencies : [dep_clock, dep_thread],
32    ),
33    suite : ['compiler', 'glsl'],
34  )
35endif
36
37test(
38  'general_ir_test',
39  executable(
40    'general_ir_test',
41    ['array_refcount_test.cpp', 'builtin_variable_test.cpp',
42     'invalidate_locations_test.cpp', 'general_ir_test.cpp',
43     'lower_int64_test.cpp', 'opt_add_neg_to_sub_test.cpp',
44     'varyings_test.cpp', ir_expression_operation_h],
45    cpp_args : [cpp_msvc_compat_args],
46    gnu_symbol_visibility : 'hidden',
47    include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl],
48    link_with : [libglsl, libglsl_standalone, libglsl_util],
49    dependencies : [dep_clock, dep_thread, idep_gtest],
50  ),
51  suite : ['compiler', 'glsl'],
52)
53
54test(
55  'uniform_initializer_test',
56  executable(
57    'uniform_initializer_test',
58    ['copy_constant_to_storage_tests.cpp', 'set_uniform_initializer_tests.cpp',
59     'uniform_initializer_utils.cpp', 'uniform_initializer_utils.h',
60     ir_expression_operation_h],
61    cpp_args : [cpp_msvc_compat_args],
62    gnu_symbol_visibility : 'hidden',
63    include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl],
64    link_with : [libglsl, libglsl_util],
65    dependencies : [dep_thread, idep_gtest],
66  ),
67  suite : ['compiler', 'glsl'],
68)
69
70test(
71  'sampler_types_test',
72  executable(
73    'sampler_types_test',
74    ['sampler_types_test.cpp', ir_expression_operation_h],
75    cpp_args : [cpp_msvc_compat_args],
76    gnu_symbol_visibility : 'hidden',
77    include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl],
78    link_with : [libglsl, libglsl_util],
79    dependencies : [dep_thread, idep_gtest],
80  ),
81  suite : ['compiler', 'glsl'],
82)
83
84test(
85  'list_iterators',
86  executable(
87    'list_iterators',
88    ['list_iterators.cpp'],
89    cpp_args : [cpp_msvc_compat_args],
90    gnu_symbol_visibility : 'hidden',
91    include_directories : [inc_include, inc_src, inc_glsl],
92    link_with : [libglsl, libglsl_util],
93    dependencies : [dep_thread, idep_gtest],
94  ),
95  suite : ['compiler', 'glsl'],
96)
97
98test(
99  'glsl compiler warnings',
100  prog_python,
101  args : [
102    join_paths(meson.current_source_dir(), 'warnings_test.py'),
103    '--glsl-compiler', glsl_compiler,
104    '--test-directory', join_paths(
105      meson.source_root(), 'src', 'compiler', 'glsl', 'tests', 'warnings'
106    ),
107  ],
108  suite : ['compiler', 'glsl'],
109  timeout: 60,
110)
111
112test(
113  'glsl optimization',
114  prog_python,
115  args : [
116    join_paths(meson.current_source_dir(), 'optimization_test.py'),
117    '--test-runner', glsl_test
118  ],
119  suite : ['compiler', 'glsl'],
120)
121
122if with_tools.contains('glsl')
123  test(
124    'glsl dump-builder test',
125    glsl_compiler,
126    args : ['--version', '110', '--dump-builder',
127            join_paths(meson.current_source_dir(), 'standalone_dump-builder.frag'),
128           ],
129    suite : ['compiler', 'glsl'],
130  )
131  test(
132    'glsl lower-precision test',
133    prog_python,
134    args : [join_paths(meson.current_source_dir(), 'lower_precision_test.py'),
135            glsl_compiler
136           ],
137    suite : ['compiler', 'glsl'],
138  )
139endif
140