5#ifndef FLUTTER_VULKAN_PROCS_VULKAN_PROC_TABLE_H_
6#define FLUTTER_VULKAN_PROCS_VULKAN_PROC_TABLE_H_
8#include "flutter/fml/macros.h"
9#include "flutter/fml/memory/ref_counted.h"
10#include "flutter/fml/memory/ref_ptr.h"
11#include "flutter/fml/native_library.h"
12#include "flutter/vulkan/procs/vulkan_handle.h"
13#include "flutter/vulkan/procs/vulkan_interface.h"
27 explicit Proc(
T proc =
nullptr) : proc_(proc) {}
37 proc_ =
reinterpret_cast<Proto>(proc);
41 explicit operator bool()
const {
return proc_ !=
nullptr; }
43 operator T()
const {
return proc_; }
68#define DEFINE_PROC(name) Proc<PFN_vk##name> name;
135#ifndef TEST_VULKAN_PROCS
137 DEFINE_PROC(GetPhysicalDeviceSurfaceCapabilitiesKHR);
139 DEFINE_PROC(GetPhysicalDeviceSurfacePresentModesKHR);
151 DEFINE_PROC(SetBufferCollectionImageConstraintsFUCHSIA);
161 const char* proc_name,
169 bool acquired_mandatory_proc_addresses_;
173 bool OpenLibraryHandle(
const char*
path);
174 bool SetupGetInstanceProcAddress();
175 bool SetupLoaderProcAddresses();
176 bool CloseLibraryHandle();
Proc operator=(PFN_vkVoidFunction proc)
DEFINE_PROC(WaitForFences)
DEFINE_PROC(FreeCommandBuffers)
DEFINE_PROC(CreateDebugReportCallbackEXT)
DEFINE_PROC(GetImageMemoryRequirements)
DEFINE_PROC(CmdPipelineBarrier)
DEFINE_PROC(BindBufferMemory2KHR)
DEFINE_PROC(CreateSwapchainKHR)
DEFINE_PROC(GetDeviceQueue)
DEFINE_PROC(GetImageMemoryRequirements2KHR)
DEFINE_PROC(GetDeviceProcAddr)
DEFINE_PROC(CreateBuffer)
DEFINE_PROC(DeviceWaitIdle)
DEFINE_PROC(BindImageMemory2)
DEFINE_PROC(GetPhysicalDeviceFeatures)
DEFINE_PROC(DestroySwapchainKHR)
DEFINE_PROC(EnumerateDeviceLayerProperties)
DEFINE_PROC(EnumerateInstanceLayerProperties)
DEFINE_PROC(DestroyInstance)
DEFINE_PROC(GetBufferMemoryRequirements2KHR)
bool SetupInstanceProcAddresses(const VulkanHandle< VkInstance > &instance)
DEFINE_PROC(EndCommandBuffer)
DEFINE_PROC(EnumerateInstanceExtensionProperties)
DEFINE_PROC(QueueWaitIdle)
DEFINE_PROC(GetPhysicalDeviceProperties)
DEFINE_PROC(CreateSemaphore)
DEFINE_PROC(CreateCommandPool)
DEFINE_PROC(DestroyDevice)
DEFINE_PROC(DestroyFence)
DEFINE_PROC(CreateInstance)
bool AreDeviceProcsSetup() const
PFN_vkVoidFunction AcquireProc(const char *proc_name, const VulkanHandle< VkInstance > &instance) const
DEFINE_PROC(GetPhysicalDeviceQueueFamilyProperties)
PFN_vkGetInstanceProcAddr NativeGetInstanceProcAddr() const
DEFINE_PROC(GetPhysicalDeviceMemoryProperties2)
DEFINE_PROC(GetImageMemoryRequirements2)
DEFINE_PROC(CreateDevice)
DEFINE_PROC(DestroySemaphore)
DEFINE_PROC(FlushMappedMemoryRanges)
DEFINE_PROC(AcquireNextImageKHR)
bool HasAcquiredMandatoryProcAddresses() const
DEFINE_PROC(DestroyBuffer)
DEFINE_PROC(AllocateCommandBuffers)
DEFINE_PROC(BindImageMemory2KHR)
DEFINE_PROC(GetPhysicalDeviceMemoryProperties2KHR)
DEFINE_PROC(ResetCommandBuffer)
DEFINE_PROC(CmdCopyBuffer)
DEFINE_PROC(EnumeratePhysicalDevices)
DEFINE_PROC(AllocateMemory)
DEFINE_PROC(BindBufferMemory2)
PFN_vkGetInstanceProcAddr GetInstanceProcAddr
DEFINE_PROC(BindImageMemory)
bool AreInstanceProcsSetup() const
DEFINE_PROC(DestroySurfaceKHR)
DEFINE_PROC(GetPhysicalDeviceMemoryProperties)
DEFINE_PROC(DestroyImage)
DEFINE_PROC(DestroyDebugReportCallbackEXT)
DEFINE_PROC(GetBufferMemoryRequirements)
DEFINE_PROC(BindBufferMemory)
DEFINE_PROC(DestroyCommandPool)
DEFINE_PROC(GetBufferMemoryRequirements2)
bool SetupDeviceProcAddresses(const VulkanHandle< VkDevice > &device)
DEFINE_PROC(BeginCommandBuffer)
DEFINE_PROC(InvalidateMappedMemoryRanges)
decltype(vkGetInstanceProcAddr) * get_instance_proc_addr
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
void(VKAPI_PTR * PFN_vkVoidFunction)(void)
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetInstanceProcAddr)(VkInstance instance, const char *pName)