summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/egl_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/egl/egl_surface.c')
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index 489aa8d9af..86f2ea97e5 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -132,7 +132,7 @@ drm_create_texture(_EGLDriver *drv,
scrn->front.width = w;
scrn->front.height = h;
scrn->front.pitch = pitch;
- drm_api_hooks.handle_from_buffer(screen, scrn->buffer, &scrn->front.handle);
+ dev->api->handle_from_buffer(dev->api, screen, scrn->buffer, &scrn->front.handle);
if (0)
goto err_handle;
@@ -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,10 +364,9 @@ EGLBoolean
drm_destroy_surface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
{
struct drm_surface *surf = lookup_drm_surface(surface);
- _eglRemoveSurface(&surf->base);
- if (surf->base.IsBound) {
- surf->base.DeletePending = EGL_TRUE;
- } else {
+ _eglUnlinkSurface(&surf->base);
+
+ if (!surf->base.IsBound) {
if (surf->screen)
drm_takedown_shown_screen(drv, surf->screen);
st_unreference_framebuffer(surf->stfb);