diff options
author | Marek Olšák <[email protected]> | 2019-04-22 17:11:00 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-05-02 16:09:24 -0400 |
commit | 20909284f204091757c050aa40cfffaf3f981b9c (patch) | |
tree | 0747ef4c13b716453af6bcd4e6e52f58a499a62f /src/gallium/auxiliary/util | |
parent | d30ce03bc07562d2f694dbe94cbf9c1875a25c4d (diff) |
st/dri: decrease input lag by syncing sooner in SwapBuffers
It's done by:
- decrease the number of frames in flight by 1
- flush before throttling in SwapBuffers
(instead of wait-then-flush, do flush-then-wait)
The improvement is apparent with Unigine Heaven.
Previously:
draw frame 2
wait frame 0
flush frame 2
present frame 2
The input lag is 2 frames.
Now:
draw frame 2
flush frame 2
wait frame 1
present frame 2
The input lag is 1 frame. Flushing is done before waiting, because
otherwise the device would be idle after waiting.
Nine is affected because it also uses the pipe cap.
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_screen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 27f51e0898e..410f17421e6 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -356,7 +356,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, return 0; case PIPE_CAP_MAX_FRAMES_IN_FLIGHT: - return 2; + return 1; case PIPE_CAP_DMABUF: #ifdef PIPE_OS_LINUX |