glsl-1.30: add more loop unroll tests
[piglit.git] / tests / cl / doc_program.c
blobb44fa1fd4fce2f69d394c95463c218c7fcbb9cba
1 #include "piglit-framework-cl-program.h"
3 /*
4 * This is a file for program tests.
5 * This type of test should be used for testing program building and
6 * kernel execution.
7 * Empty template is in template_program.c
8 */
10 /* Function prototypes for config.init_func and config.clean_func */
11 void init(const int argc, const char** argv, void* config);
12 void clean(const int argc, const char** argv,void* config);
14 /* Test configuration */
15 PIGLIT_CL_PROGRAM_TEST_CONFIG_BEGIN
17 /* Common */
18 config.name = "Add and subtract"; // Name of the test
19 config.run_per_platform = true; // Run piglit_cl_test per each platform
20 config.run_per_device = true; // Run piglit_cl_test per each device
21 config.platform_regex = ".*Gallium.*"; // Only run on platforms that match this POSIX
22 // regex (if run_per_platform or run_per_device is true)
23 config.device_regex = ".*RV300.*"; // Only run on device that match this POSIX
24 // regex (if run_per_device is true)
25 config.require_platform_extensions = "ext1 ext2"; //Space-delimited required platform extensions
26 config.require_device_extensions = "ext1 ext2"; //Space-delimited required device extensions
27 init_func = init; // Function called before all the test calls
28 clean_func = clean; // Function called after all the test calls
30 /* Program */
31 config.clc_version_min = 10; // Minimum required OpenCL C version
32 config.clc_version_max = 12; // Maximum required OpenCL C version
33 config.program_source = "kernel void test(){}"; // Create a program from string for each test
34 config.program_source_file = "test.clc"; // Create a program from file for each test
35 config.program_binary = "kernel void test(){}"; // Create a program from string for each test (binary)
36 config.program_binary_file = "test.bin"; // Create a program from file for each test (binary)
37 config.build_options = "-D DEF"; // Build options for the program
38 config.expect_build_fail = true; // Expect that build will fail
39 config.kernel_name = "test"; // Create a kernel
41 PIGLIT_CL_PROGRAM_TEST_CONFIG_END
44 /* Test function */
45 enum piglit_result
46 piglit_cl_test(const int argc,
47 const char** argv,
48 const struct piglit_cl_program_test_config* config,
49 const struct piglit_cl_program_test_env* env) // look at piglit-framework-cl-program.h
51 enum piglit_result result = PIGLIT_PASS;
53 /* Code for test */
55 return result;