blob: 94448b5d105c8afea0ff7d61e2af0dccf4e98b87 [file] [log] [blame]
Jesse Halld02edcb2015-09-08 07:44:48 -07001/*
2 * Copyright 2015 The Android Open Source Project
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
Jesse Hall04f4f472015-08-16 19:51:04 -070017#ifndef LIBVULKAN_LOADER_H
18#define LIBVULKAN_LOADER_H 1
19
Jesse Hall6bd5dfa2016-01-16 17:13:30 -080020#include <bitset>
Chia-I Wucc5e2762016-03-24 13:01:16 +080021#include <vulkan/vulkan.h>
Jesse Hall715b86a2016-01-16 16:34:29 -080022#include "debug_report.h"
Chia-I Wucc5e2762016-03-24 13:01:16 +080023#include "driver.h"
Jesse Hall04f4f472015-08-16 19:51:04 -070024
Chia-I Wu136b8eb2016-03-24 15:01:52 +080025struct hwvulkan_device_t;
26
Jesse Hall04f4f472015-08-16 19:51:04 -070027namespace vulkan {
28
Jesse Hall1f91d392015-12-11 16:28:44 -080029// -----------------------------------------------------------------------------
Jesse Hall04f4f472015-08-16 19:51:04 -070030// loader.cpp
31
Jesse Hall1f91d392015-12-11 16:28:44 -080032const VkAllocationCallbacks* GetAllocator(VkInstance instance);
33const VkAllocationCallbacks* GetAllocator(VkDevice device);
Jesse Hall715b86a2016-01-16 16:34:29 -080034VkInstance GetDriverInstance(VkInstance instance);
Chia-I Wucc5e2762016-03-24 13:01:16 +080035const driver::InstanceDriverTable& GetDriverDispatch(VkInstance instance);
36const driver::DeviceDriverTable& GetDriverDispatch(VkDevice device);
37const driver::DeviceDriverTable& GetDriverDispatch(VkQueue queue);
Jesse Hall715b86a2016-01-16 16:34:29 -080038DebugReportCallbackList& GetDebugReportCallbacks(VkInstance instance);
Jesse Hall04f4f472015-08-16 19:51:04 -070039
Jesse Hallb1352bc2015-09-04 16:12:33 -070040// -----------------------------------------------------------------------------
41// swapchain.cpp
42
Jesse Hall1f91d392015-12-11 16:28:44 -080043// clang-format off
Jesse Hallf9fa9a52016-01-08 16:08:51 -080044VKAPI_ATTR VkResult CreateAndroidSurfaceKHR_Bottom(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
Jesse Hall1f91d392015-12-11 16:28:44 -080045VKAPI_ATTR void DestroySurfaceKHR_Bottom(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* allocator);
46VKAPI_ATTR VkResult GetPhysicalDeviceSurfaceSupportKHR_Bottom(VkPhysicalDevice pdev, uint32_t queue_family, VkSurfaceKHR surface, VkBool32* pSupported);
47VKAPI_ATTR VkResult GetPhysicalDeviceSurfaceCapabilitiesKHR_Bottom(VkPhysicalDevice pdev, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* capabilities);
48VKAPI_ATTR VkResult GetPhysicalDeviceSurfaceFormatsKHR_Bottom(VkPhysicalDevice pdev, VkSurfaceKHR surface, uint32_t* count, VkSurfaceFormatKHR* formats);
49VKAPI_ATTR VkResult GetPhysicalDeviceSurfacePresentModesKHR_Bottom(VkPhysicalDevice pdev, VkSurfaceKHR surface, uint32_t* count, VkPresentModeKHR* modes);
50VKAPI_ATTR VkResult CreateSwapchainKHR_Bottom(VkDevice device, const VkSwapchainCreateInfoKHR* create_info, const VkAllocationCallbacks* allocator, VkSwapchainKHR* swapchain_handle);
51VKAPI_ATTR void DestroySwapchainKHR_Bottom(VkDevice device, VkSwapchainKHR swapchain_handle, const VkAllocationCallbacks* allocator);
52VKAPI_ATTR VkResult GetSwapchainImagesKHR_Bottom(VkDevice device, VkSwapchainKHR swapchain_handle, uint32_t* count, VkImage* images);
53VKAPI_ATTR VkResult AcquireNextImageKHR_Bottom(VkDevice device, VkSwapchainKHR swapchain_handle, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* image_index);
54VKAPI_ATTR VkResult QueuePresentKHR_Bottom(VkQueue queue, const VkPresentInfoKHR* present_info);
55// clang-format on
Jesse Hallb1352bc2015-09-04 16:12:33 -070056
Jesse Hall04f4f472015-08-16 19:51:04 -070057} // namespace vulkan
58
59#endif // LIBVULKAN_LOADER_H