auto enable sync fence for NVIDIA driver users
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
685a583f84
commit
197e9dc866
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue