Module: Mesa
Branch: master
Commit: 16a7cc4d449efa51f9ec2fd47df38a76c12e8e52
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=16a7cc4d449efa51f9ec2fd47df38a76c12e8e52

Author: Michel Dänzer <[email protected]>
Date:   Tue Oct  6 17:52:08 2020 +0200

loader/dri3: Keep current number of back buffers if frame was skipped

We'd previously take the copy path. If we were actually flipping (in
which case skipped frames are more likely to occur), we'd ping-pong
between a smaller and larger number of back buffers, and frame-rate
could vary / take a dip due to the buffer management overhead.

While I'm not sure this is actually possible to hit at this point, it
definitely will be with the next change.

Cc: mesa-stable
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7033>

---

 src/loader/loader_dri3_helper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 6a65f3112d4..1cb482d674d 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -280,6 +280,9 @@ dri3_update_max_num_back(struct loader_dri3_drawable *draw)
       draw->max_num_back = 3;
       break;
 
+   case XCB_PRESENT_COMPLETE_MODE_SKIP:
+      break;
+
    default:
       /* On transition from flips to copies, start with a single buffer again,
        * a second one will be allocated if needed

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to