summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-08-17 09:23:50 -0700
committerIan Romanick <[email protected]>2012-08-29 15:09:37 -0700
commitca2b1fcb30bb1bec2eab520626c58727949f7cd6 (patch)
tree47d0c25f1afb135f7c4eb264aa5826f5850d6a7b /src/mesa/drivers
parent36ceabfb745f27bc5754ee2a9766945d1dd59551 (diff)
mesa/dri: Allow creation of forward-compatible contexts
This is done by changing the API to API_OPENGL_CORE. Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 86409dd0689..4276ad981f9 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -257,17 +257,17 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
* "Forward-compatible contexts are defined only for OpenGL versions
* 3.0 and later."
*
- * Moreover, Mesa can't fulfill the requirements of a forward-looking
- * context. Return failure if a forward-looking context is requested.
+ * Forward-looking contexts are supported by silently converting the
+ * requested API to API_OPENGL_CORE.
*
* In Mesa, a debug context is the same as a regular context.
*/
if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0) {
- *error = __DRI_CTX_ERROR_BAD_FLAG;
- return NULL;
+ mesa_api = API_OPENGL_CORE;
}
- if ((flags & ~__DRI_CTX_FLAG_DEBUG) != 0) {
+ if ((flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE))
+ != 0) {
*error = __DRI_CTX_ERROR_UNKNOWN_FLAG;
return NULL;
}