summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/swapchain9.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine/swapchain9.c')
-rw-r--r--src/gallium/state_trackers/nine/swapchain9.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
index db3766063a5..12cad73d722 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -241,12 +241,12 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This,
desc.Height = pParams->BackBufferHeight;
if (This->pool) {
- _mesa_threadpool_destroy(This->pool);
+ _mesa_threadpool_destroy(This, This->pool);
This->pool = NULL;
}
This->enable_threadpool = This->actx->thread_submit && (pParams->SwapEffect != D3DSWAPEFFECT_COPY);
if (This->enable_threadpool)
- This->pool = _mesa_threadpool_create();
+ This->pool = _mesa_threadpool_create(This);
if (!This->pool)
This->enable_threadpool = FALSE;
@@ -504,7 +504,7 @@ NineSwapChain9_dtor( struct NineSwapChain9 *This )
DBG("This=%p\n", This);
if (This->pool)
- _mesa_threadpool_destroy(This->pool);
+ _mesa_threadpool_destroy(This, This->pool);
if (This->buffers) {
for (i = 0; i < This->params.BackBufferCount; i++) {
@@ -1028,3 +1028,24 @@ NineSwapChain9_ResolutionMismatch( struct NineSwapChain9 *This )
return FALSE;
}
+
+HANDLE
+NineSwapChain9_CreateThread( struct NineSwapChain9 *This,
+ void *pFuncAddress,
+ void *pParam )
+{
+ if (This->base.device->minor_version_num > 1) {
+ return ID3DPresent_CreateThread(This->present, pFuncAddress, pParam);
+ }
+
+ return NULL;
+}
+
+void
+NineSwapChain9_WaitForThread( struct NineSwapChain9 *This,
+ HANDLE thread )
+{
+ if (This->base.device->minor_version_num > 1) {
+ (void) ID3DPresent_WaitForThread(This->present, thread);
+ }
+}