diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index b7724bf8e8d..1884932bbc7 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2134,6 +2134,9 @@ anv_device_get_pat_entry(struct anv_device *device, if (alloc_flags & ANV_BO_ALLOC_COMPRESSED) return &device->info->pat.compressed; + if (alloc_flags & (ANV_BO_ALLOC_EXTERNAL | ANV_BO_ALLOC_SCANOUT)) + return &device->info->pat.scanout; + /* PAT indexes has no actual effect in DG2 and DG1, smem caches will always * be snopped by GPU and lmem will always be WC. * This might change in future discrete platforms. @@ -2147,8 +2150,6 @@ anv_device_get_pat_entry(struct anv_device *device, /* Integrated platforms handling only */ if ((alloc_flags & (ANV_BO_ALLOC_HOST_CACHED_COHERENT)) == ANV_BO_ALLOC_HOST_CACHED_COHERENT) return &device->info->pat.cached_coherent; - else if (alloc_flags & (ANV_BO_ALLOC_EXTERNAL | ANV_BO_ALLOC_SCANOUT)) - return &device->info->pat.scanout; else if (alloc_flags & ANV_BO_ALLOC_HOST_CACHED) return &device->info->pat.writeback_incoherent; else