Merge pull request #51 from yshui/glx-sync-removal

Remove GLX sync fence code
This commit is contained in:
yshui 2018-11-10 22:25:14 +00:00 committed by GitHub
commit 47377df04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 42 deletions

View File

@ -1638,9 +1638,6 @@ vsync_deinit(session_t *ps);
*/ */
///@{ ///@{
void
xr_glx_sync(session_t *ps, Drawable d, XSyncFence *pfence);
/** /**
* Free a GLX texture. * Free a GLX texture.
*/ */
@ -1761,9 +1758,6 @@ xr_sync(session_t *ps, Drawable d, XSyncFence *pfence) {
if (*pfence) if (*pfence)
XSyncResetFence(ps->dpy, *pfence); XSyncResetFence(ps->dpy, *pfence);
} }
#ifdef OPENGL
xr_glx_sync(ps, d, pfence);
#endif
} }
/** @name DBus handling /** @name DBus handling

View File

@ -185,23 +185,6 @@ get_visualinfo_from_visual(session_t *ps, xcb_visualid_t visual) {
return XGetVisualInfo(ps->dpy, VisualIDMask, &vreq, &nitems); return XGetVisualInfo(ps->dpy, VisualIDMask, &vreq, &nitems);
} }
void
xr_glx_sync(session_t *ps, Drawable d, XSyncFence *pfence) {
if (*pfence) {
// GLsync sync = ps->psglx->glFenceSyncProc(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
GLsync sync = ps->psglx->glImportSyncEXT(GL_SYNC_X11_FENCE_EXT, *pfence, 0);
/* GLenum ret = ps->psglx->glClientWaitSyncProc(sync, GL_SYNC_FLUSH_COMMANDS_BIT,
1000);
assert(GL_CONDITION_SATISFIED == ret); */
XSyncTriggerFence(ps->dpy, *pfence);
XFlush(ps->dpy);
ps->psglx->glWaitSyncProc(sync, 0, GL_TIMEOUT_IGNORED);
// ps->psglx->glDeleteSyncProc(sync);
// XSyncResetFence(ps->dpy, *pfence);
}
glx_check_err(ps);
}
#ifdef DEBUG_GLX_DEBUG_CONTEXT #ifdef DEBUG_GLX_DEBUG_CONTEXT
static inline GLXFBConfig static inline GLXFBConfig
get_fbconfig_from_visualinfo(session_t *ps, const XVisualInfo *visualinfo) { get_fbconfig_from_visualinfo(session_t *ps, const XVisualInfo *visualinfo) {
@ -378,25 +361,6 @@ glx_init(session_t *ps, bool need_render) {
printf_errf("(): Failed to acquire glXBindTexImageEXT() / glXReleaseTexImageEXT()."); printf_errf("(): Failed to acquire glXBindTexImageEXT() / glXReleaseTexImageEXT().");
goto glx_init_end; goto glx_init_end;
} }
psglx->glFenceSyncProc = (f_FenceSync)
glXGetProcAddress((const GLubyte *) "glFenceSync");
psglx->glIsSyncProc = (f_IsSync)
glXGetProcAddress((const GLubyte *) "glIsSync");
psglx->glDeleteSyncProc = (f_DeleteSync)
glXGetProcAddress((const GLubyte *) "glDeleteSync");
psglx->glClientWaitSyncProc = (f_ClientWaitSync)
glXGetProcAddress((const GLubyte *) "glClientWaitSync");
psglx->glWaitSyncProc = (f_WaitSync)
glXGetProcAddress((const GLubyte *) "glWaitSync");
psglx->glImportSyncEXT = (f_ImportSyncEXT)
glXGetProcAddress((const GLubyte *) "glImportSyncEXT");
if (!psglx->glFenceSyncProc || !psglx->glIsSyncProc || !psglx->glDeleteSyncProc
|| !psglx->glClientWaitSyncProc || !psglx->glWaitSyncProc
|| !psglx->glImportSyncEXT) {
printf_errf("(): Failed to acquire GLX sync functions.");
goto glx_init_end;
}
} }
// Acquire FBConfigs // Acquire FBConfigs