Mesa (main): anv: Allocate scratch and workaround BO in local memory

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 24 16:52:04 UTC 2021


Module: Mesa
Branch: main
Commit: e505c221fa79a36445aa23c63238ec6d8998c599
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e505c221fa79a36445aa23c63238ec6d8998c599

Author: Sagar Ghuge <sagar.ghuge at intel.com>
Date:   Thu Apr 16 18:05:23 2020 -0700

anv: Allocate scratch and workaround BO in local memory

Signed-off-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>

---

 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)



More information about the mesa-commit mailing list