From 197e9dc86614971f1aaa4fbe722f179f4148e916 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 20 Apr 2019 00:27:32 +0100 Subject: [PATCH] auto enable sync fence for NVIDIA driver users Signed-off-by: Yuxuan Shui --- src/render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render.c b/src/render.c index 96c9fa81..ce7dfd80 100644 --- a/src/render.c +++ b/src/render.c @@ -773,13 +773,14 @@ static inline void resize_region(region_t *region, short mod) { /// region = ?? /// region_real = the damage region void paint_all(session_t *ps, struct managed_win *t, bool ignore_damage) { - if (ps->o.xrender_sync_fence) { + if (ps->o.xrender_sync_fence || (ps->drivers & DRIVER_NVIDIA)) { if (ps->xsync_exists && !x_fence_sync(ps->c, ps->sync_fence)) { log_error("x_fence_sync failed, xrender-sync-fence will be " "disabled from now on."); xcb_sync_destroy_fence(ps->c, ps->sync_fence); ps->sync_fence = XCB_NONE; ps->o.xrender_sync_fence = false; + ps->xsync_exists = false; } }