aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-16 14:48:54 +0200
committermarha <marha@users.sourceforge.net>2012-08-16 14:48:54 +0200
commit4aac32998c2b173b84aec0b020aa086fef4b1423 (patch)
tree3ffcb971bcc2f01929f60f8f704996544b69b2e1 /mesalib/src/mesa/drivers/dri/common
parent9ddf44af81782451cee798e06749ce3067a14a41 (diff)
downloadvcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.tar.gz
vcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.tar.bz2
vcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.zip
libxcb xserver mesa git update 16 Aug 2012
Diffstat (limited to 'mesalib/src/mesa/drivers/dri/common')
-rw-r--r--mesalib/src/mesa/drivers/dri/common/dri_util.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c
index 91ae186fe..86409dd06 100644
--- a/mesalib/src/mesa/drivers/dri/common/dri_util.c
+++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c
@@ -192,6 +192,8 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
mesa_api = API_OPENGLES2;
break;
case __DRI_API_OPENGL_CORE:
+ mesa_api = API_OPENGL_CORE;
+ break;
default:
*error = __DRI_CTX_ERROR_BAD_API;
return NULL;
@@ -218,6 +220,20 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
}
}
+ /* Mesa does not support the GL_ARB_compatibilty extension or the
+ * compatibility profile. This means that we treat a API_OPENGL 3.1 as
+ * API_OPENGL_CORE and reject API_OPENGL 3.2+.
+ */
+ if (mesa_api == API_OPENGL && major_version == 3 && minor_version == 1)
+ mesa_api = API_OPENGL_CORE;
+
+ if (mesa_api == API_OPENGL
+ && ((major_version > 3)
+ || (major_version == 3 && minor_version >= 2))) {
+ *error = __DRI_CTX_ERROR_BAD_API;
+ return NULL;
+ }
+
/* The EGL_KHR_create_context spec says:
*
* "Flags are only defined for OpenGL context creation, and specifying
@@ -228,8 +244,8 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
* anything specific about this case. However, none of the known flags
* have any meaning in an ES context, so this seems safe.
*/
- if (mesa_api != __DRI_API_OPENGL
- && mesa_api != __DRI_API_OPENGL_CORE
+ if (mesa_api != API_OPENGL
+ && mesa_api != API_OPENGL_CORE
&& flags != 0) {
*error = __DRI_CTX_ERROR_BAD_FLAG;
return NULL;