From e505c221fa79a36445aa23c63238ec6d8998c599 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Thu, 16 Apr 2020 18:05:23 -0700 Subject: [PATCH] anv: Allocate scratch and workaround BO in local memory Signed-off-by: Sagar Ghuge Reviewed-by: Jason Ekstrand Part-of: --- src/intel/vulkan/anv_allocator.c | 3 ++- src/intel/vulkan/anv_device.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 2bdc3dd62de..17b2dc32268 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1535,7 +1535,8 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool, * so nothing will ever touch the top page. */ VkResult result = anv_device_alloc_bo(device, "scratch", size, - ANV_BO_ALLOC_32BIT_ADDRESS, + ANV_BO_ALLOC_32BIT_ADDRESS | + ANV_BO_ALLOC_LOCAL_MEM, 0 /* explicit_address */, &bo); if (result != VK_SUCCESS) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index fb69b653003..32642892555 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3359,7 +3359,8 @@ VkResult anv_CreateDevice( } result = anv_device_alloc_bo(device, "workaround", 4096, - ANV_BO_ALLOC_CAPTURE | ANV_BO_ALLOC_MAPPED /* flags */, + ANV_BO_ALLOC_CAPTURE | ANV_BO_ALLOC_MAPPED | + ANV_BO_ALLOC_LOCAL_MEM /* flags */, 0 /* explicit_address */, &device->workaround_bo); if (result != VK_SUCCESS)