• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #include "swapchain.h"
16 
17 extern "C" {
18 __attribute__((visibility("default")))
vkCreateInstance(const VkInstanceCreateInfo * pCreateInfo,const VkAllocationCallbacks * pAllocator,VkInstance * pInstance)19 VKAPI_ATTR VkResult vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo,
20     const VkAllocationCallbacks* pAllocator, VkInstance* pInstance)
21 {
22     return vulkan::driver::CreateInstance(pCreateInfo, pAllocator, pInstance);
23 }
24 
25 __attribute__((visibility("default")))
vkEnumerateInstanceExtensionProperties(const char * pLayerName,uint32_t * pPropertyCount,VkExtensionProperties * pProperties)26 VKAPI_ATTR VkResult vkEnumerateInstanceExtensionProperties(const char* pLayerName,
27 uint32_t* pPropertyCount, VkExtensionProperties* pProperties)
28 {
29     return vulkan::driver::EnumerateInstanceExtensionProperties(pLayerName, pPropertyCount, pProperties);
30 }
31 
32 __attribute__((visibility("default")))
vkGetInstanceProcAddr(VkInstance instance,const char * pName)33 VKAPI_ATTR PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance instance, const char* pName)
34 {
35     return vulkan::driver::GetInstanceProcAddr(instance, pName);
36 }
37 
38 __attribute__((visibility("default")))
vkGetDeviceProcAddr(VkDevice device,const char * pName)39 VKAPI_ATTR PFN_vkVoidFunction vkGetDeviceProcAddr(VkDevice device, const char* pName)
40 {
41     return vulkan::driver::GetDeviceProcAddr(device, pName);
42 }
43 
IsSupportedVulkan()44 __attribute__((visibility("default"))) bool IsSupportedVulkan()
45 {
46     return vulkan::driver::IsSupportedVulkan();
47 }
48 }