gpu: Load vk functions for querying image/buffer properties
This CL registers a few functions in the Vulkan binding generator script to be used for importing dma-bufs as VkImages [1] with the end goal of supporting WebGPU on Chrome OS. In particular, we add: - vkGetPhysicalDeviceImageFormatProperties2: allows us to query if the physical device supports importing dma-bufs into Vulkan via the VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT flag [2]. - vkGetMemoryFdPropertiesKHR: allows us to list the types of memory that our buffer backed by a dma-buf can be imported as. - vkGetImageMemoryRequirements2: allows us to list the types of memory supported by a given VkImage which can be compared to the output of vkGetMemoryFdPropertiesKHR to determine a suitable memory type for import. [1] https://chromium-review.googlesource.com/c/chromium/src/+/1796049 [2] https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkExternalMemoryHandleTypeFlagBits.html BUG=996470 TEST=ran the script and used the newly bound functions Change-Id: I0f61e531009596d7237153f203084639e649afd7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1794142Reviewed-by:Daniele Castagna <dcastagna@chromium.org> Reviewed-by:
Peng Huang <penghuang@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org> Cr-Commit-Position: refs/heads/master@{#695296}
Showing
Please register or sign in to comment