Revert "anv: flag BO for write combine when CPU visible and potentially in lmem"

This fixes a performance regression between 22.2 and 23.0. A different
fix is present in the main branch, but for 23.0 it was decided to revert
the offending change rather then the more complete fix.

This reverts commit 582bf4d9f7.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8489
This commit is contained in:
Dylan Baker 2023-04-25 13:50:00 -07:00
parent 2efd0d623e
commit 778a7b0504

View file

@ -4065,13 +4065,6 @@ VkResult anv_AllocateMemory(
if (!(mem_type->propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT))
alloc_flags |= ANV_BO_ALLOC_NO_LOCAL_MEM;
/* If the allocated buffer might end up in local memory and it's host
* visible, make CPU writes are combined, it should be faster.
*/
if (!(alloc_flags & ANV_BO_ALLOC_NO_LOCAL_MEM) &&
(mem_type->propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT))
alloc_flags |= ANV_BO_ALLOC_WRITE_COMBINE;
if (vk_flags & VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT)
alloc_flags |= ANV_BO_ALLOC_CLIENT_VISIBLE_ADDRESS;