mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 19:30:12 +01:00
winsys/radeon: fix killing the CS thread
Kill the thread only after we checked that it's not used any more, not before. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
938956ad52
commit
f7ccb84aa1
1 changed files with 4 additions and 4 deletions
|
|
@ -421,6 +421,10 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws)
|
|||
{
|
||||
struct radeon_drm_winsys *ws = (struct radeon_drm_winsys*)rws;
|
||||
|
||||
if (!pipe_reference(&ws->base.reference, NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ws->thread) {
|
||||
ws->kill_thread = 1;
|
||||
pipe_semaphore_signal(&ws->cs_queued);
|
||||
|
|
@ -429,10 +433,6 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws)
|
|||
pipe_semaphore_destroy(&ws->cs_queued);
|
||||
pipe_condvar_destroy(ws->cs_queue_empty);
|
||||
|
||||
if (!pipe_reference(&ws->base.reference, NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
pipe_mutex_destroy(ws->hyperz_owner_mutex);
|
||||
pipe_mutex_destroy(ws->cmask_owner_mutex);
|
||||
pipe_mutex_destroy(ws->cs_stack_lock);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue