st/nine: Check discard_delayed_release is set before allocating more
authorAxel Davy <davyaxel0@gmail.com>
Sat, 27 Apr 2019 13:33:22 +0000 (15:33 +0200)
committerAxel Davy <davyaxel0@gmail.com>
Tue, 30 Apr 2019 17:18:52 +0000 (19:18 +0200)
When discard_delayed_release is set (default), we allocate more buffers
and use a different buffer wait path.
Check if it is set, and use the old paths if not
(the alternative buffer wait path could still be used, but there is no
advantage to using it in this case).

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/state_trackers/nine/swapchain9.c

index d299f62399f7217d1ffaf018140563105e6d4799..8a1b1bf145a34a962cb00d4bcfbe2cafd40f8e01 100644 (file)
@@ -958,6 +958,7 @@ NineSwapChain9_Present( struct NineSwapChain9 *This,
         return hr;
 
     if (This->base.device->minor_version_num > 2 &&
+        This->actx->discard_delayed_release &&
         This->params.SwapEffect == D3DSWAPEFFECT_DISCARD &&
         This->params.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE) {
         int next_buffer = -1;
@@ -1283,6 +1284,7 @@ NineSwapChain9_GetBackBufferCountForParams( struct NineSwapChain9 *This,
          * . Buffer scheduled kernel side to be next on screen.
          * . Last buffer sent. */
         if (This->base.device->minor_version_num > 2 &&
+            This->actx->discard_delayed_release &&
             pParams->PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE) {
             if (This->actx->thread_submit && count < 4)
                 count = 4;