mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 06:40:11 +01:00
venus: improve image memory requirement cache for image aliasing
We can strip the alias bit as the memory requirements are identical between the bound image and the aliased image per spec. Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
This commit is contained in:
parent
adcb967c5c
commit
63cac09d74
1 changed files with 8 additions and 0 deletions
|
|
@ -97,6 +97,14 @@ vn_image_get_image_reqs_key(struct vn_device *dev,
|
|||
if (!dev->image_reqs_cache.ht)
|
||||
return false;
|
||||
|
||||
/* Strip the alias bit as the memory requirements are identical. */
|
||||
VkImageCreateInfo local_info;
|
||||
if (create_info->flags & VK_IMAGE_CREATE_ALIAS_BIT) {
|
||||
local_info = *create_info;
|
||||
local_info.flags &= ~VK_IMAGE_CREATE_ALIAS_BIT;
|
||||
create_info = &local_info;
|
||||
}
|
||||
|
||||
_mesa_sha1_init(&sha1_ctx);
|
||||
|
||||
/* Hash relevant fields in the pNext chain */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue