diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-07-17 11:53:03 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-07-17 11:53:03 -0600 |
commit | cca31340b5a9c0b941946753a31236c7201ca87c (patch) | |
tree | cdd0c35eb777b16cd8dcd3d9442d0e9861acc07f /src/gallium/state_trackers/egl/egl_context.c | |
parent | 18457cb263e3e062e12314e7b3d5c81a7f2ba048 (diff) |
egl: Use the link functions to manage resources.
This commit uses the newly introduced link functions to manage EGL
contexts and surfaces. As a result of this, the API for drivers are
changed. All drivers are updated for the change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'src/gallium/state_trackers/egl/egl_context.c')
-rw-r--r-- | src/gallium/state_trackers/egl/egl_context.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/egl/egl_context.c b/src/gallium/state_trackers/egl/egl_context.c index edd49486e5..95dfcb9983 100644 --- a/src/gallium/state_trackers/egl/egl_context.c +++ b/src/gallium/state_trackers/egl/egl_context.c @@ -113,7 +113,7 @@ 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 = dev->api->create_context(dev->api, dev->screen); if (!ctx->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 { |