SteamOS: Always sync to vblank to fix tearing on AMD.

This commit is contained in:
Pierre-Loup Griffais 2014-01-10 11:39:28 -08:00 committed by Pierre-Loup A. Griffais
parent b0fd3a75d5
commit a50620bace
2 changed files with 16 additions and 1 deletions

4
debian/changelog vendored
View file

@ -1,8 +1,10 @@
steamos-compositor (1.15.1) alchemist; urgency=low
steamos-compositor (1.15.2) alchemist; urgency=low
* Set _NET_WM_STATE_HIDDEN on out of focus windows and the overlays when
appropriate. Steam knows to stop its rendering loop when it sees this.
* Fix double cursor when a game is starting or exiting.
* Always request vertical synchronization, as some implementations might not
enable it by default.
-- Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> Wed, 08 Jan 2014 13:57:13 -0800

View file

@ -51,6 +51,9 @@
#define GL_GLEXT_LEGACY
#include <GL/glx.h>
#include "glext.h"
#include "GL/glxext.h"
PFNGLXSWAPINTERVALEXTPROC __pointer_to_glXSwapIntervalEXT;
void (*__pointer_to_glXBindTexImageEXT) (Display *display,
GLXDrawable drawable,
@ -1877,6 +1880,16 @@ main (int argc, char **argv)
exit (1);
}
__pointer_to_glXSwapIntervalEXT = (void *)glXGetProcAddress("glXSwapIntervalEXT");
if (__pointer_to_glXSwapIntervalEXT)
{
__pointer_to_glXSwapIntervalEXT(dpy, root, 1);
}
else
{
fprintf (stderr, "Could not find glXSwapIntervalEXT proc pointer\n");
}
__pointer_to_glXBindTexImageEXT = (void *)glXGetProcAddress("glXBindTexImageEXT");
__pointer_to_glXReleaseTexImageEXT = (void *)glXGetProcAddress("glXReleaseTexImageEXT");