mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-19 08:10:32 +01:00
Cache for vkGetPhysicalDeviceImageFormatProperties2 as it is observed to be called repeatedly with zink/proton layers. Cache design is the same as the image requirements cache, generating a hash key from pImageFormatInfo and storing pImageFormatProperties into a hash table. There are a couple differences though: - VkResult gets cached when the query returns NOT_SUPPORTED. - Unlike pMemoryRequirements that returns VkMemoryRequirements2 and possibly VkMemoryDedicatedRequirements, VkImageFormatProperties2 has various pNext chains that can be optionally passed in. Hash the existence of these pNext so that they are considered different queries and the underlying pNext struct can be optionally cached. The alternative would be to modify the query to always chain these pNext so all of them would be cached, but it is unlikely for queries to only differ in pNext chains. Signed-off-by: Juston Li <justonli@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27401> |
||
|---|---|---|
| .. | ||
| ci | ||
| vdrm | ||
| venus-protocol | ||
| virtio-gpu | ||
| vtest | ||
| vulkan | ||
| meson.build | ||