diff options
author | Lionel Landwerlin <[email protected]> | 2017-11-17 17:29:26 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2017-11-22 22:53:27 +0000 |
commit | d4c52c540879d7e77aa83710f6b0acd3c5b30e99 (patch) | |
tree | 22f3d59440fbf07de9bc295169e01d85153376ba /src | |
parent | 118a8c7587d919b3b85cec7855a16d9e778394e6 (diff) |
anv: flag batch & instruction BOs for capture
When the kernel support flagging our BO, let's mark batch &
instruction BOs for capture so then can be included in the error
state.
v2: Only add EXEC_CAPTURE if supported (Kristian)
v3: Fix operator precedence issue (Lionel)
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 7 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index fccf6a63778..b5577ee61de 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -362,6 +362,7 @@ anv_physical_device_init(struct anv_physical_device *device, goto fail; device->has_exec_async = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_ASYNC); + device->has_exec_capture = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_CAPTURE); device->has_exec_fence = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_FENCE); device->has_syncobj = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_FENCE_ARRAY); device->has_syncobj_wait = device->has_syncobj && @@ -1213,7 +1214,8 @@ VkResult anv_CreateDevice( uint64_t bo_flags = (physical_device->supports_48bit_addresses ? EXEC_OBJECT_SUPPORTS_48B_ADDRESS : 0) | - (physical_device->has_exec_async ? EXEC_OBJECT_ASYNC : 0); + (physical_device->has_exec_async ? EXEC_OBJECT_ASYNC : 0) | + (physical_device->has_exec_capture ? EXEC_OBJECT_CAPTURE : 0); anv_bo_pool_init(&device->batch_bo_pool, device, bo_flags); @@ -1230,7 +1232,8 @@ VkResult anv_CreateDevice( goto fail_bo_cache; result = anv_state_pool_init(&device->instruction_state_pool, device, 16384, - bo_flags); + bo_flags | + (physical_device->has_exec_capture ? EXEC_OBJECT_CAPTURE : 0)); if (result != VK_SUCCESS) goto fail_dynamic_state_pool; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index f9770788a6d..6d4e43f2e68 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -773,6 +773,7 @@ struct anv_physical_device { struct isl_device isl_dev; int cmd_parser_version; bool has_exec_async; + bool has_exec_capture; bool has_exec_fence; bool has_syncobj; bool has_syncobj_wait; |