diff options
author | marha <marha@users.sourceforge.net> | 2014-10-01 23:12:13 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-01 23:12:13 +0200 |
commit | 88236adfe3eb41b8368b4c9ecf3e09a7199dc474 (patch) | |
tree | 6acb3f7ad3c60c4605551245df9c321b5fb22c3b /mesalib/src/mesa/main/version.c | |
parent | e4086b3defb6186a2fb8a5845968c97e613fb493 (diff) | |
parent | 30eb28e89e513ba7c04e8424be0cba326a01882b (diff) | |
download | vcxsrv-88236adfe3eb41b8368b4c9ecf3e09a7199dc474.tar.gz vcxsrv-88236adfe3eb41b8368b4c9ecf3e09a7199dc474.tar.bz2 vcxsrv-88236adfe3eb41b8368b4c9ecf3e09a7199dc474.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/hw/xwin/InitOutput.c
xorg-server/hw/xwin/win.h
xorg-server/hw/xwin/winclipboard/internal.h
xorg-server/hw/xwin/winclipboard/thread.c
xorg-server/hw/xwin/winclipboard/wndproc.c
xorg-server/hw/xwin/winclipboard/xevents.c
xorg-server/hw/xwin/winclipboardinit.c
xorg-server/hw/xwin/winclipboardwrappers.c
xorg-server/hw/xwin/winglobals.c
Diffstat (limited to 'mesalib/src/mesa/main/version.c')
-rw-r--r-- | mesalib/src/mesa/main/version.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c index 126032740..e3a63811a 100644 --- a/mesalib/src/mesa/main/version.c +++ b/mesalib/src/mesa/main/version.c @@ -57,13 +57,15 @@ check_for_ending(const char *string, const char *ending) * fwd_context is only valid if version > 0 */ static void -get_gl_override(int *version, GLboolean *fwd_context) +get_gl_override(int *version, GLboolean *fwd_context, + GLboolean *compat_context) { const char *env_var = "MESA_GL_VERSION_OVERRIDE"; const char *version_str; int major, minor, n; static int override_version = -1; static GLboolean fc_suffix = GL_FALSE; + static GLboolean compat_suffix = GL_FALSE; if (override_version < 0) { override_version = 0; @@ -71,6 +73,7 @@ get_gl_override(int *version, GLboolean *fwd_context) version_str = getenv(env_var); if (version_str) { fc_suffix = check_for_ending(version_str, "FC"); + compat_suffix = check_for_ending(version_str, "COMPAT"); n = sscanf(version_str, "%u.%u", &major, &minor); if (n != 2) { @@ -87,6 +90,7 @@ get_gl_override(int *version, GLboolean *fwd_context) *version = override_version; *fwd_context = fc_suffix; + *compat_context = compat_suffix; } /** @@ -129,16 +133,16 @@ _mesa_override_gl_version_contextless(struct gl_constants *consts, gl_api *apiOut, GLuint *versionOut) { int version; - GLboolean fwd_context; + GLboolean fwd_context, compat_context; - get_gl_override(&version, &fwd_context); + get_gl_override(&version, &fwd_context, &compat_context); if (version > 0) { *versionOut = version; if (version >= 30 && fwd_context) { *apiOut = API_OPENGL_CORE; consts->ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT; - } else if (version >= 31) { + } else if (version >= 31 && !compat_context) { *apiOut = API_OPENGL_CORE; } else { *apiOut = API_OPENGL_COMPAT; @@ -166,9 +170,9 @@ int _mesa_get_gl_version_override(void) { int version; - GLboolean fwd_context; + GLboolean fwd_context, compat_context; - get_gl_override(&version, &fwd_context); + get_gl_override(&version, &fwd_context, &compat_context); return version; } |