From 5a97916fdce788ac707df94d6b3b145a377482ac Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Tue, 13 Aug 2024 10:34:00 +0200 Subject: [PATCH] wsi/x11: Bump maximum number of outstanding COMPLETE events. Fixes a "regression" where comically large FPS tests regressed. Signed-off-by: Hans-Kristian Arntzen Fixes: 19dba854 ("wsi/x11: Rewrite implementation to always use threads.") Reviewed-By: Mike Blumenkrantz Part-of: --- src/vulkan/wsi/wsi_common_x11.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index a401e0a034e..0c0c489d893 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -1071,9 +1071,11 @@ struct x11_image { * We need to keep track of them when considering present ID. */ /* This is arbitrarily chosen. With IMMEDIATE on a 3 deep swapchain, - * we allow up to 48 outstanding presentations per vblank, which is more than enough - * for any reasonable application. */ -#define X11_SWAPCHAIN_MAX_PENDING_COMPLETIONS 16 + * we allow over 300 outstanding presentations per vblank, which is more than enough + * for any reasonable application. + * This used to be 16, but it regressed benchmarks that did 15k+ FPS. + * This should allow over 25k FPS on a 60 Hz monitor. Any more than this is comical. */ +#define X11_SWAPCHAIN_MAX_PENDING_COMPLETIONS 128 uint32_t present_queued_count; struct x11_image_pending_completion pending_completions[X11_SWAPCHAIN_MAX_PENDING_COMPLETIONS]; #ifdef HAVE_DRI3_EXPLICIT_SYNC