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:
parent
8d443cb50d
commit
220c3301cf
@ -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());
|
||||
});
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user