Module: Mesa
Branch: staging/20.2
Commit: 7e07f74c93516c5521161955ccf2dc50e28cc7c0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e07f74c93516c5521161955ccf2dc50e28cc7c0

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>
(cherry picked from commit 16a7cc4d449efa51f9ec2fd47df38a76c12e8e52)

---

 .pick_status.json               | 2 +-
 src/loader/loader_dri3_helper.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index b67d4d7032b..ce5ee4ec195 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1210,7 +1210,7 @@
         "description": "loader/dri3: Keep current number of back buffers if 
frame was skipped",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 488c038ae5d..14af1eb0661 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