anv: Allocate scratch and workaround BO in local memory

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>
This commit is contained in:
Sagar Ghuge 2020-04-16 18:05:23 -07:00 committed by Marge Bot
parent 6352371ff6
commit e505c221fa
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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)