diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 9aa5cbd3c96..023453a6700 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2191,9 +2191,6 @@ const struct intel_device_info_pat_entry * anv_device_get_pat_entry(struct anv_device *device, enum anv_bo_alloc_flags alloc_flags) { - if (alloc_flags & ANV_BO_ALLOC_IMPORTED) - return &device->info->pat.cached_coherent; - if (alloc_flags & ANV_BO_ALLOC_COMPRESSED) { /* Compressed PAT entries are available on Xe2+. */ assert(device->info->ver >= 20); @@ -2202,6 +2199,9 @@ anv_device_get_pat_entry(struct anv_device *device, &device->info->pat.compressed; } + if (alloc_flags & ANV_BO_ALLOC_IMPORTED) + return &device->info->pat.cached_coherent; + if (alloc_flags & (ANV_BO_ALLOC_EXTERNAL | ANV_BO_ALLOC_SCANOUT)) return &device->info->pat.scanout;