mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 15:50:37 +02:00
venus: workaround to consider ALIAS for image mem req cache
ANV can return different memory requirements with and w/o the ALIAS bit. See https://gitlab.freedesktop.org/mesa/mesa/-/issues/14671 for details. Meanwhile, venus has a driver side cache for image memory requirements. As blessed per spec for memory aliasing, venus strips the ALIAS bit when populating the cache key. Because of the use of imageless mem req query, the ALIAS mem req now can hit the cache first, leaving a smaller/relaxed requirement in the cache...busted. Venus is unable to fix ANV behavior behind the scene, so this workaround is only to align Venus behavior with ANV to not suffer from Venus-only rendering artifacts. Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39368>
This commit is contained in:
parent
fea23746ce
commit
c2c9266fed
1 changed files with 8 additions and 2 deletions
|
|
@ -97,9 +97,15 @@ 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. */
|
||||
/* Strip the alias bit as the memory requirements are identical.
|
||||
*
|
||||
* Except on:
|
||||
* - ANV: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14671
|
||||
*/
|
||||
VkImageCreateInfo local_info;
|
||||
if (create_info->flags & VK_IMAGE_CREATE_ALIAS_BIT) {
|
||||
if ((create_info->flags & VK_IMAGE_CREATE_ALIAS_BIT) &&
|
||||
(dev->physical_device->renderer_driver_id !=
|
||||
VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA)) {
|
||||
local_info = *create_info;
|
||||
local_info.flags &= ~VK_IMAGE_CREATE_ALIAS_BIT;
|
||||
create_info = &local_info;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue