Mesa (gles3): egl_dri2: Use createContextAttribs if DRI2 version >= 3
Paul Berry
stereotype441 at kemper.freedesktop.org
Wed Aug 8 23:42:05 UTC 2012
Module: Mesa
Branch: gles3
Commit: 74844c6cbe6242ce58963186dbf0e805fc8cafbd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=74844c6cbe6242ce58963186dbf0e805fc8cafbd
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Jul 18 14:41:28 2012 -0700
egl_dri2: Use createContextAttribs if DRI2 version >= 3
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/egl/drivers/dri2/egl_dri2.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 65fc088..cde4d4f 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -699,7 +699,23 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
dri_config = NULL;
if (dri2_dpy->dri2) {
- {
+ if (dri2_dpy->dri2->base.version >= 3) {
+ unsigned error;
+ const uint32_t ctx_attribs[2] = {
+ __DRI_CTX_ATTRIB_MAJOR_VERSION,
+ dri2_ctx->base.ClientVersion
+ };
+
+ dri2_ctx->dri_context =
+ dri2_dpy->dri2->createContextAttribs(dri2_dpy->dri_screen,
+ api,
+ dri_config,
+ shared,
+ 1,
+ ctx_attribs,
+ & error,
+ dri2_ctx);
+ } else {
dri2_ctx->dri_context =
dri2_dpy->dri2->createNewContextForAPI(dri2_dpy->dri_screen,
api,
More information about the mesa-commit
mailing list