mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
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
1 changed files with 2 additions and 1 deletions
|
@ -773,13 +773,14 @@ static inline void resize_region(region_t *region, short mod) {
|
||||||
/// region = ??
|
/// region = ??
|
||||||
/// region_real = the damage region
|
/// region_real = the damage region
|
||||||
void paint_all(session_t *ps, struct managed_win *t, bool ignore_damage) {
|
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)) {
|
if (ps->xsync_exists && !x_fence_sync(ps->c, ps->sync_fence)) {
|
||||||
log_error("x_fence_sync failed, xrender-sync-fence will be "
|
log_error("x_fence_sync failed, xrender-sync-fence will be "
|
||||||
"disabled from now on.");
|
"disabled from now on.");
|
||||||
xcb_sync_destroy_fence(ps->c, ps->sync_fence);
|
xcb_sync_destroy_fence(ps->c, ps->sync_fence);
|
||||||
ps->sync_fence = XCB_NONE;
|
ps->sync_fence = XCB_NONE;
|
||||||
ps->o.xrender_sync_fence = false;
|
ps->o.xrender_sync_fence = false;
|
||||||
|
ps->xsync_exists = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue