mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 02:40:11 +01:00
llvmpipe: add pipe_thread_wait() calls
Wait for threads to exit before cleaning up per-thread data. Fixes hang on context destruction with glean makeCurrent test. See fd.o bug 26536.
This commit is contained in:
parent
76e87786ab
commit
b704a4e8f3
1 changed files with 6 additions and 0 deletions
|
|
@ -846,6 +846,12 @@ void lp_rast_destroy( struct lp_rasterizer *rast )
|
|||
pipe_semaphore_signal(&rast->tasks[i].work_ready);
|
||||
}
|
||||
|
||||
/* Wait for threads to terminate before cleaning up per-thread data */
|
||||
for (i = 0; i < rast->num_threads; i++) {
|
||||
pipe_thread_wait(rast->threads[i]);
|
||||
}
|
||||
|
||||
/* Clean up per-thread data */
|
||||
for (i = 0; i < rast->num_threads; i++) {
|
||||
pipe_semaphore_destroy(&rast->tasks[i].work_ready);
|
||||
pipe_semaphore_destroy(&rast->tasks[i].work_done);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue