diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-02-26 21:52:49 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-03-01 01:07:18 +0100 |
commit | f9898b211eb23c18d27508a2cbbdd629fc3dc734 (patch) | |
tree | b7560fb6d256ed813b12b5e7f44bf521c865fb1a /src/amd/vulkan/winsys/amdgpu | |
parent | 34bd5e2e2e8d9c213b051152f7a8b731151d9be5 (diff) |
radv: Use the syncobj wait ioctl to wait on fences if possible.
Handles the !waitAll and signal after the start of the wait cases correctly.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/winsys/amdgpu')
-rw-r--r-- | src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c index d2b33546cc4..cd7ab384e73 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c @@ -1332,8 +1332,8 @@ static void radv_amdgpu_signal_syncobj(struct radeon_winsys *_ws, amdgpu_cs_syncobj_signal(ws->dev, &handle, 1); } -static bool radv_amdgpu_wait_syncobj(struct radeon_winsys *_ws, - uint32_t handle, uint64_t timeout) +static bool radv_amdgpu_wait_syncobj(struct radeon_winsys *_ws, const uint32_t *handles, + uint32_t handle_count, bool wait_all, uint64_t timeout) { struct radv_amdgpu_winsys *ws = radv_amdgpu_winsys(_ws); uint32_t tmp; @@ -1341,9 +1341,9 @@ static bool radv_amdgpu_wait_syncobj(struct radeon_winsys *_ws, /* The timeouts are signed, while vulkan timeouts are unsigned. */ timeout = MIN2(timeout, INT64_MAX); - int ret = amdgpu_cs_syncobj_wait(ws->dev, &handle, 1, timeout, + int ret = amdgpu_cs_syncobj_wait(ws->dev, (uint32_t*)handles, handle_count, timeout, DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT | - DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL, + (wait_all ? DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL : 0), &tmp); if (ret == 0) { return true; |