diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-12-18 20:33:07 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-12-18 22:13:31 +0100 |
commit | b98bbdf4906882f056478d7b99c1959081f46490 (patch) | |
tree | 0005135797fd78b8d9d8afd58e5be226ee850eca /src/amd/vulkan/winsys/amdgpu | |
parent | dd517ad96d1ca53ba8912c8d6fd78b89e6948f23 (diff) |
radv/amdgpu: wrap sync fd import/export.
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 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c index e4d444b8524..4578a9b5484 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c @@ -1336,6 +1336,25 @@ static int radv_amdgpu_import_syncobj(struct radeon_winsys *_ws, return amdgpu_cs_import_syncobj(ws->dev, fd, syncobj); } + +static int radv_amdgpu_export_syncobj_to_sync_file(struct radeon_winsys *_ws, + uint32_t syncobj, + int *fd) +{ + struct radv_amdgpu_winsys *ws = radv_amdgpu_winsys(_ws); + + return amdgpu_cs_syncobj_export_sync_file(ws->dev, syncobj, fd); +} + +static int radv_amdgpu_import_syncobj_from_sync_file(struct radeon_winsys *_ws, + uint32_t syncobj, + int fd) +{ + struct radv_amdgpu_winsys *ws = radv_amdgpu_winsys(_ws); + + return amdgpu_cs_syncobj_import_sync_file(ws->dev, syncobj, fd); +} + void radv_amdgpu_cs_init_functions(struct radv_amdgpu_winsys *ws) { ws->base.ctx_create = radv_amdgpu_ctx_create; @@ -1361,5 +1380,7 @@ void radv_amdgpu_cs_init_functions(struct radv_amdgpu_winsys *ws) ws->base.wait_syncobj = radv_amdgpu_wait_syncobj; ws->base.export_syncobj = radv_amdgpu_export_syncobj; ws->base.import_syncobj = radv_amdgpu_import_syncobj; + ws->base.export_syncobj_to_sync_file = radv_amdgpu_export_syncobj_to_sync_file; + ws->base.import_syncobj_from_sync_file = radv_amdgpu_import_syncobj_from_sync_file; ws->base.fence_wait = radv_amdgpu_fence_wait; } |