1 // 2 // Copyright 2021 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // CLExtensions.h: Defines the rx::CLExtensions struct. 7 8 #ifndef LIBANGLE_RENDERER_CLEXTENSIONS_H_ 9 #define LIBANGLE_RENDERER_CLEXTENSIONS_H_ 10 11 #include "libANGLE/renderer/CLtypes.h" 12 13 namespace rx 14 { 15 16 struct CLExtensions 17 { 18 CLExtensions(); 19 ~CLExtensions(); 20 21 CLExtensions(const CLExtensions &) = delete; 22 CLExtensions &operator=(const CLExtensions &) = delete; 23 24 CLExtensions(CLExtensions &&); 25 CLExtensions &operator=(CLExtensions &&); 26 27 void initializeExtensions(std::string &&extensionStr); 28 29 std::string versionStr; 30 cl_version version = 0u; 31 32 std::string extensions; 33 NameVersionVector extensionsWithVersion; 34 35 // These Khronos extension names must be returned by all devices that support OpenCL 1.1. 36 bool khrByteAddressableStore = false; // cl_khr_byte_addressable_store 37 bool khrGlobalInt32BaseAtomics = false; // cl_khr_global_int32_base_atomics 38 bool khrGlobalInt32ExtendedAtomics = false; // cl_khr_global_int32_extended_atomics 39 bool khrLocalInt32BaseAtomics = false; // cl_khr_local_int32_base_atomics 40 bool khrLocalInt32ExtendedAtomics = false; // cl_khr_local_int32_extended_atomics 41 42 // These Khronos extension names must be returned by all devices that support 43 // OpenCL 2.0, OpenCL 2.1, or OpenCL 2.2. For devices that support OpenCL 3.0, these 44 // extension names must be returned when and only when the optional feature is supported. 45 bool khr3D_ImageWrites = false; // cl_khr_3d_image_writes 46 bool khrDepthImages = false; // cl_khr_depth_images 47 bool khrImage2D_FromBuffer = false; // cl_khr_image2d_from_buffer 48 49 // Optional extensions 50 bool khrExtendedVersioning = false; // cl_khr_extended_versioning 51 bool khrFP64 = false; // cl_khr_fp64 52 bool khrICD = false; // cl_khr_icd 53 bool khrInt64BaseAtomics = false; // cl_khr_int64_base_atomics 54 bool khrInt64ExtendedAtomics = false; // cl_khr_int64_extended_atomics 55 }; 56 57 } // namespace rx 58 59 #endif // LIBANGLE_RENDERER_CLEXTENSIONS_H_ 60