Merge pull request #641 from kwand/__GL_MaxFramesAllowed

Set GL_MaxFramesAllowed=1 instead of GL_YIELD=usleep
This commit is contained in:
yshui
2021-07-11 14:16:59 +01:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@@ -15,7 +15,8 @@
/// Apply driver specified global workarounds. It's safe to call this multiple times.
void apply_driver_workarounds(struct session *ps, enum driver driver) {
if (driver & DRIVER_NVIDIA) {
setenv("__GL_YIELD", "usleep", true);
// setenv("__GL_YIELD", "usleep", true);
setenv("__GL_MaxFramesAllowed", "1", true);
ps->o.xrender_sync_fence = true;
}
}

View File

@@ -467,7 +467,9 @@ static void glx_present(backend_t *base, const region_t *region attr_unused) {
struct _glx_data *gd = (void *)base;
gl_present(base, region);
glXSwapBuffers(gd->display, gd->target_win);
glFinish();
if (!gd->gl.is_nvidia) {
glFinish();
}
}
static int glx_buffer_age(backend_t *base) {