From c8f563b633e4a5cb73183a62918de9ea04fcbb07 Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Fri, 28 Aug 2020 13:01:53 -0700 Subject: [PATCH] anv: Allocate buffers with write-combined local memory Marginally improves DG1 performance (< 1%) v2: Only on local mem (Lionel) Reviewed-by: Lionel Landwerlin Reviewed-by: Kenneth Graunke Part-of: --- src/intel/vulkan/anv_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 9b6dbebbe3e..aa7a5a78ac6 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3413,7 +3413,9 @@ VkResult anv_CreateDevice( result = anv_device_alloc_bo(device, "workaround", 4096, ANV_BO_ALLOC_CAPTURE | - ANV_BO_ALLOC_MAPPED, + ANV_BO_ALLOC_MAPPED | + (device->info->has_local_mem ? + ANV_BO_ALLOC_WRITE_COMBINE : 0), 0 /* explicit_address */, &device->workaround_bo); if (result != VK_SUCCESS)