From 1e5014f7dfabcaf1f4b5608eb08e97179446eb09 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 27 Aug 2009 18:57:29 +0100 Subject: drm_api: Operate on textures instead of buffers Most use cases just got the buffer from the texture and then called into one of the get_handle functions. Also with this patch it would be easier to move to a generic function for getting handles from textures and textures from handles, that is exposed via the screen. --- src/gallium/state_trackers/egl/egl_surface.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/gallium/state_trackers/egl') diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c index 3ef1945b93..69e2d6b708 100644 --- a/src/gallium/state_trackers/egl/egl_surface.c +++ b/src/gallium/state_trackers/egl/egl_surface.c @@ -96,10 +96,6 @@ drm_create_texture(_EGLDisplay *dpy, if (!texture) goto err_tex; - dev->api->buffer_from_texture(dev->api, texture, &buf, &pitch); - if (!buf) - goto err_buf; - surface = screen->get_tex_surface(screen, texture, 0, @@ -112,11 +108,11 @@ drm_create_texture(_EGLDisplay *dpy, scrn->tex = texture; scrn->surface = surface; - scrn->buffer = buf; scrn->front.width = w; scrn->front.height = h; scrn->front.pitch = pitch; - dev->api->handle_from_buffer(dev->api, screen, scrn->buffer, &scrn->front.handle); + dev->api->local_handle_from_texture(dev->api, screen, texture, + &scrn->front.pitch, &scrn->front.handle); if (0) goto err_handle; @@ -126,7 +122,6 @@ err_handle: pipe_surface_reference(&surface, NULL); err_surf: pipe_texture_reference(&texture, NULL); -err_buf: err_tex: pipe_buffer_reference(&buf, NULL); return; -- cgit v1.2.3