diff options
author | Adam Jackson <[email protected]> | 2017-11-14 15:13:06 -0500 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2019-09-23 20:39:01 -0400 |
commit | 0d635ccc912d7122f35f81eec27d8b2c0a2a7a28 (patch) | |
tree | 69828bd7c50e62140760e5464fc6947f324264a9 /src/glx/g_glxglvnddispatchfuncs.c | |
parent | 999c2aed8826f403b071f52b040ce25b56d35f9d (diff) |
glx: Implement GLX_EXT_no_config_context
This is the GLX counterpart to EGL_KHR_no_config_context. Contexts may
now be created without reference to an fbconfig, in which case it is
treated as compatible with any fbconfig (and thus any GLX drawable).
Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glx/g_glxglvnddispatchfuncs.c')
-rw-r--r-- | src/glx/g_glxglvnddispatchfuncs.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/glx/g_glxglvnddispatchfuncs.c b/src/glx/g_glxglvnddispatchfuncs.c index 0f02ed2d321..78c097febb6 100644 --- a/src/glx/g_glxglvnddispatchfuncs.c +++ b/src/glx/g_glxglvnddispatchfuncs.c @@ -160,7 +160,19 @@ static GLXContext dispatch_CreateContextAttribsARB(Display *dpy, __GLXvendorInfo *dd; GLXContext ret; - dd = GetDispatchFromFBConfig(dpy, config); + if (config) { + dd = GetDispatchFromFBConfig(dpy, config); + } else if (attrib_list) { + int i, screen; + + for (i = 0; attrib_list[i * 2] != None; i++) { + if (attrib_list[i * 2] == GLX_SCREEN) { + screen = attrib_list[i * 2 + 1]; + dd = GetDispatchFromDrawable(dpy, RootWindow(dpy, screen)); + break; + } + } + } if (dd == NULL) return None; |