diff options
author | Ian Romanick <[email protected]> | 2011-12-02 14:45:11 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-01-02 12:41:45 -0800 |
commit | e6280c3ba9579bf01f8b82e19497ba8f142a8d09 (patch) | |
tree | 03607c28d7f750d7c5c04dfb9fd1c4ac80b9432e /src/glx/dri2_glx.c | |
parent | e532b6288f01b63d8d8ba8c8dc08292967e65490 (diff) |
glx: Enable GLX_EXT_create_context_es2_profile
This extension is only enabled if the underlying driver advertises
support for OpenGL ES 2.0. This happens either through the getAPIMask
function in version 2 of the DRI2 extension or implicity through
version 2 of the DRISW extension.
Since there is no OpenGL ES 2.0 protocol, this extension is marked as
only available with direct-rendering.
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r-- | src/glx/dri2_glx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 54fea6fef66..51d45c9a3b9 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -923,8 +923,14 @@ dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions) __glXEnableDirectExtension(&psc->base, "INTEL_swap_event"); if (psc->dri2->base.version >= 3) { + const unsigned mask = psc->dri2->getAPIMask(psc->driScreen); + __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context"); __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile"); + + if ((mask & (1 << __DRI_API_GLES2)) != 0) + __glXEnableDirectExtension(&psc->base, + "GLX_EXT_create_context_es2_profile"); } for (i = 0; extensions[i]; i++) { |