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 // CLPlatformVk.h: Defines the class interface for CLPlatformVk, implementing CLPlatformImpl. 7 8 #ifndef LIBANGLE_RENDERER_VULKAN_CLPLATFORMVK_H_ 9 #define LIBANGLE_RENDERER_VULKAN_CLPLATFORMVK_H_ 10 11 #include "libANGLE/renderer/CLPlatformImpl.h" 12 13 namespace rx 14 { 15 16 class CLPlatformVk : public CLPlatformImpl 17 { 18 public: 19 ~CLPlatformVk() override; 20 21 Info createInfo() const override; 22 CLDeviceImpl::CreateDatas createDevices() const override; 23 24 CLContextImpl::Ptr createContext(cl::Context &context, 25 const cl::DevicePtrs &devices, 26 bool userSync, 27 cl_int &errorCode) override; 28 29 CLContextImpl::Ptr createContextFromType(cl::Context &context, 30 cl::DeviceType deviceType, 31 bool userSync, 32 cl_int &errorCode) override; 33 34 cl_int unloadCompiler() override; 35 36 static void Initialize(CreateFuncs &createFuncs); 37 38 static constexpr cl_version GetVersion(); 39 static const std::string &GetVersionString(); 40 41 private: 42 explicit CLPlatformVk(const cl::Platform &platform); 43 }; 44 GetVersion()45constexpr cl_version CLPlatformVk::GetVersion() 46 { 47 return CL_MAKE_VERSION(1, 2, 0); 48 } 49 50 } // namespace rx 51 52 #endif // LIBANGLE_RENDERER_VULKAN_CLPLATFORMVK_H_ 53