1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

[dxvk] Tweaked command stream chunk sizes and submission

Improves overall frame rate and latency in situations where the
application's render thread cannot keep up with the CS thread.
Considerable frametime improvements in NieR:Automata and
slightly higher frame rates in The Witcher 3.
This commit is contained in:
Philip Rebohle 2018-03-09 12:31:35 +01:00
parent 8d443cb50d
commit 220c3301cf
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 4 additions and 7 deletions

View File

@ -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());
});
}

View File

@ -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<DxvkContext>& context);