[Mesa-dev] [PATCH 1/5] mesa/dri: Allow creation of forward-compatible contexts
Ian Romanick
idr at freedesktop.org
Fri Aug 24 08:50:34 PDT 2012
From: Ian Romanick <ian.d.romanick at intel.com>
This is done by changing the API to API_OPENGL_CORE.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/dri/common/dri_util.c | 10 +++++-----
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 86409dd..4276ad9 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;
}
--
1.7.6.5
More information about the mesa-dev
mailing list