// Copyright 2016 Google Inc. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0

// This file is generated.

#include "vulkan_wrapper.h"
#include <dlfcn.h>

/*
 * Initialize the Vulkan function pointer variables declared in this header.
 * Returns UNSUPPORTED if vulkan is not available, SUPPORTED if it is available.
 */
static VulkanWrapperStatus InitVulkan() {
    void* libvulkan = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
    if (!libvulkan) {
        return UNSUPPORTED;
    }

    auto vkGetInstanceProcAddr =
            reinterpret_cast<PFN_vkGetInstanceProcAddr>(
                    dlsym(libvulkan, "vkGetInstanceProcAddr"));

    auto vkCreateInstance =
            reinterpret_cast<PFN_vkCreateInstance>(
                    vkGetInstanceProcAddr(nullptr, "vkCreateInstance"));


//    vkGetInstanceProcAddr = reinterpret_cast<PFN_vkGetInstanceProcAddr>(dlsym(libvulkan,  "vkGetInstanceProcAddr"));
//    vkGetDeviceProcAddr = reinterpret_cast<PFN_vkGetDeviceProcAddr>(dlsym(libvulkan,  "vkGetDeviceProcAddr"));

    auto x=vkGetInstanceProcAddr(nullptr, "vkDestroyInstance");
    // Vulkan supported, set function addresses
//    vkCreateInstance = reinterpret_cast<PFN_vkCreateInstance>(vkGetInstanceProcAddr(nullptr, "vkCreateInstance"));
//    vkDestroyInstance = reinterpret_cast<PFN_vkDestroyInstance>(dlsym(libvulkan, "vkDestroyInstance"));
//    vkEnumeratePhysicalDevices = reinterpret_cast<PFN_vkEnumeratePhysicalDevices>(vkGetInstanceProcAddr(nullptr,  "vkEnumeratePhysicalDevices"));
//    vkGetPhysicalDeviceFeatures = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceFeatures"));
//    vkGetPhysicalDeviceFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceFormatProperties"));
//    vkGetPhysicalDeviceImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceImageFormatProperties"));
//    vkGetPhysicalDeviceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceProperties"));
//    vkGetPhysicalDeviceQueueFamilyProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceQueueFamilyProperties"));
//    vkGetPhysicalDeviceMemoryProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceMemoryProperties"));
//    vkGetDeviceProcAddr = reinterpret_cast<PFN_vkGetDeviceProcAddr>(vkGetInstanceProcAddr(nullptr,  "vkGetDeviceProcAddr"));
//    vkCreateDevice = reinterpret_cast<PFN_vkCreateDevice>(vkGetInstanceProcAddr(nullptr,  "vkCreateDevice"));
//    vkDestroyDevice = reinterpret_cast<PFN_vkDestroyDevice>(vkGetInstanceProcAddr(nullptr,  "vkDestroyDevice"));
//    vkEnumerateInstanceExtensionProperties = reinterpret_cast<PFN_vkEnumerateInstanceExtensionProperties>(vkGetInstanceProcAddr(nullptr,  "vkEnumerateInstanceExtensionProperties"));
//    vkEnumerateDeviceExtensionProperties = reinterpret_cast<PFN_vkEnumerateDeviceExtensionProperties>(vkGetInstanceProcAddr(nullptr,  "vkEnumerateDeviceExtensionProperties"));
//    vkEnumerateInstanceLayerProperties = reinterpret_cast<PFN_vkEnumerateInstanceLayerProperties>(vkGetInstanceProcAddr(nullptr,  "vkEnumerateInstanceLayerProperties"));
//    vkEnumerateDeviceLayerProperties = reinterpret_cast<PFN_vkEnumerateDeviceLayerProperties>(vkGetInstanceProcAddr(nullptr,  "vkEnumerateDeviceLayerProperties"));
//    vkGetDeviceQueue = reinterpret_cast<PFN_vkGetDeviceQueue>(vkGetInstanceProcAddr(nullptr,  "vkGetDeviceQueue"));
//    vkQueueSubmit = reinterpret_cast<PFN_vkQueueSubmit>(vkGetInstanceProcAddr(nullptr,  "vkQueueSubmit"));
//    vkQueueWaitIdle = reinterpret_cast<PFN_vkQueueWaitIdle>(vkGetInstanceProcAddr(nullptr,  "vkQueueWaitIdle"));
//    vkDeviceWaitIdle = reinterpret_cast<PFN_vkDeviceWaitIdle>(vkGetInstanceProcAddr(nullptr,  "vkDeviceWaitIdle"));
//    vkAllocateMemory = reinterpret_cast<PFN_vkAllocateMemory>(vkGetInstanceProcAddr(nullptr,  "vkAllocateMemory"));
//    vkFreeMemory = reinterpret_cast<PFN_vkFreeMemory>(vkGetInstanceProcAddr(nullptr,  "vkFreeMemory"));
//    vkMapMemory = reinterpret_cast<PFN_vkMapMemory>(vkGetInstanceProcAddr(nullptr,  "vkMapMemory"));
//    vkUnmapMemory = reinterpret_cast<PFN_vkUnmapMemory>(vkGetInstanceProcAddr(nullptr,  "vkUnmapMemory"));
//    vkFlushMappedMemoryRanges = reinterpret_cast<PFN_vkFlushMappedMemoryRanges>(vkGetInstanceProcAddr(nullptr,  "vkFlushMappedMemoryRanges"));
//    vkInvalidateMappedMemoryRanges = reinterpret_cast<PFN_vkInvalidateMappedMemoryRanges>(vkGetInstanceProcAddr(nullptr,  "vkInvalidateMappedMemoryRanges"));
//    vkGetDeviceMemoryCommitment = reinterpret_cast<PFN_vkGetDeviceMemoryCommitment>(vkGetInstanceProcAddr(nullptr,  "vkGetDeviceMemoryCommitment"));
//    vkBindBufferMemory = reinterpret_cast<PFN_vkBindBufferMemory>(vkGetInstanceProcAddr(nullptr,  "vkBindBufferMemory"));
//    vkBindImageMemory = reinterpret_cast<PFN_vkBindImageMemory>(vkGetInstanceProcAddr(nullptr,  "vkBindImageMemory"));
//    vkGetBufferMemoryRequirements = reinterpret_cast<PFN_vkGetBufferMemoryRequirements>(vkGetInstanceProcAddr(nullptr,  "vkGetBufferMemoryRequirements"));
//    vkGetImageMemoryRequirements = reinterpret_cast<PFN_vkGetImageMemoryRequirements>(vkGetInstanceProcAddr(nullptr,  "vkGetImageMemoryRequirements"));
//    vkGetImageSparseMemoryRequirements = reinterpret_cast<PFN_vkGetImageSparseMemoryRequirements>(vkGetInstanceProcAddr(nullptr,  "vkGetImageSparseMemoryRequirements"));
//    vkGetPhysicalDeviceSparseImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceSparseImageFormatProperties"));
//    vkQueueBindSparse = reinterpret_cast<PFN_vkQueueBindSparse>(vkGetInstanceProcAddr(nullptr,  "vkQueueBindSparse"));
//    vkCreateFence = reinterpret_cast<PFN_vkCreateFence>(vkGetInstanceProcAddr(nullptr,  "vkCreateFence"));
//    vkDestroyFence = reinterpret_cast<PFN_vkDestroyFence>(vkGetInstanceProcAddr(nullptr,  "vkDestroyFence"));
//    vkResetFences = reinterpret_cast<PFN_vkResetFences>(vkGetInstanceProcAddr(nullptr,  "vkResetFences"));
//    vkGetFenceStatus = reinterpret_cast<PFN_vkGetFenceStatus>(vkGetInstanceProcAddr(nullptr,  "vkGetFenceStatus"));
//    vkWaitForFences = reinterpret_cast<PFN_vkWaitForFences>(vkGetInstanceProcAddr(nullptr,  "vkWaitForFences"));
//    vkCreateSemaphore = reinterpret_cast<PFN_vkCreateSemaphore>(vkGetInstanceProcAddr(nullptr,  "vkCreateSemaphore"));
//    vkDestroySemaphore = reinterpret_cast<PFN_vkDestroySemaphore>(vkGetInstanceProcAddr(nullptr,  "vkDestroySemaphore"));
//    vkCreateEvent = reinterpret_cast<PFN_vkCreateEvent>(vkGetInstanceProcAddr(nullptr,  "vkCreateEvent"));
//    vkDestroyEvent = reinterpret_cast<PFN_vkDestroyEvent>(vkGetInstanceProcAddr(nullptr,  "vkDestroyEvent"));
//    vkGetEventStatus = reinterpret_cast<PFN_vkGetEventStatus>(vkGetInstanceProcAddr(nullptr,  "vkGetEventStatus"));
//    vkSetEvent = reinterpret_cast<PFN_vkSetEvent>(vkGetInstanceProcAddr(nullptr,  "vkSetEvent"));
//    vkResetEvent = reinterpret_cast<PFN_vkResetEvent>(vkGetInstanceProcAddr(nullptr,  "vkResetEvent"));
//    vkCreateQueryPool = reinterpret_cast<PFN_vkCreateQueryPool>(vkGetInstanceProcAddr(nullptr,  "vkCreateQueryPool"));
//    vkDestroyQueryPool = reinterpret_cast<PFN_vkDestroyQueryPool>(vkGetInstanceProcAddr(nullptr,  "vkDestroyQueryPool"));
//    vkGetQueryPoolResults = reinterpret_cast<PFN_vkGetQueryPoolResults>(vkGetInstanceProcAddr(nullptr,  "vkGetQueryPoolResults"));
//    vkCreateBuffer = reinterpret_cast<PFN_vkCreateBuffer>(vkGetInstanceProcAddr(nullptr,  "vkCreateBuffer"));
//    vkDestroyBuffer = reinterpret_cast<PFN_vkDestroyBuffer>(vkGetInstanceProcAddr(nullptr,  "vkDestroyBuffer"));
//    vkCreateBufferView = reinterpret_cast<PFN_vkCreateBufferView>(vkGetInstanceProcAddr(nullptr,  "vkCreateBufferView"));
//    vkDestroyBufferView = reinterpret_cast<PFN_vkDestroyBufferView>(vkGetInstanceProcAddr(nullptr,  "vkDestroyBufferView"));
//    vkCreateImage = reinterpret_cast<PFN_vkCreateImage>(vkGetInstanceProcAddr(nullptr,  "vkCreateImage"));
//    vkDestroyImage = reinterpret_cast<PFN_vkDestroyImage>(vkGetInstanceProcAddr(nullptr,  "vkDestroyImage"));
//    vkGetImageSubresourceLayout = reinterpret_cast<PFN_vkGetImageSubresourceLayout>(vkGetInstanceProcAddr(nullptr,  "vkGetImageSubresourceLayout"));
//    vkCreateImageView = reinterpret_cast<PFN_vkCreateImageView>(vkGetInstanceProcAddr(nullptr,  "vkCreateImageView"));
//    vkDestroyImageView = reinterpret_cast<PFN_vkDestroyImageView>(vkGetInstanceProcAddr(nullptr,  "vkDestroyImageView"));
//    vkCreateShaderModule = reinterpret_cast<PFN_vkCreateShaderModule>(vkGetInstanceProcAddr(nullptr,  "vkCreateShaderModule"));
//    vkDestroyShaderModule = reinterpret_cast<PFN_vkDestroyShaderModule>(vkGetInstanceProcAddr(nullptr,  "vkDestroyShaderModule"));
//    vkCreatePipelineCache = reinterpret_cast<PFN_vkCreatePipelineCache>(vkGetInstanceProcAddr(nullptr,  "vkCreatePipelineCache"));
//    vkDestroyPipelineCache = reinterpret_cast<PFN_vkDestroyPipelineCache>(vkGetInstanceProcAddr(nullptr,  "vkDestroyPipelineCache"));
//    vkGetPipelineCacheData = reinterpret_cast<PFN_vkGetPipelineCacheData>(vkGetInstanceProcAddr(nullptr,  "vkGetPipelineCacheData"));
//    vkMergePipelineCaches = reinterpret_cast<PFN_vkMergePipelineCaches>(vkGetInstanceProcAddr(nullptr,  "vkMergePipelineCaches"));
//    vkCreateGraphicsPipelines = reinterpret_cast<PFN_vkCreateGraphicsPipelines>(vkGetInstanceProcAddr(nullptr,  "vkCreateGraphicsPipelines"));
//    vkCreateComputePipelines = reinterpret_cast<PFN_vkCreateComputePipelines>(vkGetInstanceProcAddr(nullptr,  "vkCreateComputePipelines"));
//    vkDestroyPipeline = reinterpret_cast<PFN_vkDestroyPipeline>(vkGetInstanceProcAddr(nullptr,  "vkDestroyPipeline"));
//    vkCreatePipelineLayout = reinterpret_cast<PFN_vkCreatePipelineLayout>(vkGetInstanceProcAddr(nullptr,  "vkCreatePipelineLayout"));
//    vkDestroyPipelineLayout = reinterpret_cast<PFN_vkDestroyPipelineLayout>(vkGetInstanceProcAddr(nullptr,  "vkDestroyPipelineLayout"));
//    vkCreateSampler = reinterpret_cast<PFN_vkCreateSampler>(vkGetInstanceProcAddr(nullptr,  "vkCreateSampler"));
//    vkDestroySampler = reinterpret_cast<PFN_vkDestroySampler>(vkGetInstanceProcAddr(nullptr,  "vkDestroySampler"));
//    vkCreateDescriptorSetLayout = reinterpret_cast<PFN_vkCreateDescriptorSetLayout>(vkGetInstanceProcAddr(nullptr,  "vkCreateDescriptorSetLayout"));
//    vkDestroyDescriptorSetLayout = reinterpret_cast<PFN_vkDestroyDescriptorSetLayout>(vkGetInstanceProcAddr(nullptr,  "vkDestroyDescriptorSetLayout"));
//    vkCreateDescriptorPool = reinterpret_cast<PFN_vkCreateDescriptorPool>(vkGetInstanceProcAddr(nullptr,  "vkCreateDescriptorPool"));
//    vkDestroyDescriptorPool = reinterpret_cast<PFN_vkDestroyDescriptorPool>(vkGetInstanceProcAddr(nullptr,  "vkDestroyDescriptorPool"));
//    vkResetDescriptorPool = reinterpret_cast<PFN_vkResetDescriptorPool>(vkGetInstanceProcAddr(nullptr,  "vkResetDescriptorPool"));
//    vkAllocateDescriptorSets = reinterpret_cast<PFN_vkAllocateDescriptorSets>(vkGetInstanceProcAddr(nullptr,  "vkAllocateDescriptorSets"));
//    vkFreeDescriptorSets = reinterpret_cast<PFN_vkFreeDescriptorSets>(vkGetInstanceProcAddr(nullptr,  "vkFreeDescriptorSets"));
//    vkUpdateDescriptorSets = reinterpret_cast<PFN_vkUpdateDescriptorSets>(vkGetInstanceProcAddr(nullptr,  "vkUpdateDescriptorSets"));
//    vkCreateFramebuffer = reinterpret_cast<PFN_vkCreateFramebuffer>(vkGetInstanceProcAddr(nullptr,  "vkCreateFramebuffer"));
//    vkDestroyFramebuffer = reinterpret_cast<PFN_vkDestroyFramebuffer>(vkGetInstanceProcAddr(nullptr,  "vkDestroyFramebuffer"));
//    vkCreateRenderPass = reinterpret_cast<PFN_vkCreateRenderPass>(vkGetInstanceProcAddr(nullptr,  "vkCreateRenderPass"));
//    vkDestroyRenderPass = reinterpret_cast<PFN_vkDestroyRenderPass>(vkGetInstanceProcAddr(nullptr,  "vkDestroyRenderPass"));
//    vkGetRenderAreaGranularity = reinterpret_cast<PFN_vkGetRenderAreaGranularity>(vkGetInstanceProcAddr(nullptr,  "vkGetRenderAreaGranularity"));
//    vkCreateCommandPool = reinterpret_cast<PFN_vkCreateCommandPool>(vkGetInstanceProcAddr(nullptr,  "vkCreateCommandPool"));
//    vkDestroyCommandPool = reinterpret_cast<PFN_vkDestroyCommandPool>(vkGetInstanceProcAddr(nullptr,  "vkDestroyCommandPool"));
//    vkResetCommandPool = reinterpret_cast<PFN_vkResetCommandPool>(vkGetInstanceProcAddr(nullptr,  "vkResetCommandPool"));
//    vkAllocateCommandBuffers = reinterpret_cast<PFN_vkAllocateCommandBuffers>(vkGetInstanceProcAddr(nullptr,  "vkAllocateCommandBuffers"));
//    vkFreeCommandBuffers = reinterpret_cast<PFN_vkFreeCommandBuffers>(vkGetInstanceProcAddr(nullptr,  "vkFreeCommandBuffers"));
//    vkBeginCommandBuffer = reinterpret_cast<PFN_vkBeginCommandBuffer>(vkGetInstanceProcAddr(nullptr,  "vkBeginCommandBuffer"));
//    vkEndCommandBuffer = reinterpret_cast<PFN_vkEndCommandBuffer>(vkGetInstanceProcAddr(nullptr,  "vkEndCommandBuffer"));
//    vkResetCommandBuffer = reinterpret_cast<PFN_vkResetCommandBuffer>(vkGetInstanceProcAddr(nullptr,  "vkResetCommandBuffer"));
//    vkCmdBindPipeline = reinterpret_cast<PFN_vkCmdBindPipeline>(vkGetInstanceProcAddr(nullptr,  "vkCmdBindPipeline"));
//    vkCmdSetViewport = reinterpret_cast<PFN_vkCmdSetViewport>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetViewport"));
//    vkCmdSetScissor = reinterpret_cast<PFN_vkCmdSetScissor>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetScissor"));
//    vkCmdSetLineWidth = reinterpret_cast<PFN_vkCmdSetLineWidth>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetLineWidth"));
//    vkCmdSetDepthBias = reinterpret_cast<PFN_vkCmdSetDepthBias>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetDepthBias"));
//    vkCmdSetBlendConstants = reinterpret_cast<PFN_vkCmdSetBlendConstants>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetBlendConstants"));
//    vkCmdSetDepthBounds = reinterpret_cast<PFN_vkCmdSetDepthBounds>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetDepthBounds"));
//    vkCmdSetStencilCompareMask = reinterpret_cast<PFN_vkCmdSetStencilCompareMask>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetStencilCompareMask"));
//    vkCmdSetStencilWriteMask = reinterpret_cast<PFN_vkCmdSetStencilWriteMask>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetStencilWriteMask"));
//    vkCmdSetStencilReference = reinterpret_cast<PFN_vkCmdSetStencilReference>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetStencilReference"));
//    vkCmdBindDescriptorSets = reinterpret_cast<PFN_vkCmdBindDescriptorSets>(vkGetInstanceProcAddr(nullptr,  "vkCmdBindDescriptorSets"));
//    vkCmdBindIndexBuffer = reinterpret_cast<PFN_vkCmdBindIndexBuffer>(vkGetInstanceProcAddr(nullptr,  "vkCmdBindIndexBuffer"));
//    vkCmdBindVertexBuffers = reinterpret_cast<PFN_vkCmdBindVertexBuffers>(vkGetInstanceProcAddr(nullptr,  "vkCmdBindVertexBuffers"));
//    vkCmdDraw = reinterpret_cast<PFN_vkCmdDraw>(vkGetInstanceProcAddr(nullptr,  "vkCmdDraw"));
//    vkCmdDrawIndexed = reinterpret_cast<PFN_vkCmdDrawIndexed>(vkGetInstanceProcAddr(nullptr,  "vkCmdDrawIndexed"));
//    vkCmdDrawIndirect = reinterpret_cast<PFN_vkCmdDrawIndirect>(vkGetInstanceProcAddr(nullptr,  "vkCmdDrawIndirect"));
//    vkCmdDrawIndexedIndirect = reinterpret_cast<PFN_vkCmdDrawIndexedIndirect>(vkGetInstanceProcAddr(nullptr,  "vkCmdDrawIndexedIndirect"));
//    vkCmdDispatch = reinterpret_cast<PFN_vkCmdDispatch>(vkGetInstanceProcAddr(nullptr,  "vkCmdDispatch"));
//    vkCmdDispatchIndirect = reinterpret_cast<PFN_vkCmdDispatchIndirect>(vkGetInstanceProcAddr(nullptr,  "vkCmdDispatchIndirect"));
//    vkCmdCopyBuffer = reinterpret_cast<PFN_vkCmdCopyBuffer>(vkGetInstanceProcAddr(nullptr,  "vkCmdCopyBuffer"));
//    vkCmdCopyImage = reinterpret_cast<PFN_vkCmdCopyImage>(vkGetInstanceProcAddr(nullptr,  "vkCmdCopyImage"));
//    vkCmdBlitImage = reinterpret_cast<PFN_vkCmdBlitImage>(vkGetInstanceProcAddr(nullptr,  "vkCmdBlitImage"));
//    vkCmdCopyBufferToImage = reinterpret_cast<PFN_vkCmdCopyBufferToImage>(vkGetInstanceProcAddr(nullptr,  "vkCmdCopyBufferToImage"));
//    vkCmdCopyImageToBuffer = reinterpret_cast<PFN_vkCmdCopyImageToBuffer>(vkGetInstanceProcAddr(nullptr,  "vkCmdCopyImageToBuffer"));
//    vkCmdUpdateBuffer = reinterpret_cast<PFN_vkCmdUpdateBuffer>(vkGetInstanceProcAddr(nullptr,  "vkCmdUpdateBuffer"));
//    vkCmdFillBuffer = reinterpret_cast<PFN_vkCmdFillBuffer>(vkGetInstanceProcAddr(nullptr,  "vkCmdFillBuffer"));
//    vkCmdClearColorImage = reinterpret_cast<PFN_vkCmdClearColorImage>(vkGetInstanceProcAddr(nullptr,  "vkCmdClearColorImage"));
//    vkCmdClearDepthStencilImage = reinterpret_cast<PFN_vkCmdClearDepthStencilImage>(vkGetInstanceProcAddr(nullptr,  "vkCmdClearDepthStencilImage"));
//    vkCmdClearAttachments = reinterpret_cast<PFN_vkCmdClearAttachments>(vkGetInstanceProcAddr(nullptr,  "vkCmdClearAttachments"));
//    vkCmdResolveImage = reinterpret_cast<PFN_vkCmdResolveImage>(vkGetInstanceProcAddr(nullptr,  "vkCmdResolveImage"));
//    vkCmdSetEvent = reinterpret_cast<PFN_vkCmdSetEvent>(vkGetInstanceProcAddr(nullptr,  "vkCmdSetEvent"));
//    vkCmdResetEvent = reinterpret_cast<PFN_vkCmdResetEvent>(vkGetInstanceProcAddr(nullptr,  "vkCmdResetEvent"));
//    vkCmdWaitEvents = reinterpret_cast<PFN_vkCmdWaitEvents>(vkGetInstanceProcAddr(nullptr,  "vkCmdWaitEvents"));
//    vkCmdPipelineBarrier = reinterpret_cast<PFN_vkCmdPipelineBarrier>(vkGetInstanceProcAddr(nullptr,  "vkCmdPipelineBarrier"));
//    vkCmdBeginQuery = reinterpret_cast<PFN_vkCmdBeginQuery>(vkGetInstanceProcAddr(nullptr,  "vkCmdBeginQuery"));
//    vkCmdEndQuery = reinterpret_cast<PFN_vkCmdEndQuery>(vkGetInstanceProcAddr(nullptr,  "vkCmdEndQuery"));
//    vkCmdResetQueryPool = reinterpret_cast<PFN_vkCmdResetQueryPool>(vkGetInstanceProcAddr(nullptr,  "vkCmdResetQueryPool"));
//    vkCmdWriteTimestamp = reinterpret_cast<PFN_vkCmdWriteTimestamp>(vkGetInstanceProcAddr(nullptr,  "vkCmdWriteTimestamp"));
//    vkCmdCopyQueryPoolResults = reinterpret_cast<PFN_vkCmdCopyQueryPoolResults>(vkGetInstanceProcAddr(nullptr,  "vkCmdCopyQueryPoolResults"));
//    vkCmdPushConstants = reinterpret_cast<PFN_vkCmdPushConstants>(vkGetInstanceProcAddr(nullptr,  "vkCmdPushConstants"));
//    vkCmdBeginRenderPass = reinterpret_cast<PFN_vkCmdBeginRenderPass>(vkGetInstanceProcAddr(nullptr,  "vkCmdBeginRenderPass"));
//    vkCmdNextSubpass = reinterpret_cast<PFN_vkCmdNextSubpass>(vkGetInstanceProcAddr(nullptr,  "vkCmdNextSubpass"));
//    vkCmdEndRenderPass = reinterpret_cast<PFN_vkCmdEndRenderPass>(vkGetInstanceProcAddr(nullptr,  "vkCmdEndRenderPass"));
//    vkCmdExecuteCommands = reinterpret_cast<PFN_vkCmdExecuteCommands>(vkGetInstanceProcAddr(nullptr,  "vkCmdExecuteCommands"));
//    vkDestroySurfaceKHR = reinterpret_cast<PFN_vkDestroySurfaceKHR>(vkGetInstanceProcAddr(nullptr,  "vkDestroySurfaceKHR"));
//    vkGetPhysicalDeviceSurfaceSupportKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceSupportKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceSurfaceSupportKHR"));
//    vkGetPhysicalDeviceSurfaceCapabilitiesKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"));
//    vkGetPhysicalDeviceSurfaceFormatsKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormatsKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceSurfaceFormatsKHR"));
//    vkGetPhysicalDeviceSurfacePresentModesKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfacePresentModesKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceSurfacePresentModesKHR"));
//    vkCreateSwapchainKHR = reinterpret_cast<PFN_vkCreateSwapchainKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateSwapchainKHR"));
//    vkDestroySwapchainKHR = reinterpret_cast<PFN_vkDestroySwapchainKHR>(vkGetInstanceProcAddr(nullptr,  "vkDestroySwapchainKHR"));
//    vkGetSwapchainImagesKHR = reinterpret_cast<PFN_vkGetSwapchainImagesKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetSwapchainImagesKHR"));
//    vkAcquireNextImageKHR = reinterpret_cast<PFN_vkAcquireNextImageKHR>(vkGetInstanceProcAddr(nullptr,  "vkAcquireNextImageKHR"));
//    vkQueuePresentKHR = reinterpret_cast<PFN_vkQueuePresentKHR>(vkGetInstanceProcAddr(nullptr,  "vkQueuePresentKHR"));
    // vkGetPhysicalDeviceDisplayPropertiesKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPropertiesKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceDisplayPropertiesKHR"));
    // vkGetPhysicalDeviceDisplayPlanePropertiesKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"));
    // vkGetDisplayPlaneSupportedDisplaysKHR = reinterpret_cast<PFN_vkGetDisplayPlaneSupportedDisplaysKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetDisplayPlaneSupportedDisplaysKHR"));
    // vkGetDisplayModePropertiesKHR = reinterpret_cast<PFN_vkGetDisplayModePropertiesKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetDisplayModePropertiesKHR"));
    // vkCreateDisplayModeKHR = reinterpret_cast<PFN_vkCreateDisplayModeKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateDisplayModeKHR"));
    // vkGetDisplayPlaneCapabilitiesKHR = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetDisplayPlaneCapabilitiesKHR"));
    // vkCreateDisplayPlaneSurfaceKHR = reinterpret_cast<PFN_vkCreateDisplayPlaneSurfaceKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateDisplayPlaneSurfaceKHR"));
    // vkCreateSharedSwapchainsKHR = reinterpret_cast<PFN_vkCreateSharedSwapchainsKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateSharedSwapchainsKHR"));

#ifdef VK_USE_PLATFORM_XLIB_KHR
    // vkCreateXlibSurfaceKHR = reinterpret_cast<PFN_vkCreateXlibSurfaceKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateXlibSurfaceKHR"));
    // vkGetPhysicalDeviceXlibPresentationSupportKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceXlibPresentationSupportKHR"));
#endif

#ifdef VK_USE_PLATFORM_XCB_KHR
    // vkCreateXcbSurfaceKHR = reinterpret_cast<PFN_vkCreateXcbSurfaceKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateXcbSurfaceKHR"));
    // vkGetPhysicalDeviceXcbPresentationSupportKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceXcbPresentationSupportKHR"));
#endif

#ifdef VK_USE_PLATFORM_WAYLAND_KHR
    // vkCreateWaylandSurfaceKHR = reinterpret_cast<PFN_vkCreateWaylandSurfaceKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateWaylandSurfaceKHR"));
    // vkGetPhysicalDeviceWaylandPresentationSupportKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceWaylandPresentationSupportKHR"));
#endif

#ifdef VK_USE_PLATFORM_MIR_KHR
    // vkCreateMirSurfaceKHR = reinterpret_cast<PFN_vkCreateMirSurfaceKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateMirSurfaceKHR"));
    // vkGetPhysicalDeviceMirPresentationSupportKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceMirPresentationSupportKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceMirPresentationSupportKHR"));
#endif

#ifdef VK_USE_PLATFORM_ANDROID_KHR
    // vkCreateAndroidSurfaceKHR = reinterpret_cast<PFN_vkCreateAndroidSurfaceKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateAndroidSurfaceKHR"));
#endif

#ifdef VK_USE_PLATFORM_WIN32_KHR
    // vkCreateWin32SurfaceKHR = reinterpret_cast<PFN_vkCreateWin32SurfaceKHR>(vkGetInstanceProcAddr(nullptr,  "vkCreateWin32SurfaceKHR"));
    // vkGetPhysicalDeviceWin32PresentationSupportKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR>(vkGetInstanceProcAddr(nullptr,  "vkGetPhysicalDeviceWin32PresentationSupportKHR"));
#endif
#ifdef USE_DEBUG_EXTENTIONS
    vkCreateDebugReportCallbackEXT = reinterpret_cast<PFN_vkCreateDebugReportCallbackEXT>(vkGetInstanceProcAddr(nullptr,  "vkCreateDebugReportCallbackEXT"));
    vkDestroyDebugReportCallbackEXT = reinterpret_cast<PFN_vkDestroyDebugReportCallbackEXT>(vkGetInstanceProcAddr(nullptr,  "vkDestroyDebugReportCallbackEXT"));
    vkDebugReportMessageEXT = reinterpret_cast<PFN_vkDebugReportMessageEXT>(vkGetInstanceProcAddr(nullptr,  "vkDebugReportMessageEXT"));
#endif
    return SUPPORTED;
}

bool IsVulkanSupported() {
    return InitVulkan() == SUPPORTED;
}
