From: Axel Davy Date: Sat, 7 May 2016 14:25:03 +0000 (+0200) Subject: st/nine: Wait for pending tasks to execute in swapchain X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5d308e51a7be7e90d1373fa8ec7813ae8018ae5;p=mesa.git st/nine: Wait for pending tasks to execute in swapchain Fixes crash after Reset() when using thread_submit=true Signed-off-by: Axel Davy --- diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c index 31060632370..fcda9c7837e 100644 --- a/src/gallium/state_trackers/nine/swapchain9.c +++ b/src/gallium/state_trackers/nine/swapchain9.c @@ -243,6 +243,10 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, desc.Width = pParams->BackBufferWidth; desc.Height = pParams->BackBufferHeight; + for (i = 0; i < oldBufferCount; i++) { + if (This->tasks[i]) + _mesa_threadpool_wait_for_task(This->pool, &(This->tasks[i])); + } memset(This->tasks, 0, sizeof(This->tasks)); if (This->pool) {