1 // 2 // Copyright (c) 2020 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 #ifndef _featureHelpers_h 17 #define _featureHelpers_h 18 19 #include "compat.h" 20 #include "testHarness.h" 21 22 struct OpenCLCFeatures 23 { 24 bool supports__opencl_c_3d_image_writes; 25 bool supports__opencl_c_atomic_order_acq_rel; 26 bool supports__opencl_c_atomic_order_seq_cst; 27 bool supports__opencl_c_atomic_scope_device; 28 bool supports__opencl_c_atomic_scope_all_devices; 29 bool supports__opencl_c_device_enqueue; 30 bool supports__opencl_c_generic_address_space; 31 bool supports__opencl_c_fp64; 32 bool supports__opencl_c_images; 33 bool supports__opencl_c_int64; 34 bool supports__opencl_c_pipes; 35 bool supports__opencl_c_program_scope_global_variables; 36 bool supports__opencl_c_read_write_images; 37 bool supports__opencl_c_subgroups; 38 bool supports__opencl_c_work_group_collective_functions; 39 }; 40 41 int get_device_cl_c_features(cl_device_id device, OpenCLCFeatures& features); 42 43 #endif // _featureHelpers_h 44