Mesa (staging/19.1): st/nine: Check discard_delayed_release is set before allocating more

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 30 17:37:02 UTC 2019


Module: Mesa
Branch: staging/19.1
Commit: ce57f4f7c4d672a88527d0d346e27b902cfc3c6a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce57f4f7c4d672a88527d0d346e27b902cfc3c6a

Author: Axel Davy <davyaxel0 at gmail.com>
Date:   Sat Apr 27 15:33:22 2019 +0200

st/nine: Check discard_delayed_release is set before allocating more

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 at gmail.com>

---

 src/gallium/state_trackers/nine/swapchain9.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
index d299f62399f..8a1b1bf145a 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -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;




More information about the mesa-commit mailing list