X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fstate_trackers%2Fegl%2Fegl_context.c;h=95dfcb9983ceb6dea71e159df3c8077e30b6beb0;hb=cca31340b5a9c0b941946753a31236c7201ca87c;hp=8564972b91e2c0e015e4db5258ed79437bcaf6c0;hpb=e4d1757f81323636e99abc5fff411d42e19e901a;p=mesa.git diff --git a/src/gallium/state_trackers/egl/egl_context.c b/src/gallium/state_trackers/egl/egl_context.c index 8564972b91e..95dfcb9983c 100644 --- a/src/gallium/state_trackers/egl/egl_context.c +++ b/src/gallium/state_trackers/egl/egl_context.c @@ -113,9 +113,9 @@ drm_create_context(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext if (!ctx) goto err_c; - _eglInitContext(drv, dpy, &ctx->base, config, attrib_list); + _eglInitContext(drv, dpy, &ctx->base, conf, attrib_list); - ctx->pipe = drm_api_hocks.create_context(dev->screen); + ctx->pipe = dev->api->create_context(dev->api, dev->screen); if (!ctx->pipe) goto err_pipe; @@ -129,8 +129,8 @@ drm_create_context(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext if (!ctx->st) goto err_gl; - /* generate handle and insert into hash table */ - _eglSaveContext(&ctx->base); + /* link to display */ + _eglLinkContext(&ctx->base, _eglLookupDisplay(dpy)); assert(_eglGetContextHandle(&ctx->base)); return _eglGetContextHandle(&ctx->base); @@ -147,7 +147,7 @@ EGLBoolean drm_destroy_context(_EGLDriver *drv, EGLDisplay dpy, EGLContext context) { struct drm_context *c = lookup_drm_context(context); - _eglRemoveContext(&c->base); + _eglUnlinkContext(&c->base); if (c->base.IsBound) { c->base.DeletePending = EGL_TRUE; } else {