Commit 4ffbc984 authored by Ian Romanick's avatar Ian Romanick Committed by Keith Packard
Browse files

glx: Reject creations of indirect contexts with unsupportable versions.


Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 41d5120e
......@@ -259,6 +259,23 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
return __glXError(GLXBadProfileARB);
}
/* There is no GLX protocol for desktop OpenGL versions after 1.4. There
* is no GLX protocol for any version of OpenGL ES. If the application is
* requested an indirect rendering context for a version that cannot be
* satisfied, reject it.
*
* The GLX_ARB_create_context spec says:
*
* "* If <config> does not support compatible OpenGL contexts
* providing the requested API major and minor version,
* forward-compatible flag, and debug context flag, GLXBadFBConfig
* is generated."
*/
if (!req->isDirect && (major_version > 1 || minor_version > 4
|| profile == GLX_CONTEXT_ES2_PROFILE_BIT_EXT)) {
return __glXError(GLXBadFBConfig);
}
/* Allocate memory for the new context
*/
if (req->isDirect) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment