anv: Put cache memory type first on non-llc platforms
authorJordan Justen <jordan.l.justen@intel.com>
Thu, 11 Feb 2021 01:08:44 +0000 (17:08 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 8 Mar 2021 20:47:06 +0000 (12:47 -0800)
Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324>

src/intel/vulkan/anv_device.c

index 30f8e7e..e4ddd87 100644 (file)
@@ -399,13 +399,13 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd)
       device->memory.types[0] = (struct anv_memory_type) {
          .propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
                           VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
-                          VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
+                          VK_MEMORY_PROPERTY_HOST_CACHED_BIT,
          .heapIndex = 0,
       };
       device->memory.types[1] = (struct anv_memory_type) {
          .propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
                           VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
-                          VK_MEMORY_PROPERTY_HOST_CACHED_BIT,
+                          VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
          .heapIndex = 0,
       };
    }