summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-11-17 17:26:59 +0000
committerLionel Landwerlin <[email protected]>2017-11-22 22:53:27 +0000
commit118a8c7587d919b3b85cec7855a16d9e778394e6 (patch)
treebb667f604089aaf9287767ba23a6056e0271eff3 /src/intel/vulkan/anv_device.c
parent799d35087001aa754304d9409d3d52750430e40b (diff)
anv: setup BO flags at state_pool/block_pool creation
This will allow to set the flags on any anv_bo created/filled from a state pool or block pool later. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 3aa213e205b..fccf6a63778 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1211,21 +1211,31 @@ VkResult anv_CreateDevice(
}
pthread_condattr_destroy(&condattr);
- anv_bo_pool_init(&device->batch_bo_pool, device);
+ uint64_t bo_flags =
+ (physical_device->supports_48bit_addresses ? EXEC_OBJECT_SUPPORTS_48B_ADDRESS : 0) |
+ (physical_device->has_exec_async ? EXEC_OBJECT_ASYNC : 0);
+
+ anv_bo_pool_init(&device->batch_bo_pool, device, bo_flags);
result = anv_bo_cache_init(&device->bo_cache);
if (result != VK_SUCCESS)
goto fail_batch_bo_pool;
- result = anv_state_pool_init(&device->dynamic_state_pool, device, 16384);
+ /* For the state pools we explicitly disable 48bit. */
+ bo_flags = physical_device->has_exec_async ? EXEC_OBJECT_ASYNC : 0;
+
+ result = anv_state_pool_init(&device->dynamic_state_pool, device, 16384,
+ bo_flags);
if (result != VK_SUCCESS)
goto fail_bo_cache;
- result = anv_state_pool_init(&device->instruction_state_pool, device, 16384);
+ result = anv_state_pool_init(&device->instruction_state_pool, device, 16384,
+ bo_flags);
if (result != VK_SUCCESS)
goto fail_dynamic_state_pool;
- result = anv_state_pool_init(&device->surface_state_pool, device, 4096);
+ result = anv_state_pool_init(&device->surface_state_pool, device, 4096,
+ bo_flags);
if (result != VK_SUCCESS)
goto fail_instruction_state_pool;