• 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
21general_ir_test_files = files(
22  'array_refcount_test.cpp',
23  'builtin_variable_test.cpp',
24  'general_ir_test.cpp',
25  'opt_add_neg_to_sub_test.cpp',
26)
27general_ir_test_files += ir_expression_operation_h
28
29if with_gles2
30  general_ir_test_files += files('test_gl_lower_mediump.cpp')
31endif
32
33test(
34  'general_ir_test',
35  executable(
36    'general_ir_test',
37    general_ir_test_files,
38    cpp_args : [cpp_msvc_compat_args],
39    gnu_symbol_visibility : 'hidden',
40    include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl],
41    link_with : [libglsl, libglsl_standalone, libglsl_util],
42    dependencies : [dep_clock, dep_thread, idep_gtest, idep_mesautil, idep_nir],
43  ),
44  suite : ['compiler', 'glsl'],
45  protocol : 'gtest',
46)
47
48test(
49  'sampler_types_test',
50  executable(
51    'sampler_types_test',
52    ['sampler_types_test.cpp', ir_expression_operation_h],
53    cpp_args : [cpp_msvc_compat_args],
54    gnu_symbol_visibility : 'hidden',
55    include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_glsl],
56    link_with : [libglsl, libglsl_util],
57    dependencies : [dep_thread, idep_gtest, idep_mesautil, idep_compiler],
58  ),
59  suite : ['compiler', 'glsl'],
60  protocol : 'gtest',
61)
62
63test(
64  'list_iterators',
65  executable(
66    'list_iterators',
67    ['list_iterators.cpp'],
68    cpp_args : [cpp_msvc_compat_args],
69    gnu_symbol_visibility : 'hidden',
70    include_directories : [inc_include, inc_src, inc_glsl],
71    link_with : [libglsl, libglsl_util],
72    dependencies : [dep_thread, idep_gtest],
73  ),
74  suite : ['compiler', 'glsl'],
75  protocol : 'gtest',
76)
77
78# Meson can't auto-skip these on cross builds because of the python wrapper
79if meson.can_run_host_binaries()
80  test(
81    'glsl compiler warnings',
82    prog_python,
83    args : [
84      files('warnings_test.py'),
85      '--glsl-compiler', glsl_compiler,
86      '--test-directory', join_paths(
87        dir_source_root, 'src', 'compiler', 'glsl', 'tests', 'warnings'
88      ),
89    ],
90    suite : ['compiler', 'glsl'],
91    timeout: 60,
92  )
93
94  test(
95    'glsl optimization',
96    prog_python,
97    args : [
98      files('optimization_test.py'),
99      '--test-runner', glsl_test
100    ],
101    suite : ['compiler', 'glsl'],
102  )
103endif
104
105if with_tools.contains('glsl')
106  test(
107    'glsl dump-builder test',
108    glsl_compiler,
109    args : ['--version', '110', '--dump-builder',
110            files('standalone_dump-builder.frag'),
111           ],
112    suite : ['compiler', 'glsl'],
113  )
114  if with_gles2
115    test(
116      'glsl lower-precision test',
117      prog_python,
118      args : [files('lower_precision_test.py'),
119              glsl_compiler
120            ],
121      suite : ['compiler', 'glsl'],
122    )
123  endif
124endif
125