From 062c4cc0b9bb9dce6c1e79d0f722ba1ac50462fd Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Mon, 8 Mar 2021 18:44:32 +0100 Subject: [PATCH] st/nine: Bump num of backbuffers for tearfree thread_submit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running some high fps benchmarks, thread_submit gets subpar fps with the option tearfree_discard. Increasing the number of backbuffers fixes it. Signed-off-by: Axel Davy Acked-by: Timur Kristóf Part-of: --- src/gallium/frontends/nine/swapchain9.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/frontends/nine/swapchain9.c b/src/gallium/frontends/nine/swapchain9.c index 4451532e6cf..7c844bf50ac 100644 --- a/src/gallium/frontends/nine/swapchain9.c +++ b/src/gallium/frontends/nine/swapchain9.c @@ -1314,6 +1314,9 @@ NineSwapChain9_GetBackBufferCountForParams( struct NineSwapChain9 *This, * the Xserver will hold 4 buffers. */ else if (!This->actx->thread_submit && count < 5) count = 5; + /* Somehow this cases needs 5 with thread_submit, or else you get a small performance hit */ + if (This->actx->tearfree_discard && count < 5) + count = 5; } }