1 // 2 // Copyright (c) 2017 The Khronos Group Inc. 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 // 16 #include "testBase.h" 17 #include "harness/mt19937.h" 18 19 20 #pragma mark - 21 #pragma Misc tests 22 23 extern int test_buffers( cl_device_id device, cl_context context, 24 cl_command_queue queue, int num_elements ); 25 26 extern int test_fence_sync( cl_device_id device, cl_context context, 27 cl_command_queue queue, int numElements ); 28 29 30 #pragma mark - 31 #pragma mark Tead tests 32 33 extern int test_images_read_2D( cl_device_id device, cl_context context, 34 cl_command_queue queue, int num_elements ); 35 36 extern int test_images_read_1D( cl_device_id device, cl_context context, 37 cl_command_queue queue, int num_elements ); 38 39 extern int test_images_read_texturebuffer( cl_device_id device, cl_context context, 40 cl_command_queue queue, int num_elements ); 41 42 extern int test_images_read_1Darray( cl_device_id device, cl_context context, 43 cl_command_queue queue, int num_elements ); 44 45 extern int test_images_read_2Darray( cl_device_id device, cl_context context, 46 cl_command_queue queue, int num_elements ); 47 48 extern int test_images_read_cube( cl_device_id device, cl_context context, 49 cl_command_queue queue, int num_elements ); 50 51 extern int test_images_read_3D( cl_device_id device, cl_context context, 52 cl_command_queue queue, int num_elements ); 53 54 extern int test_renderbuffer_read( cl_device_id device, cl_context context, 55 cl_command_queue queue, int num_elements ); 56 57 #pragma mark - 58 #pragma mark Write tests 59 60 // 2D tests are the ones with no suffix: 61 62 extern int test_images_write( cl_device_id device, cl_context context, 63 cl_command_queue queue, int num_elements ); 64 65 extern int test_images_write_cube( cl_device_id device, cl_context context, 66 cl_command_queue queue, int num_elements ); 67 68 extern int test_renderbuffer_write( cl_device_id device, cl_context context, 69 cl_command_queue queue, int num_elements ); 70 71 // Here are the rest: 72 73 extern int test_images_write_1D( cl_device_id device, cl_context context, 74 cl_command_queue queue, int num_elements ); 75 76 extern int test_images_write_texturebuffer( cl_device_id device, cl_context context, 77 cl_command_queue queue, int num_elements ); 78 79 extern int test_images_write_1Darray( cl_device_id device, cl_context context, 80 cl_command_queue queue, int num_elements ); 81 82 extern int test_images_write_2Darray( cl_device_id device, cl_context context, 83 cl_command_queue queue, int num_elements ); 84 85 extern int test_images_write_3D( cl_device_id device, cl_context context, 86 cl_command_queue queue, int num_elements ); 87 88 #pragma mark - 89 #pragma mark Get info test entry points 90 91 extern int test_buffers_getinfo( cl_device_id device, cl_context context, 92 cl_command_queue queue, int numElements ); 93 94 extern int test_images_1D_getinfo( cl_device_id device, cl_context context, 95 cl_command_queue queue, int numElements ); 96 97 extern int test_images_texturebuffer_getinfo( cl_device_id device, cl_context context, 98 cl_command_queue queue, int numElements ); 99 100 extern int test_images_1Darray_getinfo( cl_device_id device, cl_context context, 101 cl_command_queue queue, int numElements ); 102 103 extern int test_images_2D_getinfo( cl_device_id device, cl_context context, 104 cl_command_queue queue, int numElements ); 105 106 extern int test_images_2Darray_getinfo( cl_device_id device, cl_context context, 107 cl_command_queue queue, int numElements ); 108 109 extern int test_images_cube_getinfo( cl_device_id device, cl_context context, 110 cl_command_queue queue, int numElements ); 111 112 extern int test_images_3D_getinfo( cl_device_id device, cl_context context, 113 cl_command_queue queue, int numElements ); 114 115 extern int test_images_read_2D_depth( cl_device_id device, cl_context context, 116 cl_command_queue queue, int numElements ); 117 118 extern int test_images_write_2D_depth( cl_device_id device, cl_context context, 119 cl_command_queue queue, int numElements ); 120 121 extern int test_images_read_2Darray_depth( cl_device_id device, cl_context context, 122 cl_command_queue queue, int ); 123 124 extern int test_images_write_2Darray_depth( cl_device_id device, cl_context context, 125 cl_command_queue queue, int numElements ); 126 127 extern int test_images_read_2D_multisample( cl_device_id device, cl_context context, 128 cl_command_queue queue, int numElements ); 129 130 extern int test_images_read_2Darray_multisample( cl_device_id device, cl_context context, 131 cl_command_queue queue, int ); 132 133 extern int test_image_methods_depth( cl_device_id device, cl_context context, 134 cl_command_queue queue, int ); 135 136 extern int test_image_methods_multisample( cl_device_id device, cl_context context, 137 cl_command_queue queue, int ); 138 139 extern int test_renderbuffer_getinfo( cl_device_id device, cl_context context, 140 cl_command_queue queue, int numElements );