Module: Mesa
Branch: staging/23.0
Commit: 778a7b0504a7ad83b5fc53a74e9d8c22534c2f44
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=778a7b0504a7ad83b5fc53a74e9d8c22534c2f44

Author: Dylan Baker <[email protected]>
Date:   Tue Apr 25 13:50:00 2023 -0700

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 582bf4d9f72f35bb56f06386ab3fb6b5384a4593.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8489

---

 src/intel/vulkan/anv_device.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 8c7f0b07c96..93240e9b8c9 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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;
 

Reply via email to