arb_shader_atomic_counters-semantics: use correct output-type
[piglit.git] / generated_tests / CMakeLists.txt
blob8f610c6c3ec474a275f275d762565595db7290fc
1 # Create a custom command that runs the Python script
2 # ${generator_script} to generate tests.
4 # A list of the files generated will be output to the file
5 # ${file_list}.  This can be used to run the custom command by itself,
6 # and is also used by the build system to tell when the files need to
7 # be rebuilt.
9 # The custom command will automatically depend on ${generator_script}.
10 # Additional dependencies can be supplied using additional arguments.
11 function(piglit_make_generated_tests file_list generator_script)
12         # Add a custom command which executes ${generator_script}
13         # during the build.
14         add_custom_command(
15                 OUTPUT ${file_list}
16                 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${generator_script} > ${file_list}
17                 DEPENDS ${generator_script} ${ARGN}
18                 VERBATIM)
19 endfunction(piglit_make_generated_tests custom_target generator_script)
21 # Generators for OpenGL tests
22 piglit_make_generated_tests(
23         builtin_packing_tests.list
24         gen_builtin_packing_tests.py
25         templates/gen_builtin_packing_tests/vs_unpack.shader_test.mako
26         templates/gen_builtin_packing_tests/vs_pack.shader_test.mako
27         templates/gen_builtin_packing_tests/fs_unpack.shader_test.mako
28         templates/gen_builtin_packing_tests/fs_pack.shader_test.mako
29         templates/gen_builtin_packing_tests/const_pack.shader_test.mako
30         templates/gen_builtin_packing_tests/const_unpack.shader_test.mako
31         )
32 piglit_make_generated_tests(
33         builtin_uniform_tests.list
34         gen_builtin_uniform_tests.py
35         builtin_function.py)
36 piglit_make_generated_tests(
37         constant_array_size_tests.list
38         gen_constant_array_size_tests.py
39         builtin_function.py)
40 piglit_make_generated_tests(
41         const_builtin_equal_tests.list
42         gen_const_builtin_equal_tests.py
43         templates/gen_const_builtin_equal_tests/template.shader_test.mako
44         )
45 piglit_make_generated_tests(
46         tes_input_tests.list
47         gen_tes_input_tests.py)
48 piglit_make_generated_tests(
49         tcs_input_tests.list
50         gen_tcs_input_tests.py)
51 piglit_make_generated_tests(
52         interpolation_tests.list
53         gen_interpolation_tests.py
54         templates/gen_interpolation_tests/template.shader_test.mako
55         )
56 piglit_make_generated_tests(
57         non-lvalue_tests.list
58         gen_non-lvalue_tests.py
59         templates/gen_non-lvalue_tests/assignment.glsl_parser_test.mako
60         templates/gen_non-lvalue_tests/out-parameter.glsl_parser_test.mako
61         )
62 piglit_make_generated_tests(
63         texture_query_lod_tests.list
64         gen_texture_query_lod_tests.py
65         templates/gen_texture_query_lod_tests/template.glsl_parser_test.mako
66         )
67 piglit_make_generated_tests(
68         shader_bit_encoding_tests.list
69         gen_shader_bit_encoding_tests.py
70         templates/gen_shader_bit_encoding_tests/template.shader_test.mako
71         )
72 piglit_make_generated_tests(
73         uniform-initializer_tests.list
74         gen_uniform_initializer_tests.py
75         templates/gen_uniform_initializer_tests/fs-initializer.shader_test.mako
76         templates/gen_uniform_initializer_tests/vs-initializer.shader_test.mako
77         templates/gen_uniform_initializer_tests/fs-initializer-from-const.shader_test.mako
78         templates/gen_uniform_initializer_tests/vs-initializer-from-const.shader_test.mako
79         templates/gen_uniform_initializer_tests/fs-initializer-set-by-API.shader_test.mako
80         templates/gen_uniform_initializer_tests/vs-initializer-set-by-API.shader_test.mako
81         templates/gen_uniform_initializer_tests/fs-initializer-set-by-other-stage.shader_test.mako
82         templates/gen_uniform_initializer_tests/vs-initializer-set-by-other-stage.shader_test.mako
83         )
84 piglit_make_generated_tests(
85         ubo_tests.list
86         random_ubo-arb_uniform_buffer_object.py)
87 piglit_make_generated_tests(
88         interpolation-qualifier-built-in-variable.list
89         interpolation-qualifier-built-in-variable.py
90         templates/interpolation-qualifier-built-in-variable/fs-vs-unused.shader_test.mako
91         templates/interpolation-qualifier-built-in-variable/vs-unused.shader_test.mako
92         templates/interpolation-qualifier-built-in-variable/fs-unused.shader_test.mako
93         templates/interpolation-qualifier-built-in-variable/vs-fs-flip.shader_test.mako
94         templates/interpolation-qualifier-built-in-variable/vs-fs.shader_test.mako
95         )
96 piglit_make_generated_tests(
97         texture_lod_tests.list
98         gen_texture_lod_tests.py
99         templates/gen_texture_lod_tests/tex_grad.vert.mako
100         templates/gen_texture_lod_tests/tex_grad.frag.mako
101         templates/gen_texture_lod_tests/frag_lod.glsl_parser_test.mako
102         )
103 piglit_make_generated_tests(
104         gpu_shader4_tests.list
105         gen_gpu_shader4_tests.py
106         templates/gen_gpu_shader4_tests/binary.frag.mako       templates/gen_gpu_shader4_tests/texel_fetch.vert.mako   templates/gen_gpu_shader4_tests/tex.vert.mako
107         templates/gen_gpu_shader4_tests/binary_op.frag.mako    templates/gen_gpu_shader4_tests/tex.frag.mako           templates/gen_gpu_shader4_tests/unary.frag.mako
108         templates/gen_gpu_shader4_tests/binary_op.vert.mako    templates/gen_gpu_shader4_tests/tex_grad.frag.mako      templates/gen_gpu_shader4_tests/unary_op.frag.mako
109         templates/gen_gpu_shader4_tests/binary.vert.mako       templates/gen_gpu_shader4_tests/tex_grad.vert.mako      templates/gen_gpu_shader4_tests/unary_op.vert.mako
110         templates/gen_gpu_shader4_tests/ternary.frag.mako      templates/gen_gpu_shader4_tests/tex_lod.frag.mako       templates/gen_gpu_shader4_tests/unary.vert.mako
111         templates/gen_gpu_shader4_tests/ternary.vert.mako      templates/gen_gpu_shader4_tests/tex_lod.vert.mako       templates/gen_gpu_shader4_tests/vec_compare.frag.mako
112         templates/gen_gpu_shader4_tests/tex_bias.frag.mako     templates/gen_gpu_shader4_tests/texture_size.frag.mako  templates/gen_gpu_shader4_tests/vec_compare.vert.mako
113         templates/gen_gpu_shader4_tests/texel_fetch.frag.mako  templates/gen_gpu_shader4_tests/texture_size.vert.mako
114         )
115 piglit_make_generated_tests(
116         outerproduct_invalid_params.list
117         gen_outerproduct_invalid_params.py
118         templates/gen_outerproduct_invalid_params/template.vert.mako
119         )
120 piglit_make_generated_tests(
121         outerproduct_tests.list
122         gen_outerproduct_tests.py
123         templates/gen_outerproduct_tests/template.shader_test.mako
124         )
126 piglit_make_generated_tests(
127         builtin_uniform_tests_fp64.list
128         gen_builtin_uniform_tests_fp64.py
129         builtin_function_fp64.py)
130 piglit_make_generated_tests(
131         constant_array_size_tests_fp64.list
132         gen_constant_array_size_tests_fp64.py
133         builtin_function_fp64.py)
134 piglit_make_generated_tests(
135         inout_fp64.list
136         gen_inout_fp64.py
137         templates/gen_inout_fp64/template.frag.mako
138         templates/gen_inout_fp64/template.vert.mako
139         )
140 piglit_make_generated_tests(
141         flat_interpolation_qualifier.list
142         gen_flat_interpolation_qualifier.py
143         templates/gen_flat_interpolation_qualifier/compiler.mako
144         templates/gen_flat_interpolation_qualifier/template.frag.mako
145         )
146 piglit_make_generated_tests(
147         conversion.list
148         gen_conversion.py
149         templates/gen_conversion/base.mako
150         templates/gen_conversion/compiler.frag.mako
151         templates/gen_conversion/compiler.geom.mako
152         templates/gen_conversion/compiler.vert.mako
153         templates/gen_conversion/compiler_base.mako
154         templates/gen_conversion/execution-zero-sign.frag.shader_test.mako
155         templates/gen_conversion/execution-zero-sign.geom.shader_test.mako
156         templates/gen_conversion/execution-zero-sign.vert.shader_test.mako
157         templates/gen_conversion/execution.frag.shader_test.mako
158         templates/gen_conversion/execution.geom.shader_test.mako
159         templates/gen_conversion/execution.vert.shader_test.mako
160         templates/gen_conversion/execution_base.mako
161         templates/gen_conversion/shader-zero-sign.frag.mako
162         templates/gen_conversion/shader-zero-sign.geom.mako
163         templates/gen_conversion/shader-zero-sign.vert.mako
164         templates/gen_conversion/shader.frag.mako
165         templates/gen_conversion/shader.geom.mako
166         templates/gen_conversion/shader.vert.mako
167         templates/gen_conversion/shader_base.mako
168         )
169 piglit_make_generated_tests(
170         shader_intel_conservative_rasterization.list
171         gen_shader_intel_conservative_rasterization.py)
172 piglit_make_generated_tests(
173         shader_precision_tests.list
174         gen_shader_precision_tests.py
175         builtin_function.py
176         templates/gen_shader_precision_tests/vs.mako
177         templates/gen_shader_precision_tests/fs.mako
178         templates/gen_shader_precision_tests/gs.mako)
179 piglit_make_generated_tests(
180         shader_image_load_store_tests.list
181         gen_shader_image_load_store_tests.py)
182 piglit_make_generated_tests(
183         shader_image_nv_image_formats_tests.list
184         gen_shader_image_nv_image_formats_tests.py)
185 piglit_make_generated_tests(
186         variable_index_read_tests.list
187         gen_variable_index_read_tests.py
188         templates/gen_variable_index_read_tests/vs.shader_test.mako
189         templates/gen_variable_index_read_tests/fs.shader_test.mako
190         templates/gen_variable_index_read_tests/helpers.mako)
191 piglit_make_generated_tests(
192         gen_extensions_defined.list
193         gen_extensions_defined.py
194         templates/gen_extensions_defined/enabled.glsl.mako
195         templates/gen_extensions_defined/disabled.glsl.mako
196         templates/gen_extensions_defined/undefined-require.glsl.mako
197         modules/glsl.py)
198 piglit_make_generated_tests(
199         vp-tex.list
200         gen_vp_tex.py
201         templates/gen_vp_tex/helpers.mako
202         templates/gen_vp_tex/arbvp.mako
203         templates/gen_vp_tex/nvvp3.mako
204         templates/gen_vp_tex/nvvp3_2.mako)
205 piglit_make_generated_tests(
206         variable_index_write_tests.list
207         gen_variable_index_write_tests.py
208         templates/gen_variable_index_write_tests/vs.shader_test.mako
209         templates/gen_variable_index_write_tests/fs.shader_test.mako
210         templates/gen_variable_index_write_tests/helpers.mako)
211 piglit_make_generated_tests(
212         vs_in_fp64.list
213         gen_vs_in_fp64.py
214         templates/gen_vs_in_fp64/columns.shader_test.mako
215         templates/gen_vs_in_fp64/regular.shader_test.mako)
216 piglit_make_generated_tests(
217         shader_framebuffer_fetch_tests.list
218         gen_shader_framebuffer_fetch_tests.py)
219 piglit_make_generated_tests(
220         intel_shader_integer_functions2_tests.list
221         gen_intel_shader_integer_functions2_tests.py
222         templates/gen_intel_shader_integer_functions2_tests/absoluteDifference.shader_test.mako
223         templates/gen_intel_shader_integer_functions2_tests/addSaturate.shader_test.mako
224         templates/gen_intel_shader_integer_functions2_tests/countLeadingZeros.shader_test.mako
225         templates/gen_intel_shader_integer_functions2_tests/multiply32x16.shader_test.mako
226         templates/gen_intel_shader_integer_functions2_tests/subtractSaturate.shader_test.mako)
227 piglit_make_generated_tests(
228         inout_64bit.list
229         gen_inout_64bit_tests.py)
230 piglit_make_generated_tests(
231         interface_block_tests.list
232         gen_interface_block_tests.py)
234 # OpenCL Test generators
235 piglit_make_generated_tests(
236         builtin_cl_int_tests.list
237         gen_cl_int_builtins.py)
238 piglit_make_generated_tests(
239         cl_store_tests.list
240         gen_cl_store_tests.py)
241 piglit_make_generated_tests(
242         cl_vstore_tests.list
243         gen_cl_vstore_tests.py)
244 piglit_make_generated_tests(
245         cl_vload_tests.list
246         gen_cl_vload_tests.py)
247 piglit_make_generated_tests(
248         builtin_cl_math_tests.list
249         gen_cl_math_builtins.py)
250 piglit_make_generated_tests(
251         builtin_cl_relational_tests.list
252         gen_cl_relational_builtins.py)
253 piglit_make_generated_tests(
254         builtin_cl_common_tests.list
255         gen_cl_common_builtins.py)
256 piglit_make_generated_tests(
257         builtin_cl_shuffle_tests.list
258         gen_cl_shuffle_builtins.py)
259 piglit_make_generated_tests(
260         builtin_cl_shuffle2_tests.list
261         gen_cl_shuffle2_builtins.py)
263 # Create a custom target for generating OpenGL tests
264 # This is not added to the default target, instead it is added
265 # as a dependency of gen-tests if OpenGL or OpenGLES{2,3} tests
266 # are enabled
267 add_custom_target(gen-gl-tests
268         DEPENDS builtin_packing_tests.list
269                         outerproduct_tests.list
270                         outerproduct_invalid_params.list
271                         builtin_uniform_tests.list
272                         constant_array_size_tests.list
273                         const_builtin_equal_tests.list
274                         builtin_packing_tests.list
275                         tcs_input_tests.list
276                         tes_input_tests.list
277                         interpolation_tests.list
278                         non-lvalue_tests.list
279                         texture_query_lod_tests.list
280                         texture_lod_tests.list
281                         shader_bit_encoding_tests.list
282                         uniform-initializer_tests.list
283                         ubo_tests.list
284                         interpolation-qualifier-built-in-variable.list
285                         builtin_uniform_tests_fp64.list
286                         constant_array_size_tests_fp64.list
287                         inout_fp64.list
288                         flat_interpolation_qualifier.list
289                         conversion.list
290                         shader_precision_tests.list
291                         shader_framebuffer_fetch_tests.list
292                         shader_image_load_store_tests.list
293                         shader_image_nv_image_formats_tests.list
294                         intel_shader_integer_functions2_tests.list
295                         shader_intel_conservative_rasterization.list
296                         variable_index_read_tests.list
297                         gen_extensions_defined.list
298                         vp-tex.list
299                         variable_index_write_tests.list
300                         vs_in_fp64.list
301                         gpu_shader4_tests.list
302                         inout_64bit.list
303                         interface_block_tests.list
306 # Create a custom target for generating OpenCL tests
307 # This is not added to the default target, instead it is added
308 # as a dependency of gen-tests if OpenCL tests are enabled
309 add_custom_target(gen-cl-tests
310         DEPENDS builtin_cl_int_tests.list
311                         builtin_cl_math_tests.list
312                         builtin_cl_relational_tests.list
313                         builtin_cl_common_tests.list
314                         builtin_cl_shuffle_tests.list
315                         builtin_cl_shuffle2_tests.list
316                         cl_store_tests.list
317                         cl_vstore_tests.list
318                         cl_vload_tests.list
321 # Add a "gen-tests" target that can be used to generate all the
322 # tests without doing any other compilation.
323 add_custom_target(gen-tests ALL COMMENT "meta-target for other test generators")
325 # Add gen-gl-tests as a dependency of the gen-tests if OpenGL or OpenGL ES {2,3}
326 # are requested. there are no GLES1 tests to generate
327 if(${PIGLIT_BUILD_GL_TESTS} OR ${PIGLIT_BUILD_GLES2_TESTS} OR ${PIGLIT_BUILD_GLES3_TESTS})
328         add_dependencies(gen-tests gen-gl-tests)
329 endif(${PIGLIT_BUILD_GL_TESTS} OR ${PIGLIT_BUILD_GLES2_TESTS} OR ${PIGLIT_BUILD_GLES3_TESTS})
331 # Add gen-cl-tests as a dependency of the gen-tests if OpenCL is requested
332 if(${PIGLIT_BUILD_CL_TESTS})
333         add_dependencies(gen-tests gen-cl-tests)
334 endif(${PIGLIT_BUILD_CL_TESTS})