Improvement #7: Add GLX_OML_sync_control VSync support
- Add "vsync-oml" VSync method, using GLX_OML_sync_control. Untested, because it's not supported by my driver. - Unredirect ps->reg_win, because DRI wiki says it's related to the behavior of OpenGL VSync extensions. - Add glFlush() and glXWaitX() calls, in hope they are slightly helpful for VSync. - Change a few functions to make error handling more graceful. Make some errors fatal. Code clean-up. - Add unused function make_text_prop().
This commit is contained in:
12
src/common.h
12
src/common.h
@ -248,12 +248,16 @@ typedef enum {
|
||||
VSYNC_NONE,
|
||||
VSYNC_DRM,
|
||||
VSYNC_OPENGL,
|
||||
VSYNC_OPENGL_OML,
|
||||
NUM_VSYNC,
|
||||
} vsync_t;
|
||||
|
||||
#ifdef CONFIG_VSYNC_OPENGL
|
||||
typedef int (*f_WaitVideoSync) (int, int, unsigned *);
|
||||
typedef int (*f_GetVideoSync) (unsigned *);
|
||||
|
||||
typedef Bool (*f_GetSyncValuesOML) (Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc);
|
||||
typedef Bool (*f_WaitForMscOML) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t* ust, int64_t* msc, int64_t* sbc);
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@ -536,9 +540,13 @@ typedef struct {
|
||||
/// GLX context.
|
||||
GLXContext glx_context;
|
||||
/// Pointer to glXGetVideoSyncSGI function.
|
||||
f_GetVideoSync glx_get_video_sync;
|
||||
f_GetVideoSync glXGetVideoSyncSGI;
|
||||
/// Pointer to glXWaitVideoSyncSGI function.
|
||||
f_WaitVideoSync glx_wait_video_sync;
|
||||
f_WaitVideoSync glXWaitVideoSyncSGI;
|
||||
/// Pointer to glXGetSyncValuesOML function.
|
||||
f_GetSyncValuesOML glXGetSyncValuesOML;
|
||||
/// Pointer to glXWaitForMscOML function.
|
||||
f_WaitForMscOML glXWaitForMscOML;
|
||||
#endif
|
||||
|
||||
// === X extension related ===
|
||||
|
Reference in New Issue
Block a user