new backend: glx: use glFinish/glXWaitGL if not on NVIDIA
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@@ -834,6 +834,15 @@ bool gl_init(struct gl_data *gd, session_t *ps) {
|
||||
log_add_target_tls(gd->logger);
|
||||
}
|
||||
|
||||
const char *vendor = (const char *)glGetString(GL_VENDOR);
|
||||
log_debug("GL_VENDOR = %s", vendor);
|
||||
if (strcmp(vendor, "NVIDIA Corporation") == 0) {
|
||||
log_info("GL vendor is NVIDIA, don't use glFinish");
|
||||
gd->is_nvidia = true;
|
||||
} else {
|
||||
gd->is_nvidia = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user