Module: Mesa Branch: main Commit: 239623ecee97fdd5e8a4b22de32d7326fc5ffd86 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=239623ecee97fdd5e8a4b22de32d7326fc5ffd86
Author: Jason Ekstrand <[email protected]> Date: Thu Feb 11 13:13:03 2021 -0600 anv: Don't require 32-bit addresses for scratch on Gen12.5+ Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17908> --- src/intel/vulkan/anv_allocator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index f6aeb5cb5cc..5ae5608ba55 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1490,9 +1490,11 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool, * * so nothing will ever touch the top page. */ + enum anv_bo_alloc_flags alloc_flags = ANV_BO_ALLOC_LOCAL_MEM; + if (devinfo->verx10 < 125) + alloc_flags |= ANV_BO_ALLOC_32BIT_ADDRESS; VkResult result = anv_device_alloc_bo(device, "scratch", size, - ANV_BO_ALLOC_32BIT_ADDRESS | - ANV_BO_ALLOC_LOCAL_MEM, + alloc_flags, 0 /* explicit_address */, &bo); if (result != VK_SUCCESS)
