diff options
author | marha <marha@users.sourceforge.net> | 2012-08-07 08:28:39 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-07 08:28:39 +0200 |
commit | 666141b21e89c617ca466af62ebcb56dc4f5450c (patch) | |
tree | 4d0cddde47b6d8cbc92395dc2091849f89d68138 /mesalib/src/mesa/drivers/dri | |
parent | e158f8fc4a9cf2f884d156ff2dfc0870facfbcba (diff) | |
parent | f8e35ebbe71eed74ccf68af8ccda4182f1edc7f0 (diff) | |
download | vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.tar.gz vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.tar.bz2 vcxsrv-666141b21e89c617ca466af62ebcb56dc4f5450c.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/hw/xwin/glx/indirect.c
xorg-server/hw/xwin/winclipboardwndproc.c
xorg-server/hw/xwin/winmultiwindowicons.c
xorg-server/hw/xwin/winmultiwindowwindow.c
xorg-server/hw/xwin/winmultiwindowwm.c
xorg-server/hw/xwin/winwin32rootlesswindow.c
xorg-server/hw/xwin/winwindow.h
Diffstat (limited to 'mesalib/src/mesa/drivers/dri')
-rw-r--r-- | mesalib/src/mesa/drivers/dri/common/dri_util.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c index f9b2a73b2..91ae186fe 100644 --- a/mesalib/src/mesa/drivers/dri/common/dri_util.c +++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c @@ -197,12 +197,6 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api, return NULL; } - if (mesa_api != API_OPENGL && num_attribs != 0) { - *error = __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE; - assert(!"Should not get here."); - return NULL; - } - for (unsigned i = 0; i < num_attribs; i++) { switch (attribs[i * 2]) { case __DRI_CTX_ATTRIB_MAJOR_VERSION: @@ -224,6 +218,23 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api, } } + /* The EGL_KHR_create_context spec says: + * + * "Flags are only defined for OpenGL context creation, and specifying + * a flags value other than zero for other types of contexts, + * including OpenGL ES contexts, will generate an error." + * + * The GLX_EXT_create_context_es2_profile specification doesn't say + * 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 + && flags != 0) { + *error = __DRI_CTX_ERROR_BAD_FLAG; + return NULL; + } + /* There are no forward-compatible contexts before OpenGL 3.0. The * GLX_ARB_create_context spec says: * |