Revert "gpu: Load vk functions for querying image/buffer properties"
This reverts commit 1ffb3583. Reason for revert: This CL breaks Vulkan support for any client running a Vulkan version earlier than 1.1. The reason for this is that in the generator, we specify |'min_api_version': 'VK_VERSION_1_1'|, which gets translated into |if (api_version >= VK_VERSION_1_1)|. The issue here is that |api_version| is a Vulkan API version which is a multi-part version number packed into a 32 bit int [1]. VK_VERSION_1_1 on the other hand, is defined as 1 [2], so the version check will always pass. What we want here is actually VK_API_VERSION_1_1. I will revert my CL and then upload a CL that fixes my code and all of the existing code in this generator that uses VK_VERSION_1_1. [1] https://vulkan.lunarg.com/doc/view/1.0.30.0/linux/vkspec.chunked/ch02s09.html [2] https://cs.chromium.org/chromium/src/third_party/glfw/src/deps/vulkan/vulkan_core.h?l=3641&rcl=2de2589f910b1a85905f425be4d32f33cec092df Original change's description: > 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/+/1794142 > Reviewed-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} TBR=penghuang@chromium.org,dcastagna@chromium.org,hob@chromium.org Change-Id: Ia1dd50f868aa482bfef6a60e63d0d696c6e309d3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 996470 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796527Reviewed-by:Daniele Castagna <dcastagna@chromium.org> Commit-Queue: Daniele Castagna <dcastagna@chromium.org> Cr-Commit-Position: refs/heads/master@{#695385}
Showing
Please register or sign in to comment