kopper: Use the swap interval that was set at swapchain creation time.

We need to track what the caller has given us for swap interval, and use
that to set the present mode at startup.

Fixes incorrect vblank syncing in apitrace's glretrace, which sets the
swap interval to 0 before the swapchain is made.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17470>
This commit is contained in:
Emma Anholt
2022-07-11 12:24:17 -07:00
committed by Marge Bot
parent f3d3368065
commit f9ecf99ca9
3 changed files with 30 additions and 19 deletions
+1
View File
@@ -95,6 +95,7 @@ struct kopper_loader_info {
#endif
};
int has_alpha;
int initial_swap_interval;
};
#define __DRI_KOPPER_LOADER "DRI_KopperLoader"