gl-1.1: Test that unused normal array in ff shader doesn't affect other arrays
[piglit.git] / generated_tests / CMakeLists.txt
blobdcee62a3a59887a6738fcb2c0a28e28f406cf5db
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         interpolation-qualifier-built-in-variable.list
86         interpolation-qualifier-built-in-variable.py
87         templates/interpolation-qualifier-built-in-variable/fs-vs-unused.shader_test.mako
88         templates/interpolation-qualifier-built-in-variable/vs-unused.shader_test.mako
89         templates/interpolation-qualifier-built-in-variable/fs-unused.shader_test.mako
90         templates/interpolation-qualifier-built-in-variable/vs-fs-flip.shader_test.mako
91         templates/interpolation-qualifier-built-in-variable/vs-fs.shader_test.mako
92         )
93 piglit_make_generated_tests(
94         texture_lod_tests.list
95         gen_texture_lod_tests.py
96         templates/gen_texture_lod_tests/tex_grad.vert.mako
97         templates/gen_texture_lod_tests/tex_grad.frag.mako
98         templates/gen_texture_lod_tests/frag_lod.glsl_parser_test.mako
99         )
100 piglit_make_generated_tests(
101         gpu_shader4_tests.list
102         gen_gpu_shader4_tests.py
103         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
104         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
105         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
106         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
107         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
108         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
109         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
110         templates/gen_gpu_shader4_tests/texel_fetch.frag.mako  templates/gen_gpu_shader4_tests/texture_size.vert.mako
111         )
112 piglit_make_generated_tests(
113         outerproduct_invalid_params.list
114         gen_outerproduct_invalid_params.py
115         templates/gen_outerproduct_invalid_params/template.vert.mako
116         )
117 piglit_make_generated_tests(
118         outerproduct_tests.list
119         gen_outerproduct_tests.py
120         templates/gen_outerproduct_tests/template.shader_test.mako
121         )
123 piglit_make_generated_tests(
124         builtin_uniform_tests_fp64.list
125         gen_builtin_uniform_tests_fp64.py
126         builtin_function_fp64.py)
127 piglit_make_generated_tests(
128         constant_array_size_tests_fp64.list
129         gen_constant_array_size_tests_fp64.py
130         builtin_function_fp64.py)
131 piglit_make_generated_tests(
132         inout_fp64.list
133         gen_inout_fp64.py
134         templates/gen_inout_fp64/template.frag.mako
135         templates/gen_inout_fp64/template.vert.mako
136         )
137 piglit_make_generated_tests(
138         flat_interpolation_qualifier.list
139         gen_flat_interpolation_qualifier.py
140         templates/gen_flat_interpolation_qualifier/compiler.mako
141         templates/gen_flat_interpolation_qualifier/template.frag.mako
142         )
143 piglit_make_generated_tests(
144         conversion.list
145         gen_conversion.py
146         templates/gen_conversion/base.mako
147         templates/gen_conversion/compiler.frag.mako
148         templates/gen_conversion/compiler.geom.mako
149         templates/gen_conversion/compiler.vert.mako
150         templates/gen_conversion/compiler_base.mako
151         templates/gen_conversion/execution-zero-sign.frag.shader_test.mako
152         templates/gen_conversion/execution-zero-sign.geom.shader_test.mako
153         templates/gen_conversion/execution-zero-sign.vert.shader_test.mako
154         templates/gen_conversion/execution.frag.shader_test.mako
155         templates/gen_conversion/execution.geom.shader_test.mako
156         templates/gen_conversion/execution.vert.shader_test.mako
157         templates/gen_conversion/execution_base.mako
158         templates/gen_conversion/shader-zero-sign.frag.mako
159         templates/gen_conversion/shader-zero-sign.geom.mako
160         templates/gen_conversion/shader-zero-sign.vert.mako
161         templates/gen_conversion/shader.frag.mako
162         templates/gen_conversion/shader.geom.mako
163         templates/gen_conversion/shader.vert.mako
164         templates/gen_conversion/shader_base.mako
165         )
166 piglit_make_generated_tests(
167         shader_intel_conservative_rasterization.list
168         gen_shader_intel_conservative_rasterization.py)
169 piglit_make_generated_tests(
170         shader_precision_tests.list
171         gen_shader_precision_tests.py
172         builtin_function.py
173         templates/gen_shader_precision_tests/vs.mako
174         templates/gen_shader_precision_tests/fs.mako
175         templates/gen_shader_precision_tests/gs.mako)
176 piglit_make_generated_tests(
177         shader_image_load_store_tests.list
178         gen_shader_image_load_store_tests.py)
179 piglit_make_generated_tests(
180         shader_image_nv_image_formats_tests.list
181         gen_shader_image_nv_image_formats_tests.py)
182 piglit_make_generated_tests(
183         variable_index_read_tests.list
184         gen_variable_index_read_tests.py
185         templates/gen_variable_index_read_tests/vs.shader_test.mako
186         templates/gen_variable_index_read_tests/fs.shader_test.mako
187         templates/gen_variable_index_read_tests/helpers.mako)
188 piglit_make_generated_tests(
189         gen_extensions_defined.list
190         gen_extensions_defined.py
191         templates/gen_extensions_defined/enabled.glsl.mako
192         templates/gen_extensions_defined/disabled.glsl.mako
193         templates/gen_extensions_defined/undefined-require.glsl.mako
194         modules/glsl.py)
195 piglit_make_generated_tests(
196         vp-tex.list
197         gen_vp_tex.py
198         templates/gen_vp_tex/helpers.mako
199         templates/gen_vp_tex/arbvp.mako
200         templates/gen_vp_tex/nvvp3.mako
201         templates/gen_vp_tex/nvvp3_2.mako)
202 piglit_make_generated_tests(
203         variable_index_write_tests.list
204         gen_variable_index_write_tests.py
205         templates/gen_variable_index_write_tests/vs.shader_test.mako
206         templates/gen_variable_index_write_tests/fs.shader_test.mako
207         templates/gen_variable_index_write_tests/helpers.mako)
208 piglit_make_generated_tests(
209         vs_in_fp64.list
210         gen_vs_in_fp64.py
211         templates/gen_vs_in_fp64/columns.shader_test.mako
212         templates/gen_vs_in_fp64/regular.shader_test.mako)
213 piglit_make_generated_tests(
214         shader_framebuffer_fetch_tests.list
215         gen_shader_framebuffer_fetch_tests.py)
216 piglit_make_generated_tests(
217         intel_shader_integer_functions2_tests.list
218         gen_intel_shader_integer_functions2_tests.py
219         templates/gen_intel_shader_integer_functions2_tests/absoluteDifference.shader_test.mako
220         templates/gen_intel_shader_integer_functions2_tests/addSaturate.shader_test.mako
221         templates/gen_intel_shader_integer_functions2_tests/countLeadingZeros.shader_test.mako
222         templates/gen_intel_shader_integer_functions2_tests/multiply32x16.shader_test.mako
223         templates/gen_intel_shader_integer_functions2_tests/subtractSaturate.shader_test.mako)
224 piglit_make_generated_tests(
225         inout_64bit.list
226         gen_inout_64bit_tests.py)
228 # OpenCL Test generators
229 piglit_make_generated_tests(
230         builtin_cl_int_tests.list
231         gen_cl_int_builtins.py)
232 piglit_make_generated_tests(
233         cl_store_tests.list
234         gen_cl_store_tests.py)
235 piglit_make_generated_tests(
236         cl_vstore_tests.list
237         gen_cl_vstore_tests.py)
238 piglit_make_generated_tests(
239         cl_vload_tests.list
240         gen_cl_vload_tests.py)
241 piglit_make_generated_tests(
242         builtin_cl_math_tests.list
243         gen_cl_math_builtins.py)
244 piglit_make_generated_tests(
245         builtin_cl_relational_tests.list
246         gen_cl_relational_builtins.py)
247 piglit_make_generated_tests(
248         builtin_cl_common_tests.list
249         gen_cl_common_builtins.py)
250 piglit_make_generated_tests(
251         builtin_cl_shuffle_tests.list
252         gen_cl_shuffle_builtins.py)
253 piglit_make_generated_tests(
254         builtin_cl_shuffle2_tests.list
255         gen_cl_shuffle2_builtins.py)
257 # Create a custom target for generating OpenGL tests
258 # This is not added to the default target, instead it is added
259 # as a dependency of gen-tests if OpenGL or OpenGLES{2,3} tests
260 # are enabled
261 add_custom_target(gen-gl-tests
262         DEPENDS builtin_packing_tests.list
263                         outerproduct_tests.list
264                         outerproduct_invalid_params.list
265                         builtin_uniform_tests.list
266                         constant_array_size_tests.list
267                         const_builtin_equal_tests.list
268                         builtin_packing_tests.list
269                         tcs_input_tests.list
270                         tes_input_tests.list
271                         interpolation_tests.list
272                         non-lvalue_tests.list
273                         texture_query_lod_tests.list
274                         texture_lod_tests.list
275                         shader_bit_encoding_tests.list
276                         uniform-initializer_tests.list
277                         interpolation-qualifier-built-in-variable.list
278                         builtin_uniform_tests_fp64.list
279                         constant_array_size_tests_fp64.list
280                         inout_fp64.list
281                         flat_interpolation_qualifier.list
282                         conversion.list
283                         shader_precision_tests.list
284                         shader_framebuffer_fetch_tests.list
285                         shader_image_load_store_tests.list
286                         shader_image_nv_image_formats_tests.list
287                         intel_shader_integer_functions2_tests.list
288                         shader_intel_conservative_rasterization.list
289                         variable_index_read_tests.list
290                         gen_extensions_defined.list
291                         vp-tex.list
292                         variable_index_write_tests.list
293                         vs_in_fp64.list
294                         gpu_shader4_tests.list
295                         inout_64bit.list
298 # Create a custom target for generating OpenCL tests
299 # This is not added to the default target, instead it is added
300 # as a dependency of gen-tests if OpenCL tests are enabled
301 add_custom_target(gen-cl-tests
302         DEPENDS builtin_cl_int_tests.list
303                         builtin_cl_math_tests.list
304                         builtin_cl_relational_tests.list
305                         builtin_cl_common_tests.list
306                         builtin_cl_shuffle_tests.list
307                         builtin_cl_shuffle2_tests.list
308                         cl_store_tests.list
309                         cl_vstore_tests.list
310                         cl_vload_tests.list
313 # Add a "gen-tests" target that can be used to generate all the
314 # tests without doing any other compilation.
315 add_custom_target(gen-tests ALL COMMENT "meta-target for other test generators")
317 # Add gen-gl-tests as a dependency of the gen-tests if OpenGL or OpenGL ES {2,3}
318 # are requested. there are no GLES1 tests to generate
319 if(${PIGLIT_BUILD_GL_TESTS} OR ${PIGLIT_BUILD_GLES2_TESTS} OR ${PIGLIT_BUILD_GLES3_TESTS})
320         add_dependencies(gen-tests gen-gl-tests)
321 endif(${PIGLIT_BUILD_GL_TESTS} OR ${PIGLIT_BUILD_GLES2_TESTS} OR ${PIGLIT_BUILD_GLES3_TESTS})
323 # Add gen-cl-tests as a dependency of the gen-tests if OpenCL is requested
324 if(${PIGLIT_BUILD_CL_TESTS})
325         add_dependencies(gen-tests gen-cl-tests)
326 endif(${PIGLIT_BUILD_CL_TESTS})