17#define ACQUIRE_PROC(name, instance, device) \
18 fFunctions.f##name = reinterpret_cast<PFN_vk##name>(getProc("vk" #name, instance, device))
20#define ACQUIRE_PROC_SUFFIX(name, suffix, instance, device) \
21 fFunctions.f##name = \
22 reinterpret_cast<PFN_vk##name##suffix>(getProc("vk" #name #suffix, instance, device))
27 uint32_t instanceVersion,
28 uint32_t physicalDeviceVersion,
30 if (getProc ==
nullptr) {
253#ifdef SK_BUILD_FOR_ANDROID
270#define RETURN_FALSE_INTERFACE \
271 if (kIsDebug) { SkDebugf("%s:%d VulkanInterface::validate() failed.\n", __FILE__, __LINE__); } \
275 uint32_t physicalDeviceVersion,
482#ifdef SK_BUILD_FOR_ANDROID
486 if (
nullptr ==
fFunctions.fGetAndroidHardwareBufferProperties ||
487 nullptr ==
fFunctions.fGetMemoryAndroidHardwareBuffer) {
#define ACQUIRE_PROC(name, instance, device)
#define ACQUIRE_PROC_SUFFIX(name, suffix, instance, device)
#define RETURN_FALSE_INTERFACE
static vk::UniqueSampler CreateSampler(const vk::Device &device, const SamplerDescriptor &desc, const std::shared_ptr< YUVConversionVK > &yuv_conversion)
std::function< PFN_vkVoidFunction(const char *, VkInstance, VkDevice)> VulkanGetProc
VkPtr< PFN_vkCmdSetStencilReference > fCmdSetStencilReference
VkPtr< PFN_vkGetImageSparseMemoryRequirements2 > fGetImageSparseMemoryRequirements2
VkPtr< PFN_vkCmdDrawIndexed > fCmdDrawIndexed
VkPtr< PFN_vkDestroyPipelineCache > fDestroyPipelineCache
VkPtr< PFN_vkEnumerateInstanceExtensionProperties > fEnumerateInstanceExtensionProperties
VkPtr< PFN_vkCmdBindDescriptorSets > fCmdBindDescriptorSets
VkPtr< PFN_vkAllocateMemory > fAllocateMemory
VkPtr< PFN_vkGetPhysicalDeviceImageFormatProperties > fGetPhysicalDeviceImageFormatProperties
VkPtr< PFN_vkGetBufferMemoryRequirements > fGetBufferMemoryRequirements
VkPtr< PFN_vkCmdBeginQuery > fCmdBeginQuery
VkPtr< PFN_vkCmdNextSubpass > fCmdNextSubpass
VkPtr< PFN_vkCreateSemaphore > fCreateSemaphore
VkPtr< PFN_vkCmdUpdateBuffer > fCmdUpdateBuffer
VkPtr< PFN_vkQueueSubmit > fQueueSubmit
VkPtr< PFN_vkDestroyFramebuffer > fDestroyFramebuffer
VkPtr< PFN_vkGetPhysicalDeviceFeatures2 > fGetPhysicalDeviceFeatures2
VkPtr< PFN_vkSetEvent > fSetEvent
VkPtr< PFN_vkDestroyFence > fDestroyFence
VkPtr< PFN_vkQueueBindSparse > fQueueBindSparse
VkPtr< PFN_vkBindBufferMemory2 > fBindBufferMemory2
VkPtr< PFN_vkCmdSetLineWidth > fCmdSetLineWidth
VkPtr< PFN_vkCreateQueryPool > fCreateQueryPool
VkPtr< PFN_vkCreateSampler > fCreateSampler
VkPtr< PFN_vkDestroyDescriptorSetLayout > fDestroyDescriptorSetLayout
VkPtr< PFN_vkCmdClearDepthStencilImage > fCmdClearDepthStencilImage
VkPtr< PFN_vkCreateSamplerYcbcrConversion > fCreateSamplerYcbcrConversion
VkPtr< PFN_vkGetEventStatus > fGetEventStatus
VkPtr< PFN_vkUnmapMemory > fUnmapMemory
VkPtr< PFN_vkEnumerateInstanceLayerProperties > fEnumerateInstanceLayerProperties
VkPtr< PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 > fGetPhysicalDeviceSparseImageFormatProperties2
VkPtr< PFN_vkGetPhysicalDeviceQueueFamilyProperties > fGetPhysicalDeviceQueueFamilyProperties
VkPtr< PFN_vkCmdBeginRenderPass > fCmdBeginRenderPass
VkPtr< PFN_vkResetFences > fResetFences
VkPtr< PFN_vkCmdSetViewport > fCmdSetViewport
VkPtr< PFN_vkCmdFillBuffer > fCmdFillBuffer
VkPtr< PFN_vkCreatePipelineLayout > fCreatePipelineLayout
VkPtr< PFN_vkDestroyInstance > fDestroyInstance
VkPtr< PFN_vkAllocateDescriptorSets > fAllocateDescriptorSets
VkPtr< PFN_vkCmdClearAttachments > fCmdClearAttachments
VkPtr< PFN_vkTrimCommandPool > fTrimCommandPool
VkPtr< PFN_vkBindBufferMemory > fBindBufferMemory
VkPtr< PFN_vkDestroyImageView > fDestroyImageView
VkPtr< PFN_vkCmdResolveImage > fCmdResolveImage
VkPtr< PFN_vkCreatePipelineCache > fCreatePipelineCache
VkPtr< PFN_vkResetCommandPool > fResetCommandPool
VkPtr< PFN_vkFreeCommandBuffers > fFreeCommandBuffers
VkPtr< PFN_vkCreateComputePipelines > fCreateComputePipelines
VkPtr< PFN_vkDestroyDevice > fDestroyDevice
VkPtr< PFN_vkCreateEvent > fCreateEvent
VkPtr< PFN_vkGetFenceStatus > fGetFenceStatus
VkPtr< PFN_vkCreateDescriptorPool > fCreateDescriptorPool
VkPtr< PFN_vkCmdSetStencilCompareMask > fCmdSetStencilCompareMask
VkPtr< PFN_vkEndCommandBuffer > fEndCommandBuffer
VkPtr< PFN_vkGetPhysicalDeviceMemoryProperties > fGetPhysicalDeviceMemoryProperties
VkPtr< PFN_vkCmdDrawIndirect > fCmdDrawIndirect
VkPtr< PFN_vkCmdSetDepthBounds > fCmdSetDepthBounds
VkPtr< PFN_vkGetImageMemoryRequirements > fGetImageMemoryRequirements
VkPtr< PFN_vkCmdDispatch > fCmdDispatch
VkPtr< PFN_vkDestroySampler > fDestroySampler
VkPtr< PFN_vkCreateDescriptorSetLayout > fCreateDescriptorSetLayout
VkPtr< PFN_vkFreeMemory > fFreeMemory
VkPtr< PFN_vkFlushMappedMemoryRanges > fFlushMappedMemoryRanges
VkPtr< PFN_vkGetDescriptorSetLayoutSupport > fGetDescriptorSetLayoutSupport
VkPtr< PFN_vkCmdEndQuery > fCmdEndQuery
VkPtr< PFN_vkCreateGraphicsPipelines > fCreateGraphicsPipelines
VkPtr< PFN_vkDeviceWaitIdle > fDeviceWaitIdle
VkPtr< PFN_vkEnumeratePhysicalDevices > fEnumeratePhysicalDevices
VkPtr< PFN_vkCreateBuffer > fCreateBuffer
VkPtr< PFN_vkCmdSetEvent > fCmdSetEvent
VkPtr< PFN_vkCreateImageView > fCreateImageView
VkPtr< PFN_vkGetDeviceQueue > fGetDeviceQueue
VkPtr< PFN_vkFreeDescriptorSets > fFreeDescriptorSets
VkPtr< PFN_vkGetBufferMemoryRequirements2 > fGetBufferMemoryRequirements2
VkPtr< PFN_vkGetPhysicalDeviceFormatProperties > fGetPhysicalDeviceFormatProperties
VkPtr< PFN_vkCmdResetQueryPool > fCmdResetQueryPool
VkPtr< PFN_vkEnumerateDeviceLayerProperties > fEnumerateDeviceLayerProperties
VkPtr< PFN_vkGetPhysicalDeviceSparseImageFormatProperties > fGetPhysicalDeviceSparseImageFormatProperties
VkPtr< PFN_vkWaitForFences > fWaitForFences
VkPtr< PFN_vkResetDescriptorPool > fResetDescriptorPool
VkPtr< PFN_vkGetPhysicalDeviceFormatProperties2 > fGetPhysicalDeviceFormatProperties2
VkPtr< PFN_vkCmdPipelineBarrier > fCmdPipelineBarrier
VkPtr< PFN_vkGetPhysicalDeviceImageFormatProperties2 > fGetPhysicalDeviceImageFormatProperties2
VkPtr< PFN_vkCreateInstance > fCreateInstance
VkPtr< PFN_vkCmdSetScissor > fCmdSetScissor
VkPtr< PFN_vkDestroyQueryPool > fDestroyQueryPool
VkPtr< PFN_vkGetImageSubresourceLayout > fGetImageSubresourceLayout
VkPtr< PFN_vkCreateImage > fCreateImage
VkPtr< PFN_vkGetPipelineCacheData > fGetPipelineCacheData
VkPtr< PFN_vkGetDeviceMemoryCommitment > fGetDeviceMemoryCommitment
VkPtr< PFN_vkInvalidateMappedMemoryRanges > fInvalidateMappedMemoryRanges
VkPtr< PFN_vkUpdateDescriptorSets > fUpdateDescriptorSets
VkPtr< PFN_vkCmdResetEvent > fCmdResetEvent
VkPtr< PFN_vkCmdSetStencilWriteMask > fCmdSetStencilWriteMask
VkPtr< PFN_vkResetCommandBuffer > fResetCommandBuffer
VkPtr< PFN_vkCmdBindPipeline > fCmdBindPipeline
VkPtr< PFN_vkDestroyPipelineLayout > fDestroyPipelineLayout
VkPtr< PFN_vkCreateShaderModule > fCreateShaderModule
VkPtr< PFN_vkDestroySemaphore > fDestroySemaphore
VkPtr< PFN_vkCmdDrawIndexedIndirect > fCmdDrawIndexedIndirect
VkPtr< PFN_vkCmdEndRenderPass > fCmdEndRenderPass
VkPtr< PFN_vkDestroyDescriptorPool > fDestroyDescriptorPool
VkPtr< PFN_vkCmdCopyImageToBuffer > fCmdCopyImageToBuffer
VkPtr< PFN_vkGetPhysicalDeviceProperties > fGetPhysicalDeviceProperties
VkPtr< PFN_vkCreateDevice > fCreateDevice
VkPtr< PFN_vkEnumerateDeviceExtensionProperties > fEnumerateDeviceExtensionProperties
VkPtr< PFN_vkDestroyCommandPool > fDestroyCommandPool
VkPtr< PFN_vkGetQueryPoolResults > fGetQueryPoolResults
VkPtr< PFN_vkCreateFramebuffer > fCreateFramebuffer
VkPtr< PFN_vkGetPhysicalDeviceMemoryProperties2 > fGetPhysicalDeviceMemoryProperties2
VkPtr< PFN_vkGetImageMemoryRequirements2 > fGetImageMemoryRequirements2
VkPtr< PFN_vkGetRenderAreaGranularity > fGetRenderAreaGranularity
VkPtr< PFN_vkCreateBufferView > fCreateBufferView
VkPtr< PFN_vkCmdWaitEvents > fCmdWaitEvents
VkPtr< PFN_vkAllocateCommandBuffers > fAllocateCommandBuffers
VkPtr< PFN_vkCmdSetBlendConstants > fCmdSetBlendConstants
VkPtr< PFN_vkDestroyEvent > fDestroyEvent
VkPtr< PFN_vkCmdDraw > fCmdDraw
VkPtr< PFN_vkCmdBlitImage > fCmdBlitImage
VkPtr< PFN_vkGetPhysicalDeviceFeatures > fGetPhysicalDeviceFeatures
VkPtr< PFN_vkCmdSetDepthBias > fCmdSetDepthBias
VkPtr< PFN_vkCmdCopyImage > fCmdCopyImage
VkPtr< PFN_vkMapMemory > fMapMemory
VkPtr< PFN_vkCreateRenderPass > fCreateRenderPass
VkPtr< PFN_vkCmdBindVertexBuffers > fCmdBindVertexBuffers
VkPtr< PFN_vkGetPhysicalDeviceExternalBufferProperties > fGetPhysicalDeviceExternalBufferProperties
VkPtr< PFN_vkCmdWriteTimestamp > fCmdWriteTimestamp
VkPtr< PFN_vkResetEvent > fResetEvent
VkPtr< PFN_vkDestroyBufferView > fDestroyBufferView
VkPtr< PFN_vkDestroyRenderPass > fDestroyRenderPass
VkPtr< PFN_vkDestroyPipeline > fDestroyPipeline
VkPtr< PFN_vkCmdPushConstants > fCmdPushConstants
VkPtr< PFN_vkCmdCopyBuffer > fCmdCopyBuffer
VkPtr< PFN_vkBeginCommandBuffer > fBeginCommandBuffer
VkPtr< PFN_vkCmdCopyBufferToImage > fCmdCopyBufferToImage
VkPtr< PFN_vkCreateFence > fCreateFence
VkPtr< PFN_vkGetImageSparseMemoryRequirements > fGetImageSparseMemoryRequirements
VkPtr< PFN_vkDestroyShaderModule > fDestroyShaderModule
VkPtr< PFN_vkQueueWaitIdle > fQueueWaitIdle
VkPtr< PFN_vkBindImageMemory2 > fBindImageMemory2
VkPtr< PFN_vkGetPhysicalDeviceProperties2 > fGetPhysicalDeviceProperties2
VkPtr< PFN_vkCmdExecuteCommands > fCmdExecuteCommands
VkPtr< PFN_vkCreateCommandPool > fCreateCommandPool
VkPtr< PFN_vkCmdCopyQueryPoolResults > fCmdCopyQueryPoolResults
VkPtr< PFN_vkCmdClearColorImage > fCmdClearColorImage
VkPtr< PFN_vkDestroyBuffer > fDestroyBuffer
VkPtr< PFN_vkDestroySamplerYcbcrConversion > fDestroySamplerYcbcrConversion
VkPtr< PFN_vkDestroyImage > fDestroyImage
VkPtr< PFN_vkCmdDispatchIndirect > fCmdDispatchIndirect
VkPtr< PFN_vkBindImageMemory > fBindImageMemory
VkPtr< PFN_vkMergePipelineCaches > fMergePipelineCaches
VkPtr< PFN_vkGetPhysicalDeviceQueueFamilyProperties2 > fGetPhysicalDeviceQueueFamilyProperties2
VkPtr< PFN_vkCmdBindIndexBuffer > fCmdBindIndexBuffer
VulkanInterface(VulkanGetProc getProc, VkInstance instance, VkDevice device, uint32_t instanceVersion, uint32_t physicalDeviceVersion, const VulkanExtensions *)
struct skgpu::VulkanInterface::Functions fFunctions
bool validate(uint32_t instanceVersion, uint32_t physicalDeviceVersion, const VulkanExtensions *) const
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME
#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME
#define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME
#define VK_KHR_MAINTENANCE3_EXTENSION_NAME
#define VK_MAKE_VERSION(major, minor, patch)
#define VK_KHR_MAINTENANCE1_EXTENSION_NAME
#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME
#define VK_EXT_DEVICE_FAULT_EXTENSION_NAME
#define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME