#ifndef GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_
#define GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_
#include <vulkan/vulkan.h>
#include <memory>
#include "base/compiler_specific.h"
#include "base/component_export.h"
#include "base/containers/flat_map.h"
#include "base/native_library.h"
#include "base/synchronization/lock.h"
#include "build/build_config.h"
#include "ui/gfx/extension_set.h"
#if BUILDFLAG(IS_ANDROID)
#include <vulkan/vulkan_android.h>
#endif
#if BUILDFLAG(IS_FUCHSIA)
#include <zircon/types.h>
#include <vulkan/vulkan_fuchsia.h>
#include "gpu/vulkan/fuchsia/vulkan_fuchsia_ext.h"
#endif
#if defined(USE_VULKAN_XCB)
#include <xcb/xcb.h>
#include <vulkan/vulkan_xcb.h>
#endif
#if BUILDFLAG(IS_WIN)
#include <vulkan/vulkan_win32.h>
#endif
gpu
ALWAYS_INLINE PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance instance,
const char* pName) { … }
ALWAYS_INLINE VkResult vkEnumerateInstanceVersion(uint32_t* pApiVersion) { … }
ALWAYS_INLINE VkResult vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkInstance* pInstance) { … }
ALWAYS_INLINE VkResult
vkEnumerateInstanceExtensionProperties(const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties) { … }
ALWAYS_INLINE VkResult
vkEnumerateInstanceLayerProperties(uint32_t* pPropertyCount,
VkLayerProperties* pProperties) { … }
ALWAYS_INLINE VkResult vkCreateDevice(VkPhysicalDevice physicalDevice,
const VkDeviceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDevice* pDevice) { … }
ALWAYS_INLINE void vkDestroyInstance(VkInstance instance,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE VkResult
vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties) { … }
ALWAYS_INLINE VkResult
vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
VkLayerProperties* pProperties) { … }
ALWAYS_INLINE VkResult
vkEnumeratePhysicalDevices(VkInstance instance,
uint32_t* pPhysicalDeviceCount,
VkPhysicalDevice* pPhysicalDevices) { … }
ALWAYS_INLINE PFN_vkVoidFunction vkGetDeviceProcAddr(VkDevice device,
const char* pName) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceExternalSemaphoreProperties(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceFeatures2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures2* pFeatures) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkFormatProperties* pFormatProperties) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceFormatProperties2(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkFormatProperties2* pFormatProperties) { … }
ALWAYS_INLINE VkResult vkGetPhysicalDeviceImageFormatProperties2(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
VkImageFormatProperties2* pImageFormatProperties) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceMemoryProperties(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties* pMemoryProperties) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceMemoryProperties2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceProperties(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties* pProperties) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceProperties2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties2* pProperties) { … }
ALWAYS_INLINE void vkGetPhysicalDeviceQueueFamilyProperties(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
VkQueueFamilyProperties* pQueueFamilyProperties) { … }
#if DCHECK_IS_ON()
ALWAYS_INLINE VkResult vkCreateDebugReportCallbackEXT(
VkInstance instance,
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDebugReportCallbackEXT* pCallback) { … }
ALWAYS_INLINE void vkDestroyDebugReportCallbackEXT(
VkInstance instance,
VkDebugReportCallbackEXT callback,
const VkAllocationCallbacks* pAllocator) { … }
#endif
ALWAYS_INLINE void vkDestroySurfaceKHR(
VkInstance instance,
VkSurfaceKHR surface,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { … }
ALWAYS_INLINE VkResult
vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
uint32_t* pSurfaceFormatCount,
VkSurfaceFormatKHR* pSurfaceFormats) { … }
ALWAYS_INLINE VkResult
vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
VkSurfaceKHR surface,
VkBool32* pSupported) { … }
ALWAYS_INLINE VkResult
vkCreateHeadlessSurfaceEXT(VkInstance instance,
const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface) { … }
#if defined(USE_VULKAN_XCB)
ALWAYS_INLINE VkResult
vkCreateXcbSurfaceKHR(VkInstance instance,
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface) { … }
ALWAYS_INLINE VkBool32
vkGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
xcb_connection_t* connection,
xcb_visualid_t visual_id) { … }
#endif
#if BUILDFLAG(IS_WIN)
ALWAYS_INLINE VkResult
vkCreateWin32SurfaceKHR(VkInstance instance,
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface) {
return gpu::GetVulkanFunctionPointers()->vkCreateWin32SurfaceKHR(
instance, pCreateInfo, pAllocator, pSurface);
}
ALWAYS_INLINE VkBool32
vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex) {
return gpu::GetVulkanFunctionPointers()
->vkGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice,
queueFamilyIndex);
}
#endif
#if BUILDFLAG(IS_ANDROID)
ALWAYS_INLINE VkResult
vkCreateAndroidSurfaceKHR(VkInstance instance,
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface) {
return gpu::GetVulkanFunctionPointers()->vkCreateAndroidSurfaceKHR(
instance, pCreateInfo, pAllocator, pSurface);
}
#endif
#if BUILDFLAG(IS_FUCHSIA)
ALWAYS_INLINE VkResult vkCreateImagePipeSurfaceFUCHSIA(
VkInstance instance,
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface) {
return gpu::GetVulkanFunctionPointers()->vkCreateImagePipeSurfaceFUCHSIA(
instance, pCreateInfo, pAllocator, pSurface);
}
#endif
ALWAYS_INLINE VkResult
vkAllocateCommandBuffers(VkDevice device,
const VkCommandBufferAllocateInfo* pAllocateInfo,
VkCommandBuffer* pCommandBuffers) { … }
ALWAYS_INLINE VkResult
vkAllocateDescriptorSets(VkDevice device,
const VkDescriptorSetAllocateInfo* pAllocateInfo,
VkDescriptorSet* pDescriptorSets) { … }
ALWAYS_INLINE VkResult
vkAllocateMemory(VkDevice device,
const VkMemoryAllocateInfo* pAllocateInfo,
const VkAllocationCallbacks* pAllocator,
VkDeviceMemory* pMemory) { … }
ALWAYS_INLINE VkResult
vkBeginCommandBuffer(VkCommandBuffer commandBuffer,
const VkCommandBufferBeginInfo* pBeginInfo) { … }
ALWAYS_INLINE VkResult vkBindBufferMemory(VkDevice device,
VkBuffer buffer,
VkDeviceMemory memory,
VkDeviceSize memoryOffset) { … }
ALWAYS_INLINE VkResult
vkBindBufferMemory2(VkDevice device,
uint32_t bindInfoCount,
const VkBindBufferMemoryInfo* pBindInfos) { … }
ALWAYS_INLINE VkResult vkBindImageMemory(VkDevice device,
VkImage image,
VkDeviceMemory memory,
VkDeviceSize memoryOffset) { … }
ALWAYS_INLINE VkResult
vkBindImageMemory2(VkDevice device,
uint32_t bindInfoCount,
const VkBindImageMemoryInfo* pBindInfos) { … }
ALWAYS_INLINE void vkCmdBeginRenderPass(
VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
VkSubpassContents contents) { … }
ALWAYS_INLINE void vkCmdBindDescriptorSets(
VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
uint32_t firstSet,
uint32_t descriptorSetCount,
const VkDescriptorSet* pDescriptorSets,
uint32_t dynamicOffsetCount,
const uint32_t* pDynamicOffsets) { … }
ALWAYS_INLINE void vkCmdBindPipeline(VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
VkPipeline pipeline) { … }
ALWAYS_INLINE void vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer,
uint32_t firstBinding,
uint32_t bindingCount,
const VkBuffer* pBuffers,
const VkDeviceSize* pOffsets) { … }
ALWAYS_INLINE void vkCmdCopyBuffer(VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkBuffer dstBuffer,
uint32_t regionCount,
const VkBufferCopy* pRegions) { … }
ALWAYS_INLINE void vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkBufferImageCopy* pRegions) { … }
ALWAYS_INLINE void vkCmdCopyImage(VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkImageCopy* pRegions) { … }
ALWAYS_INLINE void vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkBuffer dstBuffer,
uint32_t regionCount,
const VkBufferImageCopy* pRegions) { … }
ALWAYS_INLINE void vkCmdDraw(VkCommandBuffer commandBuffer,
uint32_t vertexCount,
uint32_t instanceCount,
uint32_t firstVertex,
uint32_t firstInstance) { … }
ALWAYS_INLINE void vkCmdEndRenderPass(VkCommandBuffer commandBuffer) { … }
ALWAYS_INLINE void vkCmdExecuteCommands(
VkCommandBuffer commandBuffer,
uint32_t commandBufferCount,
const VkCommandBuffer* pCommandBuffers) { … }
ALWAYS_INLINE void vkCmdNextSubpass(VkCommandBuffer commandBuffer,
VkSubpassContents contents) { … }
ALWAYS_INLINE void vkCmdPipelineBarrier(
VkCommandBuffer commandBuffer,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags dstStageMask,
VkDependencyFlags dependencyFlags,
uint32_t memoryBarrierCount,
const VkMemoryBarrier* pMemoryBarriers,
uint32_t bufferMemoryBarrierCount,
const VkBufferMemoryBarrier* pBufferMemoryBarriers,
uint32_t imageMemoryBarrierCount,
const VkImageMemoryBarrier* pImageMemoryBarriers) { … }
ALWAYS_INLINE void vkCmdPushConstants(VkCommandBuffer commandBuffer,
VkPipelineLayout layout,
VkShaderStageFlags stageFlags,
uint32_t offset,
uint32_t size,
const void* pValues) { … }
ALWAYS_INLINE void vkCmdSetScissor(VkCommandBuffer commandBuffer,
uint32_t firstScissor,
uint32_t scissorCount,
const VkRect2D* pScissors) { … }
ALWAYS_INLINE void vkCmdSetViewport(VkCommandBuffer commandBuffer,
uint32_t firstViewport,
uint32_t viewportCount,
const VkViewport* pViewports) { … }
ALWAYS_INLINE VkResult vkCreateBuffer(VkDevice device,
const VkBufferCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkBuffer* pBuffer) { … }
ALWAYS_INLINE VkResult
vkCreateCommandPool(VkDevice device,
const VkCommandPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkCommandPool* pCommandPool) { … }
ALWAYS_INLINE VkResult
vkCreateDescriptorPool(VkDevice device,
const VkDescriptorPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDescriptorPool* pDescriptorPool) { … }
ALWAYS_INLINE VkResult
vkCreateDescriptorSetLayout(VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDescriptorSetLayout* pSetLayout) { … }
ALWAYS_INLINE VkResult vkCreateFence(VkDevice device,
const VkFenceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkFence* pFence) { … }
ALWAYS_INLINE VkResult
vkCreateFramebuffer(VkDevice device,
const VkFramebufferCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkFramebuffer* pFramebuffer) { … }
ALWAYS_INLINE VkResult
vkCreateGraphicsPipelines(VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkGraphicsPipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
VkPipeline* pPipelines) { … }
ALWAYS_INLINE VkResult vkCreateImage(VkDevice device,
const VkImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkImage* pImage) { … }
ALWAYS_INLINE VkResult
vkCreateImageView(VkDevice device,
const VkImageViewCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkImageView* pView) { … }
ALWAYS_INLINE VkResult
vkCreatePipelineLayout(VkDevice device,
const VkPipelineLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkPipelineLayout* pPipelineLayout) { … }
ALWAYS_INLINE VkResult
vkCreateRenderPass(VkDevice device,
const VkRenderPassCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkRenderPass* pRenderPass) { … }
ALWAYS_INLINE VkResult vkCreateSampler(VkDevice device,
const VkSamplerCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSampler* pSampler) { … }
ALWAYS_INLINE VkResult
vkCreateSemaphore(VkDevice device,
const VkSemaphoreCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSemaphore* pSemaphore) { … }
ALWAYS_INLINE VkResult
vkCreateShaderModule(VkDevice device,
const VkShaderModuleCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkShaderModule* pShaderModule) { … }
ALWAYS_INLINE void vkDestroyBuffer(VkDevice device,
VkBuffer buffer,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyCommandPool(
VkDevice device,
VkCommandPool commandPool,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyDescriptorSetLayout(
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyDevice(VkDevice device,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyFence(VkDevice device,
VkFence fence,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyFramebuffer(
VkDevice device,
VkFramebuffer framebuffer,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyImage(VkDevice device,
VkImage image,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyImageView(VkDevice device,
VkImageView imageView,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyPipeline(VkDevice device,
VkPipeline pipeline,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyPipelineLayout(
VkDevice device,
VkPipelineLayout pipelineLayout,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyRenderPass(
VkDevice device,
VkRenderPass renderPass,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroySampler(VkDevice device,
VkSampler sampler,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroySemaphore(VkDevice device,
VkSemaphore semaphore,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE void vkDestroyShaderModule(
VkDevice device,
VkShaderModule shaderModule,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE VkResult vkDeviceWaitIdle(VkDevice device) { … }
ALWAYS_INLINE VkResult
vkFlushMappedMemoryRanges(VkDevice device,
uint32_t memoryRangeCount,
const VkMappedMemoryRange* pMemoryRanges) { … }
ALWAYS_INLINE VkResult vkEndCommandBuffer(VkCommandBuffer commandBuffer) { … }
ALWAYS_INLINE void vkFreeCommandBuffers(
VkDevice device,
VkCommandPool commandPool,
uint32_t commandBufferCount,
const VkCommandBuffer* pCommandBuffers) { … }
ALWAYS_INLINE VkResult
vkFreeDescriptorSets(VkDevice device,
VkDescriptorPool descriptorPool,
uint32_t descriptorSetCount,
const VkDescriptorSet* pDescriptorSets) { … }
ALWAYS_INLINE void vkFreeMemory(VkDevice device,
VkDeviceMemory memory,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE VkResult
vkInvalidateMappedMemoryRanges(VkDevice device,
uint32_t memoryRangeCount,
const VkMappedMemoryRange* pMemoryRanges) { … }
ALWAYS_INLINE void vkGetBufferMemoryRequirements(
VkDevice device,
VkBuffer buffer,
VkMemoryRequirements* pMemoryRequirements) { … }
ALWAYS_INLINE void vkGetBufferMemoryRequirements2(
VkDevice device,
const VkBufferMemoryRequirementsInfo2* pInfo,
VkMemoryRequirements2* pMemoryRequirements) { … }
ALWAYS_INLINE void vkGetDeviceQueue(VkDevice device,
uint32_t queueFamilyIndex,
uint32_t queueIndex,
VkQueue* pQueue) { … }
ALWAYS_INLINE void vkGetDeviceQueue2(VkDevice device,
const VkDeviceQueueInfo2* pQueueInfo,
VkQueue* pQueue) { … }
ALWAYS_INLINE VkResult vkGetFenceStatus(VkDevice device, VkFence fence) { … }
ALWAYS_INLINE void vkGetImageMemoryRequirements(
VkDevice device,
VkImage image,
VkMemoryRequirements* pMemoryRequirements) { … }
ALWAYS_INLINE void vkGetImageMemoryRequirements2(
VkDevice device,
const VkImageMemoryRequirementsInfo2* pInfo,
VkMemoryRequirements2* pMemoryRequirements) { … }
ALWAYS_INLINE void vkGetImageSubresourceLayout(
VkDevice device,
VkImage image,
const VkImageSubresource* pSubresource,
VkSubresourceLayout* pLayout) { … }
ALWAYS_INLINE VkResult vkMapMemory(VkDevice device,
VkDeviceMemory memory,
VkDeviceSize offset,
VkDeviceSize size,
VkMemoryMapFlags flags,
void** ppData) { … }
ALWAYS_INLINE VkResult vkQueueSubmit(VkQueue queue,
uint32_t submitCount,
const VkSubmitInfo* pSubmits,
VkFence fence) { … }
ALWAYS_INLINE VkResult vkQueueWaitIdle(VkQueue queue) { … }
ALWAYS_INLINE VkResult vkResetCommandBuffer(VkCommandBuffer commandBuffer,
VkCommandBufferResetFlags flags) { … }
ALWAYS_INLINE VkResult vkResetFences(VkDevice device,
uint32_t fenceCount,
const VkFence* pFences) { … }
ALWAYS_INLINE void vkUnmapMemory(VkDevice device, VkDeviceMemory memory) { … }
ALWAYS_INLINE void vkUpdateDescriptorSets(
VkDevice device,
uint32_t descriptorWriteCount,
const VkWriteDescriptorSet* pDescriptorWrites,
uint32_t descriptorCopyCount,
const VkCopyDescriptorSet* pDescriptorCopies) { … }
ALWAYS_INLINE VkResult vkWaitForFences(VkDevice device,
uint32_t fenceCount,
const VkFence* pFences,
VkBool32 waitAll,
uint64_t timeout) { … }
#if BUILDFLAG(IS_ANDROID)
ALWAYS_INLINE VkResult vkGetAndroidHardwareBufferPropertiesANDROID(
VkDevice device,
const struct AHardwareBuffer* buffer,
VkAndroidHardwareBufferPropertiesANDROID* pProperties) {
return gpu::GetVulkanFunctionPointers()
->vkGetAndroidHardwareBufferPropertiesANDROID(device, buffer,
pProperties);
}
#endif
#if BUILDFLAG(IS_POSIX)
ALWAYS_INLINE VkResult
vkGetSemaphoreFdKHR(VkDevice device,
const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
int* pFd) { … }
ALWAYS_INLINE VkResult vkImportSemaphoreFdKHR(
VkDevice device,
const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { … }
#endif
#if BUILDFLAG(IS_WIN)
ALWAYS_INLINE VkResult vkGetSemaphoreWin32HandleKHR(
VkDevice device,
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle) {
return gpu::GetVulkanFunctionPointers()->vkGetSemaphoreWin32HandleKHR(
device, pGetWin32HandleInfo, pHandle);
}
ALWAYS_INLINE VkResult
vkImportSemaphoreWin32HandleKHR(VkDevice device,
const VkImportSemaphoreWin32HandleInfoKHR*
pImportSemaphoreWin32HandleInfo) {
return gpu::GetVulkanFunctionPointers()->vkImportSemaphoreWin32HandleKHR(
device, pImportSemaphoreWin32HandleInfo);
}
#endif
#if BUILDFLAG(IS_POSIX)
ALWAYS_INLINE VkResult vkGetMemoryFdKHR(VkDevice device,
const VkMemoryGetFdInfoKHR* pGetFdInfo,
int* pFd) { … }
ALWAYS_INLINE VkResult
vkGetMemoryFdPropertiesKHR(VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType,
int fd,
VkMemoryFdPropertiesKHR* pMemoryFdProperties) { … }
#endif
#if BUILDFLAG(IS_WIN)
ALWAYS_INLINE VkResult vkGetMemoryWin32HandleKHR(
VkDevice device,
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle) {
return gpu::GetVulkanFunctionPointers()->vkGetMemoryWin32HandleKHR(
device, pGetWin32HandleInfo, pHandle);
}
ALWAYS_INLINE VkResult vkGetMemoryWin32HandlePropertiesKHR(
VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType,
HANDLE handle,
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) {
return gpu::GetVulkanFunctionPointers()->vkGetMemoryWin32HandlePropertiesKHR(
device, handleType, handle, pMemoryWin32HandleProperties);
}
#endif
#if BUILDFLAG(IS_FUCHSIA)
ALWAYS_INLINE VkResult vkImportSemaphoreZirconHandleFUCHSIA(
VkDevice device,
const VkImportSemaphoreZirconHandleInfoFUCHSIA*
pImportSemaphoreZirconHandleInfo) {
return gpu::GetVulkanFunctionPointers()->vkImportSemaphoreZirconHandleFUCHSIA(
device, pImportSemaphoreZirconHandleInfo);
}
ALWAYS_INLINE VkResult vkGetSemaphoreZirconHandleFUCHSIA(
VkDevice device,
const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
zx_handle_t* pZirconHandle) {
return gpu::GetVulkanFunctionPointers()->vkGetSemaphoreZirconHandleFUCHSIA(
device, pGetZirconHandleInfo, pZirconHandle);
}
#endif
#if BUILDFLAG(IS_FUCHSIA)
ALWAYS_INLINE VkResult vkGetMemoryZirconHandleFUCHSIA(
VkDevice device,
const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
zx_handle_t* pZirconHandle) {
return gpu::GetVulkanFunctionPointers()->vkGetMemoryZirconHandleFUCHSIA(
device, pGetZirconHandleInfo, pZirconHandle);
}
#endif
#if BUILDFLAG(IS_FUCHSIA)
ALWAYS_INLINE VkResult vkCreateBufferCollectionFUCHSIA(
VkDevice device,
const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkBufferCollectionFUCHSIA* pCollection) {
return gpu::GetVulkanFunctionPointers()->vkCreateBufferCollectionFUCHSIA(
device, pCreateInfo, pAllocator, pCollection);
}
ALWAYS_INLINE VkResult vkSetBufferCollectionImageConstraintsFUCHSIA(
VkDevice device,
VkBufferCollectionFUCHSIA collection,
const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo) {
return gpu::GetVulkanFunctionPointers()
->vkSetBufferCollectionImageConstraintsFUCHSIA(device, collection,
pImageConstraintsInfo);
}
ALWAYS_INLINE VkResult vkGetBufferCollectionPropertiesFUCHSIA(
VkDevice device,
VkBufferCollectionFUCHSIA collection,
VkBufferCollectionPropertiesFUCHSIA* pProperties) {
return gpu::GetVulkanFunctionPointers()
->vkGetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties);
}
ALWAYS_INLINE void vkDestroyBufferCollectionFUCHSIA(
VkDevice device,
VkBufferCollectionFUCHSIA collection,
const VkAllocationCallbacks* pAllocator) {
return gpu::GetVulkanFunctionPointers()->vkDestroyBufferCollectionFUCHSIA(
device, collection, pAllocator);
}
#endif
ALWAYS_INLINE VkResult vkAcquireNextImageKHR(VkDevice device,
VkSwapchainKHR swapchain,
uint64_t timeout,
VkSemaphore semaphore,
VkFence fence,
uint32_t* pImageIndex) { … }
ALWAYS_INLINE VkResult
vkCreateSwapchainKHR(VkDevice device,
const VkSwapchainCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSwapchainKHR* pSwapchain) { … }
ALWAYS_INLINE void vkDestroySwapchainKHR(
VkDevice device,
VkSwapchainKHR swapchain,
const VkAllocationCallbacks* pAllocator) { … }
ALWAYS_INLINE VkResult vkGetSwapchainImagesKHR(VkDevice device,
VkSwapchainKHR swapchain,
uint32_t* pSwapchainImageCount,
VkImage* pSwapchainImages) { … }
ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue,
const VkPresentInfoKHR* pPresentInfo) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierPropertiesEXT(
VkDevice device,
VkImage image,
VkImageDrmFormatModifierPropertiesEXT* pProperties) { … }
#endif
#endif