mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-16 06:10:45 +01:00
winsys/amdgpu: add do_winsys_deinit function
The idea is to have matching init/deinit functions so that deinit can be re-used for cleanup in the error path of amdgpu_winsys_create. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
9fb8d354ca
commit
480ac143df
1 changed files with 7 additions and 2 deletions
|
|
@ -368,6 +368,12 @@ fail:
|
|||
return false;
|
||||
}
|
||||
|
||||
static void do_winsys_deinit(struct amdgpu_winsys *ws)
|
||||
{
|
||||
AddrDestroy(ws->addrlib);
|
||||
amdgpu_device_deinitialize(ws->dev);
|
||||
}
|
||||
|
||||
static void amdgpu_winsys_destroy(struct radeon_winsys *rws)
|
||||
{
|
||||
struct amdgpu_winsys *ws = (struct amdgpu_winsys*)rws;
|
||||
|
|
@ -378,8 +384,7 @@ static void amdgpu_winsys_destroy(struct radeon_winsys *rws)
|
|||
pipe_mutex_destroy(ws->bo_fence_lock);
|
||||
pb_cache_deinit(&ws->bo_cache);
|
||||
pipe_mutex_destroy(ws->global_bo_list_lock);
|
||||
AddrDestroy(ws->addrlib);
|
||||
amdgpu_device_deinitialize(ws->dev);
|
||||
do_winsys_deinit(ws);
|
||||
FREE(rws);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue