1 /* 2 * Copyright 2016 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 // This file is generated. 17 #ifndef VULKAN_WRAPPER_H 18 #define VULKAN_WRAPPER_H 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 #define VK_NO_PROTOTYPES 1 25 #include <vulkan/vulkan.h> 26 27 /* Initialize the Vulkan function pointer variables declared in this header. 28 * Returns 0 if vulkan is not available, non-zero if it is available. 29 */ 30 int InitVulkan(void); 31 32 // VK_core 33 extern PFN_vkCreateInstance vkCreateInstance; 34 extern PFN_vkDestroyInstance vkDestroyInstance; 35 extern PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices; 36 extern PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures; 37 extern PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties; 38 extern PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties; 39 extern PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties; 40 extern PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties; 41 extern PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties; 42 extern PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; 43 extern PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr; 44 extern PFN_vkCreateDevice vkCreateDevice; 45 extern PFN_vkDestroyDevice vkDestroyDevice; 46 extern PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties; 47 extern PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties; 48 extern PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties; 49 extern PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties; 50 extern PFN_vkGetDeviceQueue vkGetDeviceQueue; 51 extern PFN_vkQueueSubmit vkQueueSubmit; 52 extern PFN_vkQueueWaitIdle vkQueueWaitIdle; 53 extern PFN_vkDeviceWaitIdle vkDeviceWaitIdle; 54 extern PFN_vkAllocateMemory vkAllocateMemory; 55 extern PFN_vkFreeMemory vkFreeMemory; 56 extern PFN_vkMapMemory vkMapMemory; 57 extern PFN_vkUnmapMemory vkUnmapMemory; 58 extern PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges; 59 extern PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges; 60 extern PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment; 61 extern PFN_vkBindBufferMemory vkBindBufferMemory; 62 extern PFN_vkBindImageMemory vkBindImageMemory; 63 extern PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements; 64 extern PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements; 65 extern PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements; 66 extern PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties; 67 extern PFN_vkQueueBindSparse vkQueueBindSparse; 68 extern PFN_vkCreateFence vkCreateFence; 69 extern PFN_vkDestroyFence vkDestroyFence; 70 extern PFN_vkResetFences vkResetFences; 71 extern PFN_vkGetFenceStatus vkGetFenceStatus; 72 extern PFN_vkWaitForFences vkWaitForFences; 73 extern PFN_vkCreateSemaphore vkCreateSemaphore; 74 extern PFN_vkDestroySemaphore vkDestroySemaphore; 75 extern PFN_vkCreateEvent vkCreateEvent; 76 extern PFN_vkDestroyEvent vkDestroyEvent; 77 extern PFN_vkGetEventStatus vkGetEventStatus; 78 extern PFN_vkSetEvent vkSetEvent; 79 extern PFN_vkResetEvent vkResetEvent; 80 extern PFN_vkCreateQueryPool vkCreateQueryPool; 81 extern PFN_vkDestroyQueryPool vkDestroyQueryPool; 82 extern PFN_vkGetQueryPoolResults vkGetQueryPoolResults; 83 extern PFN_vkCreateBuffer vkCreateBuffer; 84 extern PFN_vkDestroyBuffer vkDestroyBuffer; 85 extern PFN_vkCreateBufferView vkCreateBufferView; 86 extern PFN_vkDestroyBufferView vkDestroyBufferView; 87 extern PFN_vkCreateImage vkCreateImage; 88 extern PFN_vkDestroyImage vkDestroyImage; 89 extern PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout; 90 extern PFN_vkCreateImageView vkCreateImageView; 91 extern PFN_vkDestroyImageView vkDestroyImageView; 92 extern PFN_vkCreateShaderModule vkCreateShaderModule; 93 extern PFN_vkDestroyShaderModule vkDestroyShaderModule; 94 extern PFN_vkCreatePipelineCache vkCreatePipelineCache; 95 extern PFN_vkDestroyPipelineCache vkDestroyPipelineCache; 96 extern PFN_vkGetPipelineCacheData vkGetPipelineCacheData; 97 extern PFN_vkMergePipelineCaches vkMergePipelineCaches; 98 extern PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines; 99 extern PFN_vkCreateComputePipelines vkCreateComputePipelines; 100 extern PFN_vkDestroyPipeline vkDestroyPipeline; 101 extern PFN_vkCreatePipelineLayout vkCreatePipelineLayout; 102 extern PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout; 103 extern PFN_vkCreateSampler vkCreateSampler; 104 extern PFN_vkDestroySampler vkDestroySampler; 105 extern PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout; 106 extern PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout; 107 extern PFN_vkCreateDescriptorPool vkCreateDescriptorPool; 108 extern PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool; 109 extern PFN_vkResetDescriptorPool vkResetDescriptorPool; 110 extern PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets; 111 extern PFN_vkFreeDescriptorSets vkFreeDescriptorSets; 112 extern PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets; 113 extern PFN_vkCreateFramebuffer vkCreateFramebuffer; 114 extern PFN_vkDestroyFramebuffer vkDestroyFramebuffer; 115 extern PFN_vkCreateRenderPass vkCreateRenderPass; 116 extern PFN_vkDestroyRenderPass vkDestroyRenderPass; 117 extern PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity; 118 extern PFN_vkCreateCommandPool vkCreateCommandPool; 119 extern PFN_vkDestroyCommandPool vkDestroyCommandPool; 120 extern PFN_vkResetCommandPool vkResetCommandPool; 121 extern PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers; 122 extern PFN_vkFreeCommandBuffers vkFreeCommandBuffers; 123 extern PFN_vkBeginCommandBuffer vkBeginCommandBuffer; 124 extern PFN_vkEndCommandBuffer vkEndCommandBuffer; 125 extern PFN_vkResetCommandBuffer vkResetCommandBuffer; 126 extern PFN_vkCmdBindPipeline vkCmdBindPipeline; 127 extern PFN_vkCmdSetViewport vkCmdSetViewport; 128 extern PFN_vkCmdSetScissor vkCmdSetScissor; 129 extern PFN_vkCmdSetLineWidth vkCmdSetLineWidth; 130 extern PFN_vkCmdSetDepthBias vkCmdSetDepthBias; 131 extern PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants; 132 extern PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds; 133 extern PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask; 134 extern PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask; 135 extern PFN_vkCmdSetStencilReference vkCmdSetStencilReference; 136 extern PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets; 137 extern PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer; 138 extern PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers; 139 extern PFN_vkCmdDraw vkCmdDraw; 140 extern PFN_vkCmdDrawIndexed vkCmdDrawIndexed; 141 extern PFN_vkCmdDrawIndirect vkCmdDrawIndirect; 142 extern PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect; 143 extern PFN_vkCmdDispatch vkCmdDispatch; 144 extern PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect; 145 extern PFN_vkCmdCopyBuffer vkCmdCopyBuffer; 146 extern PFN_vkCmdCopyImage vkCmdCopyImage; 147 extern PFN_vkCmdBlitImage vkCmdBlitImage; 148 extern PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage; 149 extern PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer; 150 extern PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer; 151 extern PFN_vkCmdFillBuffer vkCmdFillBuffer; 152 extern PFN_vkCmdClearColorImage vkCmdClearColorImage; 153 extern PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage; 154 extern PFN_vkCmdClearAttachments vkCmdClearAttachments; 155 extern PFN_vkCmdResolveImage vkCmdResolveImage; 156 extern PFN_vkCmdSetEvent vkCmdSetEvent; 157 extern PFN_vkCmdResetEvent vkCmdResetEvent; 158 extern PFN_vkCmdWaitEvents vkCmdWaitEvents; 159 extern PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier; 160 extern PFN_vkCmdBeginQuery vkCmdBeginQuery; 161 extern PFN_vkCmdEndQuery vkCmdEndQuery; 162 extern PFN_vkCmdResetQueryPool vkCmdResetQueryPool; 163 extern PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp; 164 extern PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults; 165 extern PFN_vkCmdPushConstants vkCmdPushConstants; 166 extern PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass; 167 extern PFN_vkCmdNextSubpass vkCmdNextSubpass; 168 extern PFN_vkCmdEndRenderPass vkCmdEndRenderPass; 169 extern PFN_vkCmdExecuteCommands vkCmdExecuteCommands; 170 171 // VK_KHR_surface 172 extern PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR; 173 extern PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR; 174 extern PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR; 175 extern PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR; 176 extern PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR; 177 178 // VK_KHR_swapchain 179 extern PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR; 180 extern PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR; 181 extern PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR; 182 extern PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR; 183 extern PFN_vkQueuePresentKHR vkQueuePresentKHR; 184 185 // VK_KHR_display 186 extern PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR; 187 extern PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR; 188 extern PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR; 189 extern PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR; 190 extern PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR; 191 extern PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR; 192 extern PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR; 193 194 // VK_KHR_display_swapchain 195 extern PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR; 196 197 #ifdef VK_USE_PLATFORM_XLIB_KHR 198 // VK_KHR_xlib_surface 199 extern PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR; 200 extern PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR; 201 #endif 202 203 #ifdef VK_USE_PLATFORM_XCB_KHR 204 // VK_KHR_xcb_surface 205 extern PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; 206 extern PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR; 207 #endif 208 209 #ifdef VK_USE_PLATFORM_WAYLAND_KHR 210 // VK_KHR_wayland_surface 211 extern PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR; 212 extern PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR; 213 #endif 214 215 #ifdef VK_USE_PLATFORM_MIR_KHR 216 // VK_KHR_mir_surface 217 extern PFN_vkCreateMirSurfaceKHR vkCreateMirSurfaceKHR; 218 extern PFN_vkGetPhysicalDeviceMirPresentationSupportKHR vkGetPhysicalDeviceMirPresentationSupportKHR; 219 #endif 220 221 #ifdef VK_USE_PLATFORM_ANDROID_KHR 222 // VK_KHR_android_surface 223 extern PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR; 224 #endif 225 226 #ifdef VK_USE_PLATFORM_WIN32_KHR 227 // VK_KHR_win32_surface 228 extern PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR; 229 extern PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR; 230 #endif 231 232 // VK_KHR_sampler_mirror_clamp_to_edge 233 234 235 #ifdef __cplusplus 236 } 237 #endif 238 239 #endif // VULKAN_WRAPPER_H 240