diff --git a/src/dxvk/dxvk_cs.cpp b/src/dxvk/dxvk_cs.cpp index 24ad6a85..dd237758 100644 --- a/src/dxvk/dxvk_cs.cpp +++ b/src/dxvk/dxvk_cs.cpp @@ -57,12 +57,9 @@ namespace dxvk { m_chunksQueued.push(std::move(chunk)); m_chunksPending += 1; - // If a large number of chunks are queued up, wait for - // some of them to be processed in order to avoid memory - // leaks, stuttering, input lag and similar issues. - if (m_chunksPending >= MaxChunksInFlight) { + if (m_chunksPending > MaxChunksInFlight) { m_condOnSync.wait(lock, [this] { - return (m_chunksPending < MaxChunksInFlight / 2) + return (m_chunksPending <= MaxChunksInFlight ) || (m_stopped.load()); }); } diff --git a/src/dxvk/dxvk_cs.h b/src/dxvk/dxvk_cs.h index 13c800ad..a1b32d82 100644 --- a/src/dxvk/dxvk_cs.h +++ b/src/dxvk/dxvk_cs.h @@ -88,7 +88,7 @@ namespace dxvk { * Stores a list of commands. */ class DxvkCsChunk : public RcObject { - constexpr static size_t MaxBlockSize = 65536; + constexpr static size_t MaxBlockSize = 16384; public: DxvkCsChunk(); @@ -168,7 +168,7 @@ namespace dxvk { class DxvkCsThread { // Limit the number of chunks in the queue // to prevent memory leaks, stuttering etc. - constexpr static uint32_t MaxChunksInFlight = 16; + constexpr static uint32_t MaxChunksInFlight = 32; public: DxvkCsThread(const Rc& context);