summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/egl/egl_context.c8
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c7
2 files changed, 8 insertions, 7 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 {
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index de8194a46a..27b35052d1 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -232,7 +232,7 @@ drm_create_pbuffer_surface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
if (!surf)
goto err;
- if (!_eglInitSurface(drv, dpy, &surf->base, EGL_PBUFFER_BIT, config, attrib_list))
+ if (!_eglInitSurface(drv, &surf->base, EGL_PBUFFER_BIT, conf, attrib_list))
goto err_surf;
surf->w = width;
@@ -245,7 +245,7 @@ drm_create_pbuffer_surface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
(void*)surf);
drm_visual_modes_destroy(visual);
- _eglSaveSurface(&surf->base);
+ _eglLinkSurface(&surf->base, _eglLookupDisplay(dpy));
return surf->base.Handle;
err_surf:
@@ -364,7 +364,8 @@ EGLBoolean
drm_destroy_surface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
{
struct drm_surface *surf = lookup_drm_surface(surface);
- _eglRemoveSurface(&surf->base);
+ _eglUnlinkSurface(&surf->base);
+
if (surf->base.IsBound) {
surf->base.DeletePending = EGL_TRUE;
} else {