From 16a7cc4d449efa51f9ec2fd47df38a76c12e8e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 6 Oct 2020 17:52:08 +0200 Subject: [PATCH] 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 Reviewed-by: Adam Jackson Part-of: --- 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