From f5d73842b296105b4dc6fdb2f114ff57613928a5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 19 Jun 2018 14:34:15 +0200 Subject: [PATCH] [d3d11] Do not flush on every call to GetData There are several scenarios when flushing can have a significant negative impact on performance: 1. When the query result is already available 2. When the game scatters GetData calls when rendering Frostpunk hits both issues at the same time, which led to over 120 queue submissions per frame. This patch reduces that to 3 submissions per frame when the game is GPU-bound. --- src/d3d11/d3d11_context_imm.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index 9456888f..fc7b9777 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -63,10 +63,6 @@ namespace dxvk { return E_INVALIDARG; } - // Flush in order to make sure the query commands get dispatched - if ((GetDataFlags & D3D11_ASYNC_GETDATA_DONOTFLUSH) == 0) - Flush(); - // Default error return for unsupported interfaces HRESULT hr = E_INVALIDARG;