summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorScott D Phillips <[email protected]>2018-05-30 20:16:30 -0700
committerJason Ekstrand <[email protected]>2018-06-01 14:27:13 -0700
commit4affeba1e9eb426a1ba13a3e8ced4673c4bb9b34 (patch)
treef2ac24c4a26ff2d5c1082cc3fa0c04610c03c23e /src/intel/vulkan/anv_device.c
parentf3dbe0419de8ad195f0f0ce8f4f45b03b16936a3 (diff)
anv: Soft-pin everything else
v2 (Jason Ekstrand): - Break up Scott's mega-patch Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Scott D Phillips <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 1a2bde2df4d..b02e1a2749e 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1658,6 +1658,12 @@ VkResult anv_CreateDevice(
if (result != VK_SUCCESS)
goto fail_binding_table_pool;
+ if (physical_device->use_softpin)
+ device->workaround_bo.flags |= EXEC_OBJECT_PINNED;
+
+ if (!anv_vma_alloc(device, &device->workaround_bo))
+ goto fail_workaround_bo;
+
anv_device_init_trivial_batch(device);
if (device->info.gen >= 10)
@@ -1756,6 +1762,7 @@ void anv_DestroyDevice(
anv_scratch_pool_finish(device, &device->scratch_pool);
anv_gem_munmap(device->workaround_bo.map, device->workaround_bo.size);
+ anv_vma_free(device, &device->workaround_bo);
anv_gem_close(device, device->workaround_bo.gem_handle);
anv_vma_free(device, &device->trivial_batch_bo);