diff options
author | Patrick Rudolph <[email protected]> | 2016-02-22 19:49:19 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-05-18 23:37:14 +0200 |
commit | f3fa7e3068512dde55c3f4d7c2b599ab1d7fe67f (patch) | |
tree | 5e7e193c71d70bd2f86b38cc7e82cbbaddff7c78 /src/gallium/state_trackers/nine/threadpool.h | |
parent | 72be473ad17893ecc4697644e88defa38b35f126 (diff) |
st/nine: Use WINE thread for threadpool
Use present interface 1.2 function ID3DPresent_CreateThread
to create the thread for threadpool.
Creating the thread with WINE prevents some rarely occuring crashes.
Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/threadpool.h')
-rw-r--r-- | src/gallium/state_trackers/nine/threadpool.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/threadpool.h b/src/gallium/state_trackers/nine/threadpool.h index 00ad25e1b13..2562c96f256 100644 --- a/src/gallium/state_trackers/nine/threadpool.h +++ b/src/gallium/state_trackers/nine/threadpool.h @@ -24,13 +24,16 @@ #ifndef _THREADPOOL_H_ #define _THREADPOOL_H_ +struct NineSwapChain9; + #define MAXTHREADS 1 struct threadpool { pthread_mutex_t m; pthread_cond_t new_work; - pthread_t thread; + HANDLE wthread; + pthread_t pthread; struct threadpool_task *workqueue; BOOL shutdown; }; @@ -45,11 +48,11 @@ struct threadpool_task { BOOL finished; }; -struct threadpool *_mesa_threadpool_create(void); -void _mesa_threadpool_destroy(struct threadpool *pool); +struct threadpool *_mesa_threadpool_create(struct NineSwapChain9 *swapchain); +void _mesa_threadpool_destroy(struct NineSwapChain9 *swapchain, struct threadpool *pool); struct threadpool_task *_mesa_threadpool_queue_task(struct threadpool *pool, threadpool_task_func func, void *data); void _mesa_threadpool_wait_for_task(struct threadpool *pool, struct threadpool_task **task); -#endif
\ No newline at end of file +#endif |